Find Refund
curl --request GET \
--url https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds/{refund-id} \
--header 'X-SFPY-AGGREGATOR-SECRET-KEY: <api-key>'import requests
url = "https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds/{refund-id}"
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/{refund-id}', 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/{refund-id}",
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/{refund-id}"
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/{refund-id}")
.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/{refund-id}")
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": {
"id": "1",
"token": "rfd_2dd0b5e5-ee12-4ff9-b76d-ef915ea496f3",
"payment_id": "pm_54b6bcee-aa58-454d-aed9-ce97d6bdd797",
"amount": "500",
"type": "FULL_REFUND",
"reason": "TechnicalProblem",
"addtl_info": "Cancelation due to technical problem.",
"status": "R_FAILED",
"trace_reference": "f8cdffe4-cdf1-4f1a-a509-5c2fdfa95809",
"msg_id": "F3CJ6HG8UPVYPQBBN286T86Y988MUF95TXQ",
"return_id": "F3CJ6HG8UPVYPQBBN286T86Y988MUF95TXQ",
"request_id": "ad16c519-a18c-493c-a402-f3bf4cb7f3c1",
"msg_created_at": "2025-05-20 16:10:53.",
"settle_at": null,
"created_at": "2025-05-20T11:10:53Z",
"updated_at": "2025-05-20T11:10:54Z"
}
}{
"api_version": "v1",
"error": {
"code": "error.internal_server_error",
"message": "rpc error code Internal desc = something went wrong"
}
}Refunds
Find Refund
Explore a refund in detail.
GET
/
v1
/
aggregators
/
{raast-aggregator-id}
/
refunds
/
{refund-id}
Find Refund
curl --request GET \
--url https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds/{refund-id} \
--header 'X-SFPY-AGGREGATOR-SECRET-KEY: <api-key>'import requests
url = "https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/refunds/{refund-id}"
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/{refund-id}', 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/{refund-id}",
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/{refund-id}"
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/{refund-id}")
.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/{refund-id}")
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": {
"id": "1",
"token": "rfd_2dd0b5e5-ee12-4ff9-b76d-ef915ea496f3",
"payment_id": "pm_54b6bcee-aa58-454d-aed9-ce97d6bdd797",
"amount": "500",
"type": "FULL_REFUND",
"reason": "TechnicalProblem",
"addtl_info": "Cancelation due to technical problem.",
"status": "R_FAILED",
"trace_reference": "f8cdffe4-cdf1-4f1a-a509-5c2fdfa95809",
"msg_id": "F3CJ6HG8UPVYPQBBN286T86Y988MUF95TXQ",
"return_id": "F3CJ6HG8UPVYPQBBN286T86Y988MUF95TXQ",
"request_id": "ad16c519-a18c-493c-a402-f3bf4cb7f3c1",
"msg_created_at": "2025-05-20 16:10:53.",
"settle_at": null,
"created_at": "2025-05-20T11:10:53Z",
"updated_at": "2025-05-20T11:10:54Z"
}
}{
"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"
The unique identifier for the refund
Example:
"rfd_7e26f9be-f59d-4025-8e17-9fc398d16230"
Was this page helpful?
⌘I