Use this endpoint to initiate a refund for a specific order.
You must include your secret API key in the request header using api-key.
Refunds can be full or partial depending on whether the amount is specified.
HTTP
POST https://payment-api-service.transactpay.ai/payment/order/refund
Header Type Required Description api-keystring ā
Yes Your Transactpay secret API key Content-Typestring ā
Yes Must be application/json
JSON
{
"reference": "{{orderreference}}",
"reason": "Customer requested a refund",
"amount": "5000"
}
Key Type Required Description referencestring ā
Yes Unique identifier for the original order reasonstring ā No Reason for the refund (optional, but recommended) amountstring ā No Refund amount. If omitted, the full order amount is refunded automatically.
ā ļø
Omitting the amount will result in a full refund .
To process a partial refund , simply specify the amount.
Bash
curl -X POST https://payment-api-service.transactpay.ai/payment/order/refund \
-H "api-key: YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"reference": "ORD-12345",
"reason": "Product not received",
"amount": "2500"
}'
JSON
{
"status": true,
"message": "Refund has been initiated",
"data": {
"reference": "ORD-12345",
"amount_refunded": "2500",
"status": "pending"
}
}
š Refunds may take a short time to complete depending on the payment method used.
JSON
{
"reference": "{{orderreference}}",
"Reason": "",
"Amount": ""
}