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.
POST https://payment-api-service.transactpay.ai/payment/order/refund
| Header | Type | Required | Description |
|---|
api-key | string | ā
Yes | Your Transactpay secret API key |
Content-Type | string | ā
Yes | Must be application/json |
{
"reference": "{{orderreference}}",
"reason": "Customer requested a refund",
"amount": "5000"
}
| Key | Type | Required | Description |
|---|
reference | string | ā
Yes | Unique identifier for the original order |
reason | string | ā No | Reason for the refund (optional, but recommended) |
amount | string | ā 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.
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"
}'
{
"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.
{
"reference": "{{orderreference}}",
"Reason": "",
"Amount": ""
}