BSS Virtual Account

DOKU has partnered with various banks and one of them is BSS to provide Virtual Account Payment. Learn more about how DOKU can help you integrate with BSS Virtual Account here.

Integration methods

There are two methods to integrate with BSS VA:

  1. 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.)

    1. DOKU Generated Payment Code (DGPC): The VA number is generated by DOKU. Suitable for e-commerce business model.

    2. Merchant Generated Payment Code (MGPC): The VA number is generated by Merchant. Suitable for top up business model.

  2. 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 BSS 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

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

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

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

Learn what are the response codes!

Pro Tips!

  1. You can also show payment instruction link to your customer by using additionalInfo.howToPayPage

  2. 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

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

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

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


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 BSS 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 28 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

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

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 = 0and totalAmount.currency = IDR DOKU. Here is the sample:

{
    "partnerServiceId": "   92400",
        ...
    "totalAmount": {
        "value": "0",
        "currency": "IDR"
      },
      ...
    "virtualAccountTrxType": "O",
    ...
}

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.

{
    "partnerServiceId": "   92400",
        ...
    "totalAmount": {
        "value": "0",
        "currency": "IDR"
      },
    "additionalInfo": {
        "channel" : "VIRTUAL_ACCOUNT_BSS",
        "virtualAccountConfig" : {
            "minAmount" : "10000.00"
            "maxAmount" : "5000000.00"
            }
        },
    "virtualAccountTrxType": "O" / "V",
    ...
}

Last updated