Skip to main content

HTTP Notification Sample

After setting up your Notification URL, we will send the notification for certain events such as when the Virtual Account has been paid by your customers, Credit Card has been charged, Credit Card failed, and etc. Here are the sample for the notifications:

ini untuk SNAP

Virtual Account

Once the customers finish the payment, DOKU will send the notification to your defined Notification URL. Here is the sample notification that DOKU will send to merchant's server:

TypeValue
HTTP MethodPOST

Here is the sample of notification request header:

{
"X-SIGNATURE": "TsPrkibFNFF17BkIOviPv0CzVSdo5M5c2peE4gTdLsYddCDwgp8fui7+06U/H4tbGdutfVHGu+HW8o4D1MpjjtYooEPif9QcDU2mhVIr8p3YBK0E7yTmg7tmhZsEa/P5TcHvJFgXL1bT3gu4c5uAZ+TtkOEEHuUAprGow1kEO4p3+GAZKOoc0mjvmIGdfwdAK66vBCK1Mj4StjPugAcYYpM7u9uhtoALO2V6dM1TfFKsg3CWQoya4UVx73ePkb5ahhh0gIiTOMrWb2RXhPU4QWlnqLJR9KoWklqUX5UMrZAQuAiKtpTicEiwynIzPffrkeDxa0M7VZjc2LpBPNzXLQ==",
"X-PARTNER-ID": "BRN-0201-1690274481481",
"X-EXTERNAL-ID": "230814190612393107186190192001154673",
"X-TIMESTAMP": "2023-08-14T19:06:12+07:00"
}
Request Header Explanation
ParameterDescription
X-SIGNATURERepresents signature of a request
X-PARTNER-IDClient Id for merchant that generated by DOKU
X-EXTERNAL-IDNumeric String. Reference number that should be unique in the same day (Request Id)
X-TIMESTAMPClient's current local time with format : YYYY-MM-DDTHH:mm:ssZD

Here is the sample of notification request body:

{
"paidAmount": {
"value": "12500",
"currency": "IDR"
},
"trxDateTime": "2023-08-11T18:29:37+07:00",
"channelCode": "1",
"paymentRequestId": "R_1691752870",
"hashedSourceAccountNo": "7e2abdb908c885c5fee1b21d37915e02",
"additionalInfo": {},
"partnerServiceId": "12361",
"customerNo": "6010000000101",
"virtualAccountNo": "123616010000000101",
"virtualAccountName": "Merchant Success"
}
BNC VA Notification Explanation
ParameterTypeMandatoryDescription
paidAmount.valuestringMandatory
paidAmount.currencystringMandatory
trxDateTimestringMandatoryThe service that is used for the transaction
channelCodestringMandatory
paymentRequestIdstringMandatory
hashedSourceAccountNostringMandatory
additionalInfostringMandatory
partnerServiceIdstringMandatory
customerNostringMandatory
virtualAccountNostringMandatory
virtualAccountNamestringMandatory

Direct Debit

Once the payment process is finished, DOKU will send notification to defined Notification URL. Here is the sample notification that DOKU will send to merchant's server:

TypeValue
HTTP MethodPOST

Here is the sample of notification request header:

{
"X-PARTNER-ID": "BRN-0233-1677740003693",
"X-EXTERNAL-ID": "169157654793277588402"
}
Request Header Explanation
ParameterDescription
X-PARTNER-IDClient Id for merchant that generated by DOKU
X-EXTERNAL-IDNumeric String. Reference number that should be unique in the same day (Request Id)

Here is the sample of notification request body:

{
"originalPartnerReferenceNo": "E2E_20230809_0005",
"originalReferenceNo": "E2E_20230809_0005",
"originalExternalId": "278717036",
"latestTransactionStatus": "00",
"transactionStatusDesc": "Success",
"amount": {
"value": "10000.00",
"currency": "IDR"
},
"additionalInfo": {
"custIdMerchant": "CUST_0005",
"accountType": "WALLET"
}
}
Direct Debit Notification Explanation
ParameterTypeMandatoryDescription
originalPartnerReferenceNostringMandatorySame as the request that merchant sent on the payment initiation
originalReferenceNostringMandatoryTransaction identifier on service consumer system, will be used as invoice number.
originalExternalId``
latestTransactionStatus``
transactionStatusDesc``
amount.valuestringMandatoryTotal amount ends in decimal .00 if currency is IDR
amount.currencyMandatoryMandatoryCurrency of amount
additionalInfo.custIdMerchant``
additionalInfo.accountType``

Responding to HTTP Notification

Your Notification URL must response with HTTP status 2xx to confirm the transaction notification is received. The simplest one is to response with 200.

Retry Notification

In case your Notification URL didn't response our Notification with 2xx then we will attempt to deliver your HTTP Notification 6 times with exponential backoff between each interval and will stop retrying until we have received response from your server or there is still no response yet.

Retry NumberInterval (from previous attempts)Interval (from original attempts)
115 mins15 mins
245 mins1 hours
32 hours3 hours
43 hours6 hours
56 hours12 hours
612 hours24 hours
724 hours (1 day)48 hours (2 days)
848 hours (2 days)96 hours (4 days)
972 hours (3 days)168 hours (7 days)

Manual Retry

If you wish to do manual retry for the notification, follow the steps given below:

HTTP Notification List
  1. Login to DOKU Back Office
  2. Go to Tools > HTTP Notification
  3. Find the notification that you wish to retry
  4. Click the Plane icon to resend the notification

What's next?

Learn more about the best practice on how to handling the HTTP Notification on your side here.