HTTP Notification Sample for SNAP
HTTP Notification sample for SNAP Payment Methods
Virtual Account
Payment Notification
Client's current local time in yyyy-MM- ddTHH:mm:ssTZD format
2020-12-21T07:56:11.000ZAlgorithm symmetric signature HMAC_SHA512 (clientSecret, stringToSign)
85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5Unique ID for a partner (DOKU'S Client ID)
821508239190Numeric String. Reference number that should be unique in the same day (request-id)
418075533589channel Id for VA
VA004Access Token obtained from Get B2B Token API
Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE2OTgwNTA3NDMsImlzcyI6IkRPS1UiLCJjbGllbnRJZCI6IkJSTi0wMjExLTE2OTY5MTk2NTE5MTgifQ.x-D5VlK6TlVZbLPUSCr-Gbfgh4tnp0QDJmedYFHJGHFjg1c4x39pszU4sLvRhr0Jk0vKdMIzxUZeNhKoesWqDJitnG3kfrNZNsMb_WYUC0tJW91onXzYOKXiTgsHwRNFoWPQHlXIEtT3RQm-SRlCpk_E0gsavgkQn2-kbJEBnPhIs4eKg5IUY9GYi4hRr-_GHsudDl8sd2B5UBB_rHYq36BRmLXH7i7MQADHPsB1ktPVgk3ZWF0jebEjI-lJ88p-omL1vQNvRseXej2HKBa9chGLmPDvXYBQaRmmstHz-tv1boFrHfwsHJebcUec-i3WE1vMvP_3EPXdbqb45N4ciQsimilar to company code/BIN,8 digit left padding space. | min length: 1 | max length: 8
77777Unique number (up to 20 digits). partnerServiceId + customerNo or virtualAccountNo. | min length: 1 | max length: 20
0000000000001partnerServiceId (8 digit left padding 0) + customerNo (up to 20 digits). partnerServiceId + customerNo or virtualAccountNo. | min length: 1 | max length: 28
777770000000000001Customer Name | min length: 1 | max length: 255
Toru YamashitaTransaction ID in Partner system. | min length: 1 | max length: 64
23219829713Unique identifier generated by PJP. If Payment comes from the Inquiry process, this value must be the same with inquiryRequestId. | min length: 1 | max length: 30
12839218738127830Customer Email | min length: 1 | max length: 255
toru@oor.comCustomer Phone, Format: 62xxxxxxxxx xxxx | min length: 9 | max length: 30
081293912081item created
Response Code with format HTTP status code + service code + case code. | min length: 1 | max length: 7
2002500Response Description. | min length: 1 | max length: 150
SuccessBad Request
Forbidden
Not Found
Conflict
Internal server error
Gateway Timeout
Direct Debit
Client's current local time in yyyy-MM- ddTHH:mm:ssTZD format
2020-12-21T07:56:11.000ZAlgorithm symmetric signature HMAC_SHA512 (clientSecret, stringToSign)
85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5Unique ID for a partner (DOKU'S Client ID)
821508239190Numeric String. Reference number that should be unique in the same day (request-id)
418075533589Device identification on which the API services are currently being accessed by the end user (customer). Can’t contain symbols
95221conditional. IP address of the end user (customer) using IPv4 format
95221Access token obtained from B2B2C API merchant
Bearer fa8sjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9aAccess Token obtained from Get B2B Token API from merchant
Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE2OTgwNTA3NDMsImlzcyI6IkRPS1UiLCJjbGllbnRJZCI6IkJSTi0wMjExLTE2OTY5MTk2NTE5MTgifQ.x-D5VlK6TlVZbLPUSCr-Gbfgh4tnp0QDJmedYFHJGHFjg1c4x39pszU4sLvRhr0Jk0vKdMIzxUZeNhKoesWqDJitnG3kfrNZNsMb_WYUC0tJW91onXzYOKXiTgsHwRNFoWPQHlXIEtT3RQm-SRlCpk_E0gsavgkQn2-kbJEBnPhIs4eKg5IUY9GYi4hRr-_GHsudDl8sd2B5UBB_rHYq36BRmLXH7i7MQADHPsB1ktPVgk3ZWF0jebEjI-lJ88p-omL1vQNvRseXej2HKBa9chGLmPDvXYBQaRmmstHz-tv1boFrHfwsHJebcUec-i3WE1vMvP_3EPXdbqb45N4ciQOriginal Partner Reference Number | min length: 1 | max length: 64
INVALLO201223002Original Reference Number | min length: 1 | max length: 64
2023122000000002e21131Original External ID from payment process | min length: 1 | max length: 64
660156703latest transaction status of transaction | format: 00 (Success) / 03 (Pending) / 04 (Refunded) / 05 (Canceled) / 06 (Failed)
00description of transaction status
SuccessSuccess
2005600201039000200Request has been processed successfullySuccess
E-wallet
1. Binding Notification
The merchant's client ID registered with DOKU
merchant-client-id-001A unique ID generated by DOKU for each notification. The merchant can use this value for idempotency checks.
notif-bind-20260609-000001Notification send timestamp in ISO 8601 format (yyyy-MM-ddTHH:mm:ss+07:00)
2026-06-09T10:00:00+07:00Pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+\-]\d{2}:\d{2}$HMAC-SHA512 digital signature for verifying the authenticity of the notification. The merchant MUST verify this signature before processing the notification.
Verification steps:
- Construct
stringToSign:HTTP-METHOD:RELATIVE-URL:ACCESS-TOKEN:HEX(SHA256(requestBody)):TIMESTAMP - Compute HMAC-SHA512 using the merchant's
clientSecretas the key. - Compare against the value of this header.
85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5Customer's B2B2C access token (DOKU B2B2C token) associated with this binding session. Present when the customer holds an active DOKU B2B2C token.
Bearer eyJhbGciOiJSUzI1NiJ9.customer...Payload sent by DOKU to the merchant's binding notification URL
The X-EXTERNAL-ID value from the original binding request submitted by the merchant.
Used by the merchant to correlate this notification with the original binding request.
ext-bind-20260609-00001Notification successfully received and processed by the merchant.
Expected acknowledgement from the merchant.
DOKU only requires HTTP 200 — the response body is optional.
If provided, it should follow the SNAP response code format:
HTTP Status (3) + Service Code 07 (2) + Case Code (2).
SNAP-format response code.
Example: 2000700 = HTTP 200 + service 07 + case 00 (Successful).
2000700Human-readable response message
SuccessfulMerchant could not parse or validate the notification request
Merchant rejected the notification due to invalid or unverifiable signature
Internal server error on the merchant side
2. Payment Notification
The merchant's client ID registered with DOKU
merchant-client-id-001A unique ID generated by DOKU for each notification. The merchant can use this value for idempotency checks.
notif-20260526-000001Notification send timestamp in ISO 8601 format (yyyy-MM-ddTHH:mm:ss+07:00)
2026-05-26T10:00:00+07:00HMAC-SHA512 digital signature for verifying the authenticity of the notification. The merchant must verify this signature before processing the notification.
85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5The channel ID used. Default is "DH" (Direct Hosting)
DHExample: DHCustomer B2B2C token (dokuB2b2cToken) if available from the binding process. Only present if the customer has an active token.
Bearer eyJhbGciOiJSUzI1NiJ9...Payment notification body sent by DOKU to the merchant.
The transaction invoice number used as the merchant's reference.
This value matches the partnerReferenceNo sent in the original payment request.
INV-20260526-001The reference number assigned by the acquirer. Can be used for reconciliation purposes with the acquirer.
REF-987654321External ID from the original payment request (the request ID sent by the merchant).
ext-req-20260526-001The latest transaction status as a two-digit code:
00— Success03— Pending04— Refunded05— Canceled06— Failed
00Description of the transaction status, corresponding to latestTransactionStatus
SuccessNotification successfully received and processed by the merchant. DOKU only requires HTTP 200 to consider the notification successful.
Response code in the format: HTTP Status Code (3 digits) + Service Code (2 digits) + Case Code (2 digits).
The service code for notify is 56.
2005600Response message
SuccessfulApproval Code
123456Invalid request
Invalid or unverifiable signature
Internal server error on the merchant side
3. Refund Notification
The merchant's client ID registered with DOKU
merchant-client-id-001A unique ID generated by DOKU for each notification. The merchant can use this value for idempotency checks.
notif-20260526-000002Notification send timestamp in ISO 8601 format (yyyy-MM-ddTHH:mm:ss+07:00)
2026-05-26T10:05:00+07:00Pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+\-]\d{2}:\d{2}$HMAC-SHA512 digital signature for verifying the authenticity of the notification. The merchant must verify this signature before processing the notification.
85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5The channel ID used. Default is "DH" (Direct Hosting)
DHExample: DHCustomer B2B2C token (dokuB2b2cToken) if available from the binding process. Only present if the customer has an active token.
Bearer eyJhbGciOiJSUzI1NiJ9...Refund notification body sent by DOKU to the merchant.
The invoice number of the original payment transaction.
This value matches the partnerReferenceNo sent in the original payment request.
INV-20260526-001The reference number assigned by the acquirer for the original payment. Can be used for reconciliation purposes with acquirer.
REF-987654321External ID from the original payment request (the request ID sent by the merchant).
ext-req-20260526-001The latest transaction status as a two-digit code:
00— Success03— Pending06— Failed
00Human-readable description of the transaction status, corresponding to latestTransactionStatus
SuccessNotification successfully received and processed by the merchant. DOKU only requires HTTP 200 to consider the notification successful.
Response code in the format: HTTP Status Code (3 digits) + Service Code (2 digits) + Case Code (2 digits).
The service code for notify is 56.
2005600Response message
SuccessfulApproval Code
123456Invalid request
Invalid or unverifiable signature
Internal server error on the merchant side
Last updated