curl --location --request GET 'https://api.hub2.io/refunds/1' \
--header 'ApiKey: <YOUR_API_KEY>' \
--header 'MerchantId: <YOUR_MERCHANT_ID>' \
--header 'Environment: sandbox'
async function getRefund(): Promise<void> {
const response = await fetch('https://api.hub2.io/refunds/1', {
method: 'GET',
headers: {
'ApiKey': '<YOUR_API_KEY>',
'MerchantId': '<YOUR_MERCHANT_ID>',
'Environment': 'sandbox',
},
});
if (response.ok) {
console.log(await response.json());
} else {
console.log(`HTTP status: ${response.status}`);
}
}
getRefund();
import requests
headers = {
'ApiKey': '<YOUR_API_KEY>',
'MerchantId': '<YOUR_MERCHANT_ID>',
'Environment': 'sandbox',
}
response = requests.get('https://api.hub2.io/refunds/1', headers=headers)
if response.status_code == 200:
print(response.json())
else:
print(f'HTTP status: {response.status_code}')
{
"id": 1,
"status": "successful",
"transactionId": "tr_R7xkvVd5gRfBCWQCYrWEt",
"amount": 2000,
"currency": "XOF",
"reason": "refund",
"paymentMethod": "mobile_money",
"fallbackUsed": false,
"createdAt": "2026-01-15T12:00:00.000Z",
"updatedAt": "2026-01-15T12:30:00.000Z"
}
Refunds
Retrieve a refund
Retrieve the details of a transfer refund.
GET
/
refunds
/
{id}
curl --location --request GET 'https://api.hub2.io/refunds/1' \
--header 'ApiKey: <YOUR_API_KEY>' \
--header 'MerchantId: <YOUR_MERCHANT_ID>' \
--header 'Environment: sandbox'
async function getRefund(): Promise<void> {
const response = await fetch('https://api.hub2.io/refunds/1', {
method: 'GET',
headers: {
'ApiKey': '<YOUR_API_KEY>',
'MerchantId': '<YOUR_MERCHANT_ID>',
'Environment': 'sandbox',
},
});
if (response.ok) {
console.log(await response.json());
} else {
console.log(`HTTP status: ${response.status}`);
}
}
getRefund();
import requests
headers = {
'ApiKey': '<YOUR_API_KEY>',
'MerchantId': '<YOUR_MERCHANT_ID>',
'Environment': 'sandbox',
}
response = requests.get('https://api.hub2.io/refunds/1', headers=headers)
if response.status_code == 200:
print(response.json())
else:
print(f'HTTP status: {response.status_code}')
{
"id": 1,
"status": "successful",
"transactionId": "tr_R7xkvVd5gRfBCWQCYrWEt",
"amount": 2000,
"currency": "XOF",
"reason": "refund",
"paymentMethod": "mobile_money",
"fallbackUsed": false,
"createdAt": "2026-01-15T12:00:00.000Z",
"updatedAt": "2026-01-15T12:30:00.000Z"
}
Retrieves a transfer refund by its ID, as returned by Create a refund.
Headers
Path parameters
Response
The status of the refund. Possible values:
created, pending, pending_manual, successful, failed.Present only when the latest status change failed. Contains
code (for example insufficient_funds, service_unavailable, not_found, unknown_reason) and message, a human-readable explanation.Errors
| Status | Cause |
|---|---|
400 | The merchant account was not found (merchant_not_found). |
401 | The credentials are invalid. |
403 | Access is refused, for example because your API key lacks the Api.refund_read permission (missing_permission) or the merchant account is closed (merchant_closed). The code field of the error gives the reason. |
404 | The refund does not exist or does not belong to your merchant account. |
429 | More than 10 requests per 5 seconds. |
curl --location --request GET 'https://api.hub2.io/refunds/1' \
--header 'ApiKey: <YOUR_API_KEY>' \
--header 'MerchantId: <YOUR_MERCHANT_ID>' \
--header 'Environment: sandbox'
async function getRefund(): Promise<void> {
const response = await fetch('https://api.hub2.io/refunds/1', {
method: 'GET',
headers: {
'ApiKey': '<YOUR_API_KEY>',
'MerchantId': '<YOUR_MERCHANT_ID>',
'Environment': 'sandbox',
},
});
if (response.ok) {
console.log(await response.json());
} else {
console.log(`HTTP status: ${response.status}`);
}
}
getRefund();
import requests
headers = {
'ApiKey': '<YOUR_API_KEY>',
'MerchantId': '<YOUR_MERCHANT_ID>',
'Environment': 'sandbox',
}
response = requests.get('https://api.hub2.io/refunds/1', headers=headers)
if response.status_code == 200:
print(response.json())
else:
print(f'HTTP status: {response.status_code}')
{
"id": 1,
"status": "successful",
"transactionId": "tr_R7xkvVd5gRfBCWQCYrWEt",
"amount": 2000,
"currency": "XOF",
"reason": "refund",
"paymentMethod": "mobile_money",
"fallbackUsed": false,
"createdAt": "2026-01-15T12:00:00.000Z",
"updatedAt": "2026-01-15T12:30:00.000Z"
}
