Create new Virtual Account

Virtual Accounts are virtual bank accounts that can be created and assigned to your customers and act as medium to receive payments where your customers will pay via Bank Transfer.

Body Parameter
Type
Required
Description

external_id

String

yes

An ID of your choice. Often it is unique identifier like a phone number, email or transaction ID.

Characters: Special and alphanumeric Minimum character: 1 character Maximum characters: 950 characters

bank_code

String

yes

Available bank codes: BCA, BNI, BRI, BJB, BSI, CIMB, DBS, MANDIRI, PERMATA, SAHABAT_SAMPOERNA

name

String

yes

Name of user/virtual account, - this will be displayed in the bank's user interface, e.g. ATM confirmation screens. Note that this field can only contain letters and spaces and has length restriction depending on the banks. And also cannot contains name from bank/institution/government.

Characters Only alphabet. For BCA Aggregator, alphabet and number are allowed. Minimum length 1 character, except BCA the minimum length is 3 characters

Note:

  • For Individual account type, VA name is not customizable and will always follow your business name.

  • BNI VA name will be included a prefix of "XDT-" in the response. This prefix is mandatory from BNI.

virtual_account_number

String

no

You can assign specific Virtual Account number using this parameter. If you do not send one, one will be picked at random. Make sure the number you specify is within your Virtual Account range. Check your Virtual Account range in Virtual Account Settings. API will throw error if you include merchant code (first 4 or 5 digits of your VA range, ie 26215 for BRI). Example: If your BRI Virtual Account range: 26215 9999000001 - 26215 9999999999, request virtual_account_number: 9999100101 will be accepted as the value is within VA range, while virtual_account_number: 262159999100101 will throw VIRTUAL_ACCOUNT_NUMBER_OUTSIDE_RANGE Note: Your VA range in TEST and LIVE mode might be different. When going live, double check and adjust your request to follow the respective VA range

is_single_use

boolean

no

There are 2 types of Virtual Account:

  • Single-use Virtual Account (is_single_use: true) can only be paid once. Used VA number can be recreated for other customer/invoice/transaction

  • Multiple-use Virtual Account (is_single_use: false) allows your customer to pay to the same Virtual Account continuously

is_closed

boolean

no

There are 2 types of Virtual Account amount: open or closed amount

  • Open amount means your customer can pay any amount to the Virtual Account

  • Closed amount means your customer can only pay amount specified by you. Payment will be rejected if attempted payment amount deviates from the amount you specified. Specify the amount using expected_amount parameter below

expected_amount

number

no

Required amount to be paid by your customer for closed Virtual Account. For MANDIRI,BNI,BJB,BRI,BSI, and SAHABAT_SAMPOERNA:

  • Minimum amount: IDR 1

  • Maximum amount: IDR 50,000,000,000

For PERMATA:

  • Minimum amount: IDR 1

  • Maximum amount: IDR 9,999,999,999

For BCA:

  • Minimum amount: IDR 10,000

  • Maximum amount: IDR 999,999,999,999

For DBS:

  • Minimum amount: USD 1.00

  • Maximum amount: USD 50,000,000,000.00

min_amount

number

no

Minimum amount to be paid by your customer for open Virtual Account, it should use an amount above the minimum amount from the bank. Currently only available for BCA and CIMB.

max_amount

number

no

Maximum amount to be paid by your customer for open Virtual Account, it should use an amount below the maximum amount from the bank. Currently only available for BCA and CIMB.

suggested_amount

number

no

The suggested amount you want to assign Note: Suggested amounts is the amounts that can see as a suggestion, but user can still put any numbers (only supported for BRI, BSI, and Mandiri)

expiration_date

string

no

ISO8601 timestamp of Virtual Account expiration time

Timezone: UTC+0

description

string

no

Description for the Virtual Account. Available only for BRI and BSI

Characters Special and alphanumeric Minimum length 1 character

body JSON
{
    "external_id" :"va_0017",
    "bank_code" : "BNI",
    "name": "customer",
    "is_single_use" : true,
    "expected_amount": 50000
}

POST https://us-central1-appgregator.cloudfunctions.net/xendit/va/create/

Query Parameters

Name
Type
Description

name*

String

ft-4

connection_name*

String

xendit-sanbox-1

Headers

Name
Type
Description

x-api-key*

String

U2Fsd...

{
    "is_closed": false,
    "status": "PENDING",
    "currency": "IDR",
    "owner_id": "6279ce4495d10c9afc3171b8",
    "external_id": "va_0017",
    "bank_code": "BNI",
    "merchant_code": "8808",
    "name": "XDT-aplikasi keuangan",
    "account_number": "8808999924281863",
    "expected_amount": 50000,
    "is_single_use": true,
    "expiration_date": "2053-11-10T17:00:00.000Z",
    "id": "636dfd5bc1cb35297c3ec52a"
}
curl --location --request POST 'https://us-central1-appgregator.cloudfunctions.net/xendit/va/create?name=ft-4&connection_name=xendit-sanbox-1' \
--header 'x-api-key: U2Fsd...' \
--header 'Content-Type: application/json' \
--data-raw '{
    "external_id" :"va_0017",
    "bank_code" : "BNI",
    "name": "customer",
    "is_single_use" : true,
    "expected_amount": 50000
}'

Last updated