List Refunds
curl --request GET \
--url https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds \
--header 'X-SFPY-AGGREGATOR-SECRET-KEY: <api-key>'import requests
url = "https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds"
headers = {"X-SFPY-AGGREGATOR-SECRET-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-SFPY-AGGREGATOR-SECRET-KEY': '<api-key>'}};
fetch('https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-SFPY-AGGREGATOR-SECRET-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-SFPY-AGGREGATOR-SECRET-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds")
.header("X-SFPY-AGGREGATOR-SECRET-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-SFPY-AGGREGATOR-SECRET-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"api_version": "v1",
"data": {
"count": 1,
"keys": [
{
"token": "<string>",
"payment_id": "<string>",
"amount": "<string>",
"type": "<string>",
"reason": "<string>",
"addtl_info": "<string>",
"status": "<string>",
"trace_reference": "<string>",
"msg_id": "<string>",
"return_id": "<string>",
"request_id": "<string>",
"msg_created_at": "2025-03-13T09:12:34.000Z",
"settle_at": null,
"created_at": "2025-03-13T09:12:34.000Z",
"updated_at": "2025-03-13T09:12:34.000Z"
}
]
}
}{
"api_version": "v1",
"error": {
"code": "error.internal_server_error",
"message": "rpc error code Internal desc = something went wrong"
}
}Refunds
List Refunds
Retrieve a paginated list of refunds that have been issued
GET
/
v1
/
aggregators
/
{raast-aggregator-id}
/
refunds
List Refunds
curl --request GET \
--url https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds \
--header 'X-SFPY-AGGREGATOR-SECRET-KEY: <api-key>'import requests
url = "https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds"
headers = {"X-SFPY-AGGREGATOR-SECRET-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-SFPY-AGGREGATOR-SECRET-KEY': '<api-key>'}};
fetch('https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-SFPY-AGGREGATOR-SECRET-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-SFPY-AGGREGATOR-SECRET-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds")
.header("X-SFPY-AGGREGATOR-SECRET-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-SFPY-AGGREGATOR-SECRET-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"api_version": "v1",
"data": {
"count": 1,
"keys": [
{
"token": "<string>",
"payment_id": "<string>",
"amount": "<string>",
"type": "<string>",
"reason": "<string>",
"addtl_info": "<string>",
"status": "<string>",
"trace_reference": "<string>",
"msg_id": "<string>",
"return_id": "<string>",
"request_id": "<string>",
"msg_created_at": "2025-03-13T09:12:34.000Z",
"settle_at": null,
"created_at": "2025-03-13T09:12:34.000Z",
"updated_at": "2025-03-13T09:12:34.000Z"
}
]
}
}{
"api_version": "v1",
"error": {
"code": "error.internal_server_error",
"message": "rpc error code Internal desc = something went wrong"
}
}Authorizations
Path Parameters
The unique identifier for the aggregator
Example:
"agg_2288490a-2176-4de5-b373-0ffb6f8e2e6e"
Query Parameters
Filter refunds by one or more payment identifiers.
Filter refunds by one or more statuses.
Filter refunds by one or more trace references.
Filter refunds by one or more Raast message identifiers.
Filter refunds by one or more return identifiers.
Filter refunds by one or more client request identifiers.
Filter refunds by one or more refund identifiers.
Filter refunds created on or after this UNIX timestamp.
Filter refunds created on or before this UNIX timestamp.
Available options:
ASC, DESC Was this page helpful?