Danamon VA Guide
DOKU has partnered with various banks and one of them is Danamon to provide Virtual Account Payment. Learn more about how DOKU can help you integrate with Danamon Virtual Account here.
Integration methods
There are two methods to integrate with Danamon VA:
- Register: The VA number will be registered to DOKU and Acquirer will inquiry to our side when the customer make payment at the acquirer channel (ATM, mobile banking, internet banking, etc.)
- DOKU Generated VA: The VA number is generated by DOKU. Suitable for e-commerce business model.
- Merchant Generated VA: The VA number is generated by Merchant. Suitable for top up business model.
Integration steps
- DOKU Generate VA
- Merchant Generate VA
Here is the overview of how to integrate with Virtual Account:
- Generate payment code (virtual account number)
- Display payment code (virtual account number)
- Acknowledge payment result
Direct API - DOKU Generated Payment Code Virtual Account Sequence Diagram
1. Generate payment code (virtual account number)
To generate payment code, you will need to hit this API through your Backend:
API Request
Type | Value |
---|---|
HTTP Method | POST |
API endpoint (Sandbox) | https://api-sandbox.doku.com/danamon-virtual-account/v2/payment-code |
API endpoint (Production) | https://api.doku.com/danamon-virtual-account/v2/payment-code |
Here is the sample of request header to generate payment code:
Client-Id: MCH-0001-10791114622547
Request-Id: d24a5644-6078-4249-8740-4a6dcd92df5a
Request-Timestamp: 2020-08-11T08:45:42Z
Signature: HMACSHA256=vl9DBTX5KhEiXmnpOD0TSm8PYQknuHPdyHSTSc3W6Ps=
Request Header Explanation
Parameter | Description |
---|---|
Client-Id | Client ID retrieved from DOKU Back Office |
Request-Id | Unique random string (max 128 characters) generated from merchant side to protect duplicate request |
Request-Timestamp | Timestamp request on UTC time in ISO8601 UTC+0 format. It means to proceed transaction on UTC+7 (WIB), merchant need to subtract time with 7. Ex: to proceed transaction on September 22th 2020 at 08:51:00 WIB, the timestamp should be 2020-09-22T01:51:00Z |
Signature | Security parameter that needs to be generated on merchant Backend and placed to the header request to ensure that the request is coming from valid merchant. Please refer to this section to generate the signature |
Here is the sample of request body to generate payment code:
{
"order": {
"invoice_number": "MINV20201231468",
"amount": 150000,
"min_amount": 0,
"max_amount": 0
},
"virtual_account_info": {
"expired_time": 60,
"reusable_status": true,
"billing_type": "FULL_PAYMENT"
},
"customer": {
"name":"Taufik Ismail",
"email":"taufik@doku.com"
},
"additional_info" : {
}
}
Request Body Explanation
Parameter | Type | Mandatory | Description |
---|---|---|---|
order.invoice_number | string | Mandatory | Generated by merchant to identify the order and must unique per request Allowed chars: alphabetic, numeric, special chars Max length: 64 |
order.amount | number | Conditional | 1. In IDR currency and without decimal. 2. Send data = 0 or data = null for OPEN_PAYMENT 3. Send data > 0 for FULL_PAYMENT or PARTIAL_PAYMENT type. Allowed chars: numeric Max length: 12 |
order.max_amount | number | Opsional | 1. In IDR currency and without decimal. 2. Send this parameter for OPEN_PAYMENT type Allowed chars: numeric Max length: 12 |
order.min_amount | number | Opsional | 1. In IDR currency and without decimal. 2. Send this parameter for OPEN_PAYMENT type Allowed chars: numeric Max length: 12 |
virtual_account_info.expired_time | number | Optional | Virtual account expiration time in minutes format Allowed chars: numeric Maximum length: 8 Default value: 60 |
virtual_account_info.reusable_status | boolean | Mandatory | For VA that can be paid more than once, set this to true Possible value: true false |
virtual_account_info.billing_type | string | Optional | Billing type is a type of feature used by merchants to determine the method of payment for their customers when they are in Inquiry. Possible value: FULL_PAYMENT , PARTIAL_PAYMENT , OPEN_PAYMENT |
customer.name | string | Mandatory | Customer name that will be displayed on acquirer channel when do inquiry Allowed chars: alphabetic, numeric, special chars Max length: 64 |
customer.email | string | Optional | Customer email Allowed chars: alphabetic, numeric, special chars Max length: 64 |
additional_info | object | Optional | Merchant can send additional data through this parameter and will be get data when notify |
API Response
After hitting the above API request, DOKU will give the response.
Type | Value |
---|---|
HTTP Status | 200 |
Result | SUCCESS |
Client-Id: MCH-0001-10791114622547
Request-Id: d24a5644-6078-4249-8740-4a6dcd92df5a
Response-Timestamp: 2020-08-11T08:45:42Z
Signature: HMACSHA256=9UPUFzOqJc47aJzD9ESOTcWg6TMsg3mqSP+DnUO8ENE=
Response Header Explanation
Parameter | Description |
---|---|
Client-Id | Same as the request |
Request-Id | Same as the request |
Response-Timestamp | Timestamp Response on UTC with format ISO8601 UTC+0 from DOKU |
Signature | Signature generated by DOKU based on the response body |
Here is the sample of response body:
{
"order": {
"invoice_number": "MINV20201231468"
},
"virtual_account_info": {
"virtual_account_number": "8889933344445555",
"how_to_pay_page": "https://sandbox.doku.com/how-to-pay/v2/danamon-virtual-account/8889933344445555",
"how_to_pay_api": "https://api-sandbox.doku.com/danamon-virtual-account/v2/how-to-pay-api/8889933344445555",
"created_date_utc": "2021-03-31T04:50:05Z",
"expired_date_utc": "2021-03-31T05:50:05Z"
}
}
Response Body Explanation
Parameter | Type | Mandatory | Description |
---|---|---|---|
order.invoice_number | string | Mandatory | Same as the request |
virtual_account_info. virtual_account_number | string | Mandatory | Generated by DOKU that will be used by customer for doing a payment through acquirer channel (eg. ATM, Internet Banking) |
virtual_account_info.how_to_pay_page | string | Optional | Page URL that merchant can use to display how customer can complete the payment process through acquirer channel (eg. ATM, Internet Banking) |
virtual_account_info.how_to_pay_api | string | Optional | URL that merchant can parse to display customized how customer can complete the payment process through accquirer channel (eg. ATM, Internet Banking) |
virtual_account_info.created_date_utc | string | Conditional | Date time of VA generated in UTC format |
virtual_account_info.expired_date_utc | string | Conditional | Date time of VA will be expired in UTC. Use this to set the expiry order on merchant side |
Pro Tips
You can also show payment instruction link to your customer by using virtual_account_info.how_to_pay_page
. If you wish to customize the UI for the payment instruction, you can use the virtual_account_info.how_to_pay_api
.
2. Display payment code (virtual account number)
You can display the payment code to your customer by using virtual_account_info.virtual_account_number
that you retrieved from the API response.
3. Acknowledge payment result
After the payment is being made by your customer, DOKU will send HTTP Notification to your defined Notification URL
. Learn how to handle the notification from DOKU:
Here is the overview of how to integrate with Virtual Account:
- Generate payment code (virtual account number)
- Display payment code (virtual account number)
- Acknowledge payment result
1. Generate payment code (virtual account number)
Direct API - DOKU Generated Payment Code Virtual Account Sequence Diagram
To generate payment code, you will need to hit this API through your Backend:
API Request
Type | Value |
---|---|
HTTP Method | POST |
API endpoint (Sandbox) | https://api-sandbox.doku.com/danamon-virtual-account/v2/merchant-payment-code |
API endpoint (Production) | https://api.doku.com/danamon-virtual-account/v2/merchant-payment-code |
Here is the sample of request header to generate payment code:
Client-Id: MCH-0001-10791114622547
Request-Id: 15022aab-444f-4b04-afa8-ddfce89432ec
Request-Timestamp: 2020-08-11T08:45:42Z
Signature: HMACSHA256=vl9DBTX5KhEiXmnpOD0TSm8PYQknuHPdyHSTSc3W6Ps=
Request Header Explanation
Parameter | Description |
---|---|
Client-Id | Client ID retrieved from DOKU Back Office |
Request-Id | Unique random string (max 128 characters) generated from merchant side to protect duplicate request |
Request-Timestamp | Timestamp request on UTC time in ISO8601 UTC+0 format. It means to proceed transaction on UTC+7 (WIB), merchant need to subtract time with 7. Ex: to proceed transaction on September 22th 2020 at 08:51:00 WIB, the timestamp should be 2020-09-22T01:51:00Z |
Signature | Security parameter that needs to be generated on merchant Backend and placed to the header request to ensure that the request is coming from valid merchant. Please refer to this section to generate the signature |
Here is the sample of request body to generate payment code:
{
"order": {
"invoice_number": "MINV20201231468",
"amount": 150000
},
"virtual_account_info": {
"virtual_account_number": "8922633344445555",
"expired_time": 60,
"reusable_status": true,
"billing_type": "FULL_PAYMENT"
},
"customer": {
"name": "Taufik Ismail",
"email": "taufik@doku.com"
},
"additional_info" : {
}
}
Request Body Explanation
Parameter | Type | Mandatory | Description |
---|---|---|---|
order.invoice_number | string | Mandatory | Generated by merchant to identify the order and must unique per request Allowed chars: alphabetic, numeric, special chars Max length: 64 |
order.amount | number | Conditional | 1. In IDR currency and without decimal. 2. Send data = 0 or data = null for OPEN_PAYMENT 3. Send data > 0 for FULL_PAYMENT or PARTIAL_PAYMENT type. Allowed chars: numeric Max length: 12 |
order.max_amount | number | Opsional | 1. In IDR currency and without decimal. 2. Send this parameter for OPEN_PAYMENT type Allowed chars: numeric Max length: 12 |
order.min_amount | number | Opsional | 1. In IDR currency and without decimal. 2. Send this parameter for OPEN_PAYMENT type Allowed chars: numeric Max length: 12 |
virtual_account_info.virtual_account_number | number | Mandatory | Generated by Merchant that will be used by customer for doing a payment through acquirer channel (eg. ATM, Internet Banking) Max Length: 16 |
virtual_account_info.expired_time | number | Optional | Virtual account expiration time in minutes format Allowed chars: numeric Maximum length: 8 Default value: 60 |
virtual_account_info.reusable_status | boolean | Mandatory | For VA that can be paid more than once, set this to true Possible value: true false |
virtual_account_info.billing_type | string | Optional | Billing type is a type of feature used by merchants to determine the method of payment for their customers when they are in Inquiry. Possible value: FULL_PAYMENT , PARTIAL_PAYMENT , OPEN_PAYMENT |
customer.name | string | Mandatory | Customer name that will be displayed on acquirer channel when do inquiry Allowed chars: alphabetic, numeric, special chars Max length: 64 |
customer.email | string | Optional | Customer email Allowed chars: alphabetic, numeric, special chars Max length: 64 |
additional_info | object | Optional | Merchant can send additional data through this parameter and will be get data when notify |
API Response
After hitting the above API request, DOKU will give the response.
Type | Value |
---|---|
HTTP Status | 200 |
Result | SUCCESS |
Client-Id: MCH-0001-10791114622547
Request-Id: 15022aab-444f-4b04-afa8-ddfce89432ec
Response-Timestamp: 2020-08-11T08:45:42Z
Signature: HMACSHA256=9UPUFzOqJc47aJzD9ESOTcWg6TMsg3mqSP+DnUO8ENE=
Response Header Explanation
Parameter | Description |
---|---|
Client-Id | Same as the request |
Request-Id | Same as the request |
Response-Timestamp | Timestamp Response on UTC with format ISO8601 UTC+0 from DOKU |
Signature | Signature generated by DOKU based on the response body |
Here is the sample of response body:
{
"order": {
"invoice_number": "INV-20210124-0001"
},
"virtual_account_info": {
"virtual_account_number": "8922633344445555",
"how_to_pay_page": "https://sandbox.doku.com/how-to-pay/v1/danamon-virtual-account/8922633344445555",
"how_to_pay_api": "https://sandbox.doku.com/danamon-virtual-account/v1/how-to-pay-api/8922633344445555",
"created_date_utc": "2020-03-31T09:58:50Z",
"expired_date_utc": "2020-03-31T15:58:50Z"
}
}
Response Body Explanation
Parameter | Type | Mandatory | Description |
---|---|---|---|
order.invoice_number | string | Mandatory | Same as the request |
virtual_account_info. virtual_account_number | string | Mandatory | Same as the request |
virtual_account_info.how_to_pay_page | string | Optional | Page URL that merchant can use to display how customer can complete the payment process through acquirer channel (eg. ATM, Internet Banking) |
virtual_account_info.how_to_pay_api | string | Optional | URL that merchant can parse to display customized how customer can complete the payment process through accquirer channel (eg. ATM, Internet Banking) |
virtual_account_info.created_date_utc | string | Conditional | Date time of VA generated in UTC format |
virtual_account_info.expired_date_utc | string | Conditional | Date time of VA will be expired in UTC. Use this to set the expiry order on merchant side |
Pro Tips
You can also show payment instruction link to your customer by using virtual_account_info.how_to_pay_page
. If you wish to customize the UI for the payment instruction, you can use the virtual_account_info.how_to_pay_api
.
2. Display payment code (virtual account number)
You can display the payment code to your customer by using virtual_account_info.virtual_account_number
that you retrieved from the API response.
3. Acknowledge payment result
After the payment is being made by your customer, DOKU will send HTTP Notification to your defined Notification URL
. Learn how to handle the notification from DOKU:
Additional features
We provide various additional features to suited your needs. Learn more here.
Split Settlement
If you are a platform or a marketplace, you can use this feature to settle the funds to your sellers or partners programmatically, save many operational efforts.
What's next?
You can test your payment through our Payment Simulator. Learn more here.