API reference
Refunds
How refunds work in v1.0.x, the payment.refunded event, and the refund fields on a payment.
Requesting a refund#
Send the request from the registered owner email to partnership@algoritmakitadigital.id, naming the merchant_id, the environment (sandbox/live), the payment_id or external_order_id, the amount to refund, and the reason. Never send an API key or signing secret by email.
Refund rules#
- Only payments with status
PAIDcan be refunded. - Refunds may be partial and repeated; the refund total cannot exceed the payment amount.
- The payment status stays
PAID. A refund does not change the payment status; refund progress shows inrefunded_amountandrefund_status. - Virtual Account refunds are manual: the AKD team transfers the money to the payer and records the reference. QRIS refunds can be processed through the payment provider within 30 days of payment; not every QRIS issuer supports them.
- The transaction service fee is not returned on a refund.
The payment.refunded event#
AKD sends payment.refunded each time a refund completes. One payment can produce several payment.refunded events, each with its own event_id and refund_id.
| Field | Meaning |
|---|---|
amount |
the amount of this refund |
refunded_amount |
the total refunded for the payment so far |
payment_amount |
the original payment amount |
payment_status |
stays PAID |
refund_status |
PARTIAL while some amount can still be refunded, FULL once the whole amount has been refunded |
The full body, headers, and verification are in Webhooks to the merchant server (in Bahasa Indonesia). Deduplicate on X-AKD-Event-ID as for other events.
Reading the refund status#
The GET /v1/payments/{payment_id} response contains refunded_amount (the total of successful refunds) and refund_status: NONE, PARTIAL, or FULL.
What your server should do#
- Verify the signature and deduplicate
X-AKD-Event-ID. - Record each refund by
refund_id; userefunded_amountas the latest total. - Do not turn the order back into "unpaid": the payment stays
PAID. Mark the order as partly or fully refunded according torefund_status. - Answer
2xxquickly.