Retrieves a refund
curl --request GET \
--url https://api.example.com/refunds/{id} \
--header 'x-digest-key: <api-key>' \
--header 'x-digest-signature: <x-digest-signature>' \
--header 'x-digest-timestamp: <x-digest-timestamp>'import requests
url = "https://api.example.com/refunds/{id}"
headers = {
"x-digest-timestamp": "<x-digest-timestamp>",
"x-digest-key": "<api-key>",
"x-digest-signature": "<x-digest-signature>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-digest-timestamp': '<x-digest-timestamp>',
'x-digest-key': '<api-key>',
'x-digest-signature': '<x-digest-signature>'
}
};
fetch('https://api.example.com/refunds/{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.example.com/refunds/{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-digest-key: <api-key>",
"x-digest-signature: <x-digest-signature>",
"x-digest-timestamp: <x-digest-timestamp>"
],
]);
$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.example.com/refunds/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-digest-timestamp", "<x-digest-timestamp>")
req.Header.Add("x-digest-key", "<api-key>")
req.Header.Add("x-digest-signature", "<x-digest-signature>")
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.example.com/refunds/{id}")
.header("x-digest-timestamp", "<x-digest-timestamp>")
.header("x-digest-key", "<api-key>")
.header("x-digest-signature", "<x-digest-signature>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/refunds/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-digest-timestamp"] = '<x-digest-timestamp>'
request["x-digest-key"] = '<api-key>'
request["x-digest-signature"] = '<x-digest-signature>'
response = http.request(request)
puts response.read_body{
"amount": {
"asset_id": "USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5",
"value": 1000
},
"status": "refunded",
"description": "Refund for overcharge",
"settlement_Id": "a1b8a00ed41563f78be51e66c6e1f435129b30a4dd3672580633bc5758459e1d",
"metadata": {},
"refund_id": "rf_fpaBPVF1t_",
"payment": {
"id": "pt_AEtKAcN9d-",
"createdAt": "2023-11-18T20:46:15.652Z",
"updatedAt": "2023-11-18T20:46:15.652Z",
"expiresAt": "2023-11-18T21:16:15.649Z",
"mode": "test",
"amount": {
"value": 200,
"currency": "USD"
},
"description": "Buying phone",
"status": "open",
"settlement_status": "open",
"redirectUrl": "https://example.com",
"webhookUrl": "https://example.com/webhook",
"hostedUrl": "https://sandbox-pay.ebioro.com/payments?paymentId=pt_QKTDINJ662&auth_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZXN0LmViaW9yby5jb20iLCJhdWQiOiJodHRwczovL3Rlc3QtZWJpb3JvLW1lcmNoYW50LXNlcnZpY2UtMzgxNTIyNmU5MmE4Lmhlcm9rdWFwcC5jb20iLCJzdWIiOiJjMzMyZTlkYi1kYjQ1LTQ1ZmQtOTFmMy03NGNiNWU5NTQzYzQiLCJpYXQiOjE3MTQwNjcxOTIsImV4cCI6MTcxNDA3MDc5Mn0.EY5xyWptYzD1HgJPUev6LGMRFFZ8HDZOsE2Vk35OASk&lang=es",
"qrCode": "web+stellar:pay?destination=GAPU7KB2B2USVSWBFJRHGX7AYIWYKF2W44WWDCYEJTEER5D2QYEGD5GM&amount=2.68&asset_code=USDC&asset_issuer=GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5&memo=pt_AEtKAcN9d-&memo_type=text&msg=Buying+phone",
"merchantName": "Test Store",
"cancelUrl": "https://example.com/cancel",
"locale": "es",
"metadata": {},
"stellarTxId": "1b680e9577572a0c3e648dcc1686373c87417d9ec17614d0ed5bf0ca397f8fcd",
"settlement_stellarTxId": "1b680e9577572a0c3e648dcc1686373c87417d9ec17614d0ed5bf0ca397f8fcd",
"settlement_currency": "USDC",
"settlement_amount": 2663,
"history": [
{
"time": 1714124827333,
"status": "success",
"description": "Payment created"
}
],
"sender_account": "GDFJ7PTIJGDINCLD7ZWZMYURELPMP6JZ6NMJBDBHKDXBFFWBC4SUFA4F",
"asset_id": "USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5",
"refunded": false,
"type": "order"
}
}{
"reason": "Bad Request",
"statusCode": 400
}{
"reason": "Unauthorized",
"statusCode": 401
}{
"reason": "Not Found",
"statusCode": 404
}{
"reason": "Internal Server Error",
"statusCode": 500
}Refunds
Get Refund
Fetches details of a specific refund by its ID for the logged-in merchant.
GET
/
refunds
/
{id}
Retrieves a refund
curl --request GET \
--url https://api.example.com/refunds/{id} \
--header 'x-digest-key: <api-key>' \
--header 'x-digest-signature: <x-digest-signature>' \
--header 'x-digest-timestamp: <x-digest-timestamp>'import requests
url = "https://api.example.com/refunds/{id}"
headers = {
"x-digest-timestamp": "<x-digest-timestamp>",
"x-digest-key": "<api-key>",
"x-digest-signature": "<x-digest-signature>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-digest-timestamp': '<x-digest-timestamp>',
'x-digest-key': '<api-key>',
'x-digest-signature': '<x-digest-signature>'
}
};
fetch('https://api.example.com/refunds/{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.example.com/refunds/{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-digest-key: <api-key>",
"x-digest-signature: <x-digest-signature>",
"x-digest-timestamp: <x-digest-timestamp>"
],
]);
$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.example.com/refunds/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-digest-timestamp", "<x-digest-timestamp>")
req.Header.Add("x-digest-key", "<api-key>")
req.Header.Add("x-digest-signature", "<x-digest-signature>")
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.example.com/refunds/{id}")
.header("x-digest-timestamp", "<x-digest-timestamp>")
.header("x-digest-key", "<api-key>")
.header("x-digest-signature", "<x-digest-signature>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/refunds/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-digest-timestamp"] = '<x-digest-timestamp>'
request["x-digest-key"] = '<api-key>'
request["x-digest-signature"] = '<x-digest-signature>'
response = http.request(request)
puts response.read_body{
"amount": {
"asset_id": "USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5",
"value": 1000
},
"status": "refunded",
"description": "Refund for overcharge",
"settlement_Id": "a1b8a00ed41563f78be51e66c6e1f435129b30a4dd3672580633bc5758459e1d",
"metadata": {},
"refund_id": "rf_fpaBPVF1t_",
"payment": {
"id": "pt_AEtKAcN9d-",
"createdAt": "2023-11-18T20:46:15.652Z",
"updatedAt": "2023-11-18T20:46:15.652Z",
"expiresAt": "2023-11-18T21:16:15.649Z",
"mode": "test",
"amount": {
"value": 200,
"currency": "USD"
},
"description": "Buying phone",
"status": "open",
"settlement_status": "open",
"redirectUrl": "https://example.com",
"webhookUrl": "https://example.com/webhook",
"hostedUrl": "https://sandbox-pay.ebioro.com/payments?paymentId=pt_QKTDINJ662&auth_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZXN0LmViaW9yby5jb20iLCJhdWQiOiJodHRwczovL3Rlc3QtZWJpb3JvLW1lcmNoYW50LXNlcnZpY2UtMzgxNTIyNmU5MmE4Lmhlcm9rdWFwcC5jb20iLCJzdWIiOiJjMzMyZTlkYi1kYjQ1LTQ1ZmQtOTFmMy03NGNiNWU5NTQzYzQiLCJpYXQiOjE3MTQwNjcxOTIsImV4cCI6MTcxNDA3MDc5Mn0.EY5xyWptYzD1HgJPUev6LGMRFFZ8HDZOsE2Vk35OASk&lang=es",
"qrCode": "web+stellar:pay?destination=GAPU7KB2B2USVSWBFJRHGX7AYIWYKF2W44WWDCYEJTEER5D2QYEGD5GM&amount=2.68&asset_code=USDC&asset_issuer=GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5&memo=pt_AEtKAcN9d-&memo_type=text&msg=Buying+phone",
"merchantName": "Test Store",
"cancelUrl": "https://example.com/cancel",
"locale": "es",
"metadata": {},
"stellarTxId": "1b680e9577572a0c3e648dcc1686373c87417d9ec17614d0ed5bf0ca397f8fcd",
"settlement_stellarTxId": "1b680e9577572a0c3e648dcc1686373c87417d9ec17614d0ed5bf0ca397f8fcd",
"settlement_currency": "USDC",
"settlement_amount": 2663,
"history": [
{
"time": 1714124827333,
"status": "success",
"description": "Payment created"
}
],
"sender_account": "GDFJ7PTIJGDINCLD7ZWZMYURELPMP6JZ6NMJBDBHKDXBFFWBC4SUFA4F",
"asset_id": "USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5",
"refunded": false,
"type": "order"
}
}{
"reason": "Bad Request",
"statusCode": 400
}{
"reason": "Unauthorized",
"statusCode": 401
}{
"reason": "Not Found",
"statusCode": 404
}{
"reason": "Internal Server Error",
"statusCode": 500
}Authorizations
Your public API key
Headers
Current Unix timestamp
Your public api key
Digest Auth Signature
Path Parameters
The ID of the refund to retrieve
Response
On success the endpoint will return a JSON object with detailed refund information.
Show child attributes
Show child attributes
The status of the refund. Available values are open, failed, refunded
Description of the refund.
Settlement ID related to the refund.
Additional metadata related to the refund.
Refund identifier.
Show child attributes
Show child attributes
⌘I