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",
"merchantId": "<YOUR_MERCHANT_ID>",
"amount": 2000,
"currency": "XOF",
"reason": "refund",
"paymentMethod": "mobile_money",
"fallbackAllowed": false,
"fallbackUsed": false,
"metadata": {},
"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",
"merchantId": "<YOUR_MERCHANT_ID>",
"amount": 2000,
"currency": "XOF",
"reason": "refund",
"paymentMethod": "mobile_money",
"fallbackAllowed": false,
"fallbackUsed": false,
"metadata": {},
"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
string
required
Your API key.
string
required
Your merchant ID.
string
required
The environment to use:
sandbox or live.Path parameters
number
required
The ID of the refund (e.g.,
1).Response
number
The ID of the refund.
string
The status of the refund. Possible values:
created, pending, pending_manual, successful, failed.string
The ID of the refunded transfer.
string
The ID of the merchant that owns the refunded transfer.
number
The refunded amount. It equals the amount of the original transfer.
string
The currency of the refund, as an ISO 4217 code (e.g.,
XOF).string
The reason for the refund.
string
The payment method used for the refund. Possible values:
mobile_money, bank_transfer.boolean
Whether a fallback payment method is allowed for this refund.
boolean
Whether a fallback payment method was used for this refund.
object
Additional data attached to the refund.
string
The creation date of the refund, in ISO 8601 format.
string
The date of the last update of the refund, in ISO 8601 format.
Errors
| Status | Cause |
|---|---|
404 | The refund does not exist or does not belong to your merchant account. |
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",
"merchantId": "<YOUR_MERCHANT_ID>",
"amount": 2000,
"currency": "XOF",
"reason": "refund",
"paymentMethod": "mobile_money",
"fallbackAllowed": false,
"fallbackUsed": false,
"metadata": {},
"createdAt": "2026-01-15T12:00:00.000Z",
"updatedAt": "2026-01-15T12:30:00.000Z"
}
