HTTP Notification Sample for SNAP
HTTP Notification sample for SNAP Payment Methods
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, etc.
Once the customers finish the payment, DOKU will send the notification to your defined Notification URL.
Virtual Account
Here is the sample notification that DOKU will send to merchant's server. For Virtual Account SNAP has same sample notification.
The list of Virtual Account SNAP, you can find here.
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
[email protected]Customer Phone, Format: 62xxxxxxxxx xxxx | min length: 9 | max length: 30
081293912081item created
Bad Request
Forbidden
Not Found
Conflict
Internal server error
Gateway Timeout
POST /v1/transfer-va/payment HTTP/1.1
Host: {merchant-domain}
X-TIMESTAMP: 2020-12-21T07:56:11.000Z
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
X-PARTNER-ID: 821508239190
X-EXTERNAL-ID: 418075533589
CHANNEL-ID: VA004
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE2OTgwNTA3NDMsImlzcyI6IkRPS1UiLCJjbGllbnRJZCI6IkJSTi0wMjExLTE2OTY5MTk2NTE5MTgifQ.x-D5VlK6TlVZbLPUSCr-Gbfgh4tnp0QDJmedYFHJGHFjg1c4x39pszU4sLvRhr0Jk0vKdMIzxUZeNhKoesWqDJitnG3kfrNZNsMb_WYUC0tJW91onXzYOKXiTgsHwRNFoWPQHlXIEtT3RQm-SRlCpk_E0gsavgkQn2-kbJEBnPhIs4eKg5IUY9GYi4hRr-_GHsudDl8sd2B5UBB_rHYq36BRmLXH7i7MQADHPsB1ktPVgk3ZWF0jebEjI-lJ88p-omL1vQNvRseXej2HKBa9chGLmPDvXYBQaRmmstHz-tv1boFrHfwsHJebcUec-i3WE1vMvP_3EPXdbqb45N4ciQ
Content-Type: application/json
Accept: */*
Content-Length: 327
{
"partnerServiceId": " 77777",
"customerNo": "0000000000001",
"virtualAccountNo": " 777770000000000001",
"virtualAccountName": "Toru Yamashita",
"trxId": "23219829713",
"paymentRequestId": "12839218738127830",
"paidAmount": {
"value": "11500.00",
"currency": "IDR"
},
"virtualAccountEmail": "[email protected]",
"virtualAccountPhone": "081293912081"
}{
"responseCode": "2002500",
"responseMessage": "Success",
"virtualAccountData": {
"partnerServiceId": " 77777",
"customerNo": "0000000000001",
"virtualAccountNo": " 777770000000000001",
"virtualAccountName": "Toru Yamashita",
"trxId": "23219829713",
"paymentRequestId": "12839218738127830"
}
}Direct Debit
Here is the sample notification that DOKU will send to merchant's server. For Direct Debit SNAP has same sample notification.
The list of Direct Debit SNAP, you can find here.
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
POST /v1.0/debit/notify HTTP/1.1
Host: {api-domain}
X-TIMESTAMP: 2020-12-21T07:56:11.000Z
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
X-PARTNER-ID: 821508239190
X-EXTERNAL-ID: 418075533589
X-DEVICE-ID: 95221
Authorization-customer: Bearer fa8sjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE2OTgwNTA3NDMsImlzcyI6IkRPS1UiLCJjbGllbnRJZCI6IkJSTi0wMjExLTE2OTY5MTk2NTE5MTgifQ.x-D5VlK6TlVZbLPUSCr-Gbfgh4tnp0QDJmedYFHJGHFjg1c4x39pszU4sLvRhr0Jk0vKdMIzxUZeNhKoesWqDJitnG3kfrNZNsMb_WYUC0tJW91onXzYOKXiTgsHwRNFoWPQHlXIEtT3RQm-SRlCpk_E0gsavgkQn2-kbJEBnPhIs4eKg5IUY9GYi4hRr-_GHsudDl8sd2B5UBB_rHYq36BRmLXH7i7MQADHPsB1ktPVgk3ZWF0jebEjI-lJ88p-omL1vQNvRseXej2HKBa9chGLmPDvXYBQaRmmstHz-tv1boFrHfwsHJebcUec-i3WE1vMvP_3EPXdbqb45N4ciQ
Content-Type: application/json
Accept: */*
Content-Length: 537
{
"originalPartnerReferenceNo": "INVALLO201223002",
"originalReferenceNo": "2023122000000002e21131",
"originalExternalId": "660156703",
"latestTransactionStatus": "00",
"transactionStatusDesc": "Success",
"amount": {
"value": "10000.00",
"currency": "IDR"
},
"additionalInfo": {
"channelId": "DIRECT_DEBIT_ALLO",
"acquirerId": "ALLO",
"custIdMerchant": "UATALLO1",
"accountType": "DIRECT_DEBIT",
"lineItems": [
{
"name": "baju",
"price": "10000.00",
"quantity": 1
}
],
"origin": {
"source": "direct",
"system": "mid-jokul-checkout-system",
"product": "CHECKOUT",
"apiFormat": "SNAP"
}
}
}Success
{
"responseCode": "2005600",
"approvalCode": "201039000200",
"responseMessage": "Request has been processed successfully"
}E-wallet
The notification format for SNAP e-wallet transactions exhibits minor differences from those of other e-wallets. For further details please refer to sample notification below.
1. 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)
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
2023122000000002e92112131Original 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
POST /v1.0/debit/notify HTTP/1.1
Host: {api-domain}
X-TIMESTAMP: 2020-12-21T07:56:11.000Z
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
X-PARTNER-ID: 821508239190
X-EXTERNAL-ID: 418075533589
X-DEVICE-ID: 95221
Authorization-customer: Bearer fa8sjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE2OTgwNTA3NDMsImlzcyI6IkRPS1UiLCJjbGllbnRJZCI6IkJSTi0wMjExLTE2OTY5MTk2NTE5MTgifQ.x-D5VlK6TlVZbLPUSCr-Gbfgh4tnp0QDJmedYFHJGHFjg1c4x39pszU4sLvRhr0Jk0vKdMIzxUZeNhKoesWqDJitnG3kfrNZNsMb_WYUC0tJW91onXzYOKXiTgsHwRNFoWPQHlXIEtT3RQm-SRlCpk_E0gsavgkQn2-kbJEBnPhIs4eKg5IUY9GYi4hRr-_GHsudDl8sd2B5UBB_rHYq36BRmLXH7i7MQADHPsB1ktPVgk3ZWF0jebEjI-lJ88p-omL1vQNvRseXej2HKBa9chGLmPDvXYBQaRmmstHz-tv1boFrHfwsHJebcUec-i3WE1vMvP_3EPXdbqb45N4ciQ
Content-Type: application/json
Accept: */*
Content-Length: 529
{
"originalPartnerReferenceNo": "INVALLO201223002",
"originalReferenceNo": "2023122000000002e92112131",
"originalExternalId": "660156703",
"latestTransactionStatus": "00",
"transactionStatusDesc": "Success",
"amount": {
"value": "10000.00",
"currency": "IDR"
},
"additionalInfo": {
"channelId": "EMONEY_DANA",
"acquirerId": "DANA",
"custIdMerchant": "UATDANAO1",
"accountType": "EMONEY",
"lineItems": [
{
"name": "baju",
"price": "10000.00",
"quantity": 1
}
],
"origin": {
"source": "direct",
"system": "mid-jokul-checkout-system",
"product": "CHECKOUT",
"apiFormat": "SNAP"
}
}
}Success
{
"responseCode": "2005600",
"approvalCode": "201039000200",
"responseMessage": "Request has been processed successfully"
}2. Refund 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)
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
2023122000000002e92112131Original 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
POST /v1.0/debit/notify HTTP/1.1
Host: {api-domain}
X-TIMESTAMP: 2020-12-21T07:56:11.000Z
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
X-PARTNER-ID: 821508239190
X-EXTERNAL-ID: 418075533589
X-DEVICE-ID: 95221
Authorization-customer: Bearer fa8sjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE2OTgwNTA3NDMsImlzcyI6IkRPS1UiLCJjbGllbnRJZCI6IkJSTi0wMjExLTE2OTY5MTk2NTE5MTgifQ.x-D5VlK6TlVZbLPUSCr-Gbfgh4tnp0QDJmedYFHJGHFjg1c4x39pszU4sLvRhr0Jk0vKdMIzxUZeNhKoesWqDJitnG3kfrNZNsMb_WYUC0tJW91onXzYOKXiTgsHwRNFoWPQHlXIEtT3RQm-SRlCpk_E0gsavgkQn2-kbJEBnPhIs4eKg5IUY9GYi4hRr-_GHsudDl8sd2B5UBB_rHYq36BRmLXH7i7MQADHPsB1ktPVgk3ZWF0jebEjI-lJ88p-omL1vQNvRseXej2HKBa9chGLmPDvXYBQaRmmstHz-tv1boFrHfwsHJebcUec-i3WE1vMvP_3EPXdbqb45N4ciQ
Content-Type: application/json
Accept: */*
Content-Length: 578
{
"originalPartnerReferenceNo": "INVALLO201223002",
"originalReferenceNo": "2023122000000002e92112131",
"originalExternalId": "660156703",
"latestTransactionStatus": "00",
"transactionStatusDesc": "Success",
"amount": {
"value": "10000.00",
"currency": "IDR"
},
"additionalInfo": {
"channelId": "EMONEY_OVO_SNAP",
"channel": "EMONEY_OVO_SNAP",
"acquirerId": "OVO",
"custIdMerchant": "UATOVOO1",
"accountType": "EMONEY",
"refundNo": "REF-0001",
"refundAmount": {
"value": "10000.00",
"currency": "IDR"
},
"partnerRefundNo": "DKOPISR202506241950511041976479579152316",
"origin": {
"apiFormat": "SNAP"
},
"paymentType": "SALE"
}
}Success
{
"responseCode": "2005600",
"approvalCode": "201039000200",
"responseMessage": "Request has been processed successfully"
}Last updated
Was this helpful?