BCA Virtual Account
DOKU has partnered with various banks and one of them is BCA to provide Virtual Account Payment. Learn more about how DOKU can help you integrate with BCA Virtual Account here.
Integration methods
There are two methods to integrate with BCA VA:
Create VA: 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 Payment Code (DGPC): The VA number is generated by DOKU. Suitable for e-commerce business model.
Merchant Generated Payment Code (MGPC): The VA number is generated by Merchant. Suitable for top up business model.
Direct Inquiry (DIPC): The VA number is registered on merchant side and DOKU will forward Acquirer inquiry request to merchant side when the customer make payment at the acquirer channel (ATM, mobile banking, internet banking, etc.)
Integration Steps
Precondition
Get Token API
As client who hit DOKU's API such as Create VA, you need to obtain an access token first. Learn how to do it in this section.
Generate Signature
X- SIGNATURE
is a security parameter that needs to be generated on merchant's Backend to verify the request authenticity.
So, it's very crucial for merchant to generate the X-SIGNATURE. Learn how to do it in this section
Here is the overview of how to integrate with Virtual Account:
1. Create VA
To create VA, you will need to hit this API through your Backend:
API Endpoint
Type | Value |
---|---|
Service Code | 27 |
HTTP Method | POST |
API Endpoint Sandbox | |
API Endpoint Production | |
Path |
Here is the sample request header, request body and response body for BCA VA
a. DOKU Generate Payment Code
Check this flow diagram to get know about this method
Request Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
X- TIMESTAMP | String | Mandatory | Client's current local time in yyyy-MM-ddTHH:mm:ssZ format |
X-SIGNATURE | String | Mandatory | Algorithm symmetric signature HMAC_SHA2512(clientSecret, stringToSign) Refer to this Docs |
X-PARTNER-ID | String | Mandatory | Unique ID for a partner (Merchant Client ID ) |
X-EXTERNAL-ID | String | Mandatory | Numeric string. Reference number that should be unique in the same day ( request-id) |
CHANNEL-ID | String | Mandatory | channel ID for VA. Please fill with H2H (Host-To-Host ) |
Authorization | String | Mandatory | Bearer "access token" obtainedn from Get B2B Token API , refer to this Docs |
Learn what are the response codes!
b. Merchant Generate Payment Code
Check this flow diagram to get know about this method
Request Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
X- TIMESTAMP | String | Mandatory | Client's current local time in yyyy-MM-ddTHH:mm:ssZ format |
X-SIGNATURE | String | Mandatory | Algorithm symmetric signature HMAC_SHA2512(clientSecret, stringToSign) Refer to this Docs |
X-PARTNER-ID | String | Mandatory | Unique ID for a partner (Merchant Client ID ) |
X-EXTERNAL-ID | String | Mandatory | Numeric string. Reference number that should be unique in the same day ( request-id) |
CHANNEL-ID | String | Mandatory | channel ID for VA. Please fill with H2H (Host-To-Host ) |
Authorization | String | Mandatory | Bearer "access token" obtainedn from Get B2B Token API , refer to this Docs |
Learn what are the response codes!
Pro Tips!
You can also show payment instruction link to your customer by using
additionalInfo.howToPayPage
If you wish to customize the UI for the payment instruction, you can use the
additionalInfo.howToPayApi
c. Display Virtual Account
You can display the payment code to your customer by using virtualAccountData.virtualAccountNo
that you retrieved from the API response.
d. 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 .
e. Hit DOKU Check Status API
If you do not receive notifications from DOKU due to some issue, you can perform an API status check on the DOKU side to determine the updated transaction status. See the detailed request and response here Check Status API.
f. Delete Payment Code
If you wish to delete your virtual account, you can do that by hitting the API with this API :
Request Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
X- TIMESTAMP | String | Mandatory | Client's current local time in yyyy-MM-ddTHH:mm:ssZ format |
X-SIGNATURE | String | Mandatory | Algorithm symmetric signature HMAC_SHA2512(clientSecret, stringToSign) Refer to this Docs |
X-PARTNER-ID | String | Mandatory | Unique ID for a partner (Merchant Client ID ) |
X-EXTERNAL-ID | String | Mandatory | Numeric string. Reference number that should be unique in the same day ( request-id) |
CHANNEL-ID | String | Mandatory | channel ID for VA. Please fill with H2H (Host-To-Host ) |
Authorization | String | Mandatory | Bearer "access token" obtainedn from Get B2B Token API , refer to this Docs |
g. Update Payment Code
If you wish to update your virtual account, you can do that by hitting the API with this API :
Request Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
X- TIMESTAMP | String | Mandatory | Client's current local time in yyyy-MM-ddTHH:mm:ssZ format |
X-SIGNATURE | String | Mandatory | Algorithm symmetric signature HMAC_SHA2512(clientSecret, stringToSign) Refer to this Docs |
X-PARTNER-ID | String | Mandatory | Unique ID for a partner (Merchant Client ID ) |
X-EXTERNAL-ID | String | Mandatory | Numeric string. Reference number that should be unique in the same day ( request-id) |
CHANNEL-ID | String | Mandatory | channel ID for VA. Please fill with H2H (Host-To-Host ) |
Authorization | String | Mandatory | Bearer "access token" obtainedn from Get B2B Token API , refer to this Docs |
2. Direct Inquiry
Type | Value |
---|---|
Service Code | 24 |
HTTP Method | POST |
API Endpoint Sandbox | |
API Endpoint Production | |
Path |
Here is the overview of how to integrate Direct Inquiry BCA VA :
Check this flow to diagram to get know about this API :
To get Inquiry Request from DOKU, you will need to hit this API through your Backend:
a. Setup Inquiry URL on DOKU Dashboard
To receive the inquiry request from DOKU. You must set your Inquiry URL
to DOKU. Please contact our team for the setup.
Please inform the Inquiry URL
for Sandbox environment and Production environment.
b. Generate Payment Code on your end
Generate payment is done in your system. The payment code length maximum is 23
digits.
c. Receive Inquiry Request from DOKU
Here is the sample request header, request body from DOKU
Request Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
X- TIMESTAMP | String | Mandatory | Client's current local time in yyyy-MM-ddTHH:mm:ssZ format |
X-SIGNATURE | String | Mandatory | Algorithm symmetric signature HMAC_SHA2512(clientSecret, stringToSign) Refer to this Docs |
X-PARTNER-ID | String | Mandatory | Unique ID for a partner (Merchant Client ID ) |
X-EXTERNAL-ID | String | Mandatory | Numeric string. Reference number that should be unique in the same day ( request-id) |
CHANNEL-ID | String | Mandatory | channel ID for VA. Please fill with H2H (Host-To-Host ) |
Authorization | String | Mandatory | Bearer "access token" obtainedn from Get B2B Token API , refer to this Docs |
d. Acknowledge payment notification
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 .
e. Hit DOKU Check Status API
If you do not receive notifications from DOKU due to some issue, you can perform an API status check on the DOKU side to determine the updated transaction status. See the detailed request and response here Check Status API.
Additional Feature
Open Amount
DOKU supports open payment meaning that your customer can input their own payment amount. To use open amount, you need to set virtualAccountTrxType
= O and you need to send totalAmount.value
= 0
and totalAmount.currency
= IDR
DOKU. Here is the sample:
Bill Variable Amount
DOKU supports bill variable amount payment meaning that you can set the amount as billing information to your customer and your customer can input their own payment amount. To use open amount, you need to set virtualAccountTrxType
= V and you need to send totalAmount.value
= based on your billing amount and totalAmount.currency
= IDR
DOKU. Here is the sample:
Limit Amount
DOKU supports limit amount payment meaning that your customer can input their own payment amount at the range that you defined. Limit amount only available when virtualAccountTrxType
type is O
and V.
To use limit amount, you need to set virtualAccountConfig.minAmount
>= 0 or virtualAccountConfig.maxAmount
> 0 to DOKU.
Last updated