Webhook sent when a previously successful SNAP disbursement is reversed
Webhook: transfer.bank.reversal
transfer.bank.reversalThis is a server-to-server callback (webhook) sent by Durianpay to your system when a SNAP disbursement that was previously reported as successful is later reversed. You do not need to poll or request status from our API. Configure your webhook listener endpoint and Durianpay will push the reversal directly to your server via POST request. It can be configured via menu Settings - Webhook.
This is the only event that lets you distinguish a reversal from an ordinary failed transfer. If you have not subscribed to it, reversals are still delivered through Transfer Bank Notify as 06 / failed. See Fallback Without This Webhook.
Webhook Specifications
- Method:
POST - Content-Type:
application/json - Retries: 2, 5, 10, 90, 210 minutes after the initial attempt if no
200 OKis received - Configuration: Set your webhook URL in
Dashboard > Settings > Webhookand subscribe to thetransfer.bank.reversalevent - Availability: SNAP Disbursement API only, production only
Subscribed Event
| Event Name | Description |
|---|---|
transfer.bank.reversal | Sent when a previously successful disbursement is reversed |
Reversal Behaviour
- The disbursement status becomes
failed. This is the status shown on the Dashboard and returned by status inquiry. - The full reversed amount, including the disbursement fee, is credited back to your Durianpay balance.
- A reversal can arrive up to 9 working days after the original success. In most cases it is processed on D+1.
- A reversal is final and cannot be undone. To pay the beneficiary again, submit a new disbursement.
A reversal is reported at two levelsThe disbursement status becomes
failed, whilelatestTransactionStatusin this webhook is04/Refunded.Use
latestTransactionStatus04to identify a reversal. The disbursement status itself will never readRefunded.
Field Definition
| Field | Type | Description |
|---|---|---|
| originalPartnerReferenceNo | string | Reference you sent when submitting the original bank / e-wallet transfer request |
| originalReferenceNo | string | Durianpay's reference returned when submitting the original transfer request (dis_item_xxx) |
| latestTransactionStatus | string(2) | Current transaction status. Always 04 for this event |
| transactionStatusDesc | string | Description of the current transaction status. Always Refunded for this event |
| amount.value | string | String representing value of the transaction: "20000.00" |
| amount.currency | string | Currency of the transaction: "IDR" |
| beneficiaryAccountNo | string | The account number of the recipient |
| beneficiaryAccountName | string | The account holder name of the recipient |
| beneficiaryBankCode | string | The bank code of the recipient account |
| additionalInfo.failureReason | string | Reason for the reversal, for example "Reversal Transaction" |
Payload structure differs from Transfer Bank Notify
latestTransactionStatusandtransactionStatusDescare at the top level of this payload, not nested insideadditionalInfoas intransfer-bank.notify. This payload also does not includeresponseCode,responseMessage, orsourceAccountNo.If you route both events to one handler, parse the two payloads separately.
Webhook Payload Example
{
"originalPartnerReferenceNo": "1000-1000-1000-1180",
"originalReferenceNo": "dis_item_Jl2HIglkQN4340",
"latestTransactionStatus": "04",
"transactionStatusDesc": "Refunded",
"amount": {
"value": "10000.00",
"currency": "IDR"
},
"beneficiaryAccountNo": "3370018285",
"beneficiaryAccountName": "John Doe",
"beneficiaryBankCode": "014",
"additionalInfo": {
"failureReason": "Reversal Transaction"
}
}📘 Status Handling
Inspect latestTransactionStatus at the top level of the payload:
"latestTransactionStatus": "04",
"transactionStatusDesc": "Refunded"| latestTransactionStatus | transactionStatusDesc | Disbursement status | Meaning |
|---|---|---|---|
| 00 | done | success | Transaction successful |
| 03 | Pending | processing | Transaction is still being processed |
| 04 | Refunded | failed | Transaction was previously successful and is now reversed |
| 06 | failed | failed | Transaction failed |
Handling steps:
- Verify the digital signature before processing the payload.
- Look up the original transaction using
originalReferenceNoororiginalPartnerReferenceNo. - Mark the transaction as reversed (a failed disbursement with a reversal reason) and adjust your settlement, ledger, or finance records.
- Make processing idempotent. The event may be retried, so guard against applying the same reversal twice.
- Respond with HTTP
200 OK.
✅ Action Required:
Always respond with HTTP 200 OK to acknowledge receipt of the webhook. If not acknowledged, Durianpay will retry based on this schedule: 2, 5, 10, 90, 210 minutes.
Fallback Without This Webhook
If you have not subscribed to transfer.bank.reversal, the reversal is delivered through transfer-bank.notify with additionalInfo.latestTransactionStatus 06 / failed. This is indistinguishable from a transfer that failed outright, and no reversal reason is provided.
Your transfer-bank.notify handler must therefore accept a transition from 00 / done to 06 / failed for the same originalReferenceNo, not only from pending to failed. A handler that ignores notifications for transactions already recorded as successful will miss reversals and drift from your Durianpay balance.
🔐 Digital Signature Verification
Durianpay signs every webhook to ensure integrity and authenticity. You must validate the signature before processing. The scheme is identical to transfer-bank.notify.
Webhook Headers:
| Header | Description |
|---|---|
| X-SIGNATURE | Base64-encoded RSA-2048 signature (SHA-256) |
| X-TIMESTAMP | Timestamp used to sign the payload |
Signature Format:
POST:<relative path>:<lowercase hex sha256 of minified JSON body>:<X-TIMESTAMP>
Use Durianpay's public key (Live/Sandbox-specific) to verify the signature. A complete Go implementation is available on Transfer Bank Notify and applies unchanged to this event.
Related
- Handling Pay Out Reversals: integration guide covering SNAP and Legacy API behaviour
- Transfer Bank Notify
- Disbursement Status Definition
