You can refund a QR Code payment that has been successful either in full amount or partial amount. However there are things to note:
If a refund of the full amount is requested within 24 hours of payment completion, the original payment will be VOIDED
. The original fee and VAT charged will be fully returned.
If a refund of a partial amount is requested or if a refund of any amount is requested after 24 hours of payment completion, the original payment will be REFUNDED
. The original fee and VAT charged will NOT be returned at all.
- This Refund API will only work for successful QR payments.
- This Refund API will return
PENDING
status in API response upon execution. A follow-up webhook/callback will be sent to your system's URL when refund has been processed successfully.
The validity period for a refund is 30 days from payment date. After 30 days you cannot request a refund.
Your customer will receive the refund fund instantly after you have successfully get the success callback of the QR Code refund.
However if the customer paid using other than the issuer list below, you cannot request a refund (example: payment QRIS via GoPay cannot be refunded using this endpoint):
If you wish to refund QRIS from other issuers, please use our disbursement feature instead.
Here are the steps on how to create QR Code refund:
1. Create secret API Key on your dashboard
Reference can be found in this doc.
2. Set your callback URL in Dashboard > Settings > Callbacks in QR Code paid & refunded and make sure upon "test and save" it returns 2XX
3. Create Refund QR payment using endpoint:
POST https://api.xendit.co/qr_codes/payments/:qrpy_id/refunds
The {qrpy_id} is the payment id which you get from the callback we send after payment has been successful or you can get the id in the Transactions Tab by clicking the transaction and/or callback tab.
4. Input you secret API key in Authorization
5. In Body Request you can leave it blank or add parameter "amount" if you wish to be partial and "reason".
6. You will get this response afterwards:
{
"id": "qrrf_3a38022e-7f9a-4ef0-a421-e18d9cb877e3",
"qrpy_id": "qrpy_f3cad64b-5392-499f-99e1-7d60cb615527",
"status": "PENDING",
"currency": "IDR",
"payment_amount": 100,
"refund_amount": 100,
"channel_code": "ID_DANA",
"reason": "",
"failure_code": null,
"refunded_at": null,
"created": "2023-04-04T10:41:33.798952Z",
"updated": "2023-04-04T10:41:33.798952Z"
}
7. You will then receive a callback of the successful refund where you can check on your callback tab.
8. The refunded transaction transaction will appear in Transactions Tab as "voided" (if before 24 hours) or "refunded" (if after 24 hours)
Further information can be checked here.