Skip to main content
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

X-SFPY-AGGREGATOR-SECRET-KEY
string
header
required

Path Parameters

raast-aggregator-id
string
required

The unique identifier for the aggregator

Example:

"agg_2288490a-2176-4de5-b373-0ffb6f8e2e6e"

Query Parameters

limit
string
offset
string
payment_id
string[]

Filter refunds by one or more payment identifiers.

status
string[]

Filter refunds by one or more statuses.

trace_reference
string[]

Filter refunds by one or more trace references.

msg_id
string[]

Filter refunds by one or more Raast message identifiers.

return_id
string[]

Filter refunds by one or more return identifiers.

request_id
string[]

Filter refunds by one or more client request identifiers.

refund_id
string[]

Filter refunds by one or more refund identifiers.

start_date
integer

Filter refunds created on or after this UNIX timestamp.

end_date
integer

Filter refunds created on or before this UNIX timestamp.

direction
enum<string>
Available options:
ASC,
DESC

Response

This response contains a paginated list of refunds linked to a payment

Standard response structure for successful operations

api_version
string

The current version of the API spec

Example:

"v1"

data
object

Contains the response data