Text Link
Create VA
Text Link
VA Aggregator Callback
Text Link
Get VA Info
Text Link
Update VA
Text Link
Deactivate VA
Text Link
Simulate Staging Callback
Text Link
VA Bank Codes
Text Link
VA Status
Text Link
VA Response Codes

Create VA

Use this API to create new VA number

Endpoint:

[Production] POST https://partner.danarapay.com/api/generate-static-va

[Staging] POST https://api-stg.danarapay.com/api/generate-static-va

Request

Parameter Type Required Description
partner_user_id string TRUE
Partner unique identifier for specific user
bank_code string TRUE
Bank code which the VA number will be generated. List of eligible bank codes: "002" (BRI), "008" (Mandiri), "009" (BNI), "013" (Permata), "014" (BCA), "022" (CIMB)
amount numeric FALSE
The amount your user must paid to complete the transaction, if is_open is false, amount is required. (default = 0).
is_open boolean FALSE
If set to true means the VA number can accept any amount and the field amount can be optional. If set to false means the VA number only accept the specified amount in the field amount. Therefore, if you set is_open to false, you must specify amount field. (default = TRUE)
is_single_use boolean FALSE
If set to true means that the VA number should be closed once there is a successful payment that is being made to this VA. (default = FALSE)
expiration_time numeric FALSE
The expiration time of the VA in minutes, e.g If VA want to be expired after 5 minutes, you just have to set expiration_time to 5. If empty VA will be expired in 24 hour.
is_lifetime boolean FALSE
If it is set to FALSE (default) then VA will expire based on the expiration time. Otherwise, it will remain active.
username_display string TRUE
Customizable VA display name that will be seen by user (min. 3 characters).
email string FALSE
Email of user, using email standard format.
full_name string FALSE
Fill with the name of end-user that will pay this transaction.
trx_expiration_time numeric FALSE
Transaction expiration time in minutes, e.g If Transaction want to be expired after 5 minutes, you just have to set expiration_time to 5. If empty transaction expiration time will be the same with va expiration time.
partner_trx_id string FALSE
Partner unique Transaction ID of a VA
trx_counter string FALSE
Transaction counter to limit number of transaction that can be receive by va number, if empty will be use default value -1 for multiple use va, and 1 for single use va. If counter reach zero, va cannot be inquiry or accept payment.

Response

Parameter Type Nullable Description
amount numeric FALSE
Amount of the VA transaction
va_number string FALSE
Generated VA number
id string FALSE Unique VA ID
partner_user_id string FALSE
Partner user ID that you defined in the request parameter
bank_code string FALSE
Bank code which the VA number will be generated. List of eligible bank codes: "002" (BRI), "008" (Mandiri), "009" (BNI), "013" (Permata), "014" (BCA), "022" (CIMB)
is_open boolean FALSE
True means VA number can accept any amount, False means VA number only accept the specified amount in the field amount
is_single_use boolean FALSE
True means that this VA should be closed/complete once there is a successful payment that is being made to this VA
expiration_time numeric FALSE
Expiration time of VA on Unix timestamp in milliseconds, -1 means no expiration time
va_status string FALSE
Status of VA, see VA Status
username_display string FALSE
Customizable VA display name that will be seen by user (min. 3 characters).
trx_expiration_time numeric FALSE
Transaction expiration time on Unix timestamp in milliseconds, -1 means no expiration time
partner_trx_id string TRUE
Partner unique Transaction ID of a VA. This parameter will only be sent if end user fill the data
trx_counter string FALSE
Transaction counter to limit number of transaction that can be receive by va number, if empty will be use default value -1 for multiple use va, and 1 for single use va. If counter reach zero, va cannot be inquiry or accept payment
counter_incoming_payment numeric FALSE
Count total incoming payment of VA
full_name string FALSE
If full_name is needed when creating the transaction, the inputted full_name value at creation will be shown here. This parameter will only be sent if the value inputted in creation request. Only some VA banks required this parameter.
{
  "partner_user_id": "e8df1d97-56c2-4fcf-9aa6-0b42d688ba7b",
  "bank_code": "002",
  "amount": 20000,
  "is_open": false,
  "is_single_use": true,
  "expiration_time": 30,
  "is_lifetime": false,
  "username_display": "johndoe",
  "trx_expiration_time": 30,
  "partner_trx_id": "91065e08-be93-4970-b0db-e10c0e3dac42"
}
Request Samples
200
{
  "status": {
    "code": "000",
    "message": "Success"
  },
  "amount": 20000,
  "va_number": "910306000000000028",
  "id": "45a8acac-aafc-40b8-b09c-99527a676f2b",
  "bank_code": "002",
  "partner_user_id": "e8df1d97-56c2-4fcf-9aa6-0b42d688ba7b",
  "is_open": false,
  "is_single_use": true,
  "expiration_time": 30,
  "va_status": "WAITING_PAYMENT",
  "username_display": "johndoe",
  "trx_expiration_time": 30,
  "partner_trx_id": "91065e08-be93-4970-b0db-e10c0e3dac42",
  "trx_counter": 1,
  "counter_incoming_payment": 0,
  "full_name": "Jane Doe"
}
500
{
  "status": {
    "code": "500",
    "message": "Internal server error"
  }
}
Response Samples

VA Aggregator Callback

Once user successfully do the payment, our system will make a callback via HTTP POST request to your system

Callback for Delayed Settlement (Non-Real Time Settlement)

If your settlement is non-real time, for every transaction whose payment method is settled H+>0 from the time of transaction, you will receive two callbacks with details as follows:

1st Callback -> To be sent after your customer successfully executes the transaction. For example, if your customer executes the transaction on 11 May 2021 at 14:00:00, that is also when we send the 1st Callback to you. In the 1st callback, the settlement status is set to WAITING (because it is not yet settled to your Account Statement balance)

2nd Callback -> To be sent after the settlement status is changed from WAITING into SUCCESS. For example, if the settlement status is changed into SUCCESS on 12 May 2021 at 15:00:00, that is also when we send the 2nd Callback to you. In the 2nd callback, the settlement status is SUCCESS

Callback Parameters

Parameter Type Nullable Description
va_number string FALSE
Generated VA number
amount numeric FALSE
Amount of VA transaction
partner_user_id string FALSE
Unique ID provided by partner for specific user
success boolean FALSE
The status of the payment and it is always set to true
tx_date string FALSE
Incoming payment transaction date, format dd/MM/yyyy'T'HH:mm:ss.SSSZZZZ
username_display string FALSE
Customizable VA display name that will be seen by user (min. 3 characters).
trx_expiration_date string FALSE
Transaction expiration date, format dd/MM/yyyy'T'HH:mm:ss.SSSZZZZ. For VA Lifetime, the value of this parameter will be null/empty
partner_trx_id string TRUE
Unique Transaction ID provided by partner on creation or update VA. This parameter will be empty if partner leave this parameter empty when creating or updating the VA
trx_id string TRUE
Unique ID of incoming payment
settlement_time string TRUE
The timestamp (in UTC+7) indicating when the fund will be settled to partner’s account statement, format dd/MM/yyyy'T'HH:mm:ss.SSSZZZZ
settlement_status string TRUE
The status of the settlement
full_name string TRUE
If full_name is needed when creating the transaction, the inputted full_name value at creation will be shown here
{
  "va_number": "910306000000000028",
  "amount": 20000,
  "partner_user_id": null,
  "success": "true",
  "tx_date": "2025-07-01 20:12:30",
  "username_display": "johndoe",
  "trx_expiration_date": "2025-07-01 20:15:00",
  "partner_trx_id": "91065e08-be93-4970-b0db-e10c0e3dac42",
  "trx_id": "2da3c897-fc31-4bd9-b729-7a7a2ead29d8",
  "settlement_time": "2025-07-02 15:00:00",
  "settlement_status": "WAITING",
  "full_name": "Jane Doe"
}
Request Samples
Response Samples

Get VA Info

Get VA info using Unique VA ID

Endpoint:

[Production] POST https://partner.danarapay.com/api/static-virtual-account/{id}

[Staging] POST https://api-stg.danarapay.com/api/static-virtual-account/{id}

Path Parameters

Parameter Type Required Description
id string TRUE
Unique VA id, you can get this once you success created VA

Response

Parameter Type Nullable Description
amount numeric FALSE
Amount of the VA transaction
va_number string FALSE
Generated VA number
id string FALSE Unique VA ID
partner_user_id string FALSE
Partner user ID that you defined in the request parameter
bank_code string FALSE
Bank code which the VA number will be generated. List of eligible bank codes: "002" (BRI), "008" (Mandiri), "009" (BNI), "013" (Permata), "014" (BCA), "022" (CIMB)
is_open boolean FALSE
True means VA number can accept any amount, False means VA number only accept the specified amount in the field amount
is_single_use boolean FALSE
True means that this VA should be closed/complete once there is a successful payment that is being made to this VA
expiration_time numeric FALSE
Expiration time of VA on Unix timestamp in milliseconds, -1 means no expiration time
va_status string FALSE
Status of VA, see VA Status
username_display string FALSE
Customizable VA display name that will be seen by user (min. 3 characters).
trx_expiration_time numeric FALSE
Transaction expiration time on Unix timestamp in milliseconds, -1 means no expiration time
partner_trx_id string TRUE
Partner unique Transaction ID of a VA. This parameter will only be sent if end user fill the data
trx_counter string FALSE
Transaction counter to limit number of transaction that can be receive by va number, if empty will be use default value -1 for multiple use va, and 1 for single use va. If counter reach zero, va cannot be inquiry or accept payment
counter_incoming_payment numeric FALSE
Count total incoming payment of VA
full_name string FALSE
If full_name is needed when creating the transaction, the inputted full_name value at creation will be shown here. This parameter will only be sent if the value inputted in creation request. Only some VA banks required this parameter.
Request Samples
200
{
  "status": {
    "code": "000",
    "message": "Success"
  },
  "amount": 20000,
  "va_number": "910306000000000028",
  "id": "45a8acac-aafc-40b8-b09c-99527a676f2b",
  "bank_code": "002",
  "partner_user_id": "e8df1d97-56c2-4fcf-9aa6-0b42d688ba7b",
  "is_open": false,
  "is_single_use": true,
  "expiration_time": 30,
  "va_status": "WAITING_PAYMENT",
  "username_display": "johndoe",
  "trx_expiration_time": 30,
  "partner_trx_id": "91065e08-be93-4970-b0db-e10c0e3dac42",
  "trx_counter": 1,
  "counter_incoming_payment": 0,
  "full_name": "Jane Doe"
}
500
{
  "status": {
    "code": "500",
    "message": "Internal server error"
  }
}
Response Samples

Update VA

Update VA using unique VA ID

Endpoint:

[Production] POST https://partner.danarapay.com/api/static-virtual-account/{ID}

[Staging] POST https://api-stg.danarapay.com/api/static-virtual-account/{ID}

Request

Parameter Type Required Description
amount numeric FALSE
The amount your user must paid to complete the transaction.
is_single_use boolean FALSE
True means that this VA should be closed once there is a successful payment that is being made to this VA.
expiration_time numeric FALSE
Expiration time of the VA in minutes, if empty VA will be expired in 24 hour. If you want to deactivate/cancel the VA, pass "0" in the expiration_time
username_display string FALSE
Customizable VA display name that will be seen by user (min. 3 characters).
email string FALSE
Email of user, using email standard format.
is_lifetime boolean FALSE
True means that this VA should be closed once there is a successful payment that is being made to this VA.
trx_expiration_time numeric FALSE
Transaction expiration time in minutes, e.g If Transaction want to be expired after 5 minutes, you just have to set expiration_time to 5. If you want to make the trx_expiration_time expired, pass "0" in the trx_expiration_time
partner_trx_id string FALSE
Partner unique Transaction ID of a VA
trx_counter string FALSE
Update transaction counter to limit number of transaction that can be receive by va number

 

Response

Parameter Type Nullable Description
amount numeric FALSE
Amount of the VA transaction
va_number string FALSE
Generated VA number
id string FALSE Unique VA ID
partner_user_id string FALSE
Partner user ID that you defined in the request parameter
bank_code string FALSE
Bank code which the VA number will be generated. List of eligible bank codes: "002" (BRI), "008" (Mandiri), "009" (BNI), "013" (Permata), "014" (BCA), "022" (CIMB)
is_open boolean FALSE
True means VA number can accept any amount, False means VA number only accept the specified amount in the field amount
is_single_use boolean FALSE
True means that this VA should be closed/complete once there is a successful payment that is being made to this VA
expiration_time numeric FALSE
Expiration time of VA on Unix timestamp in milliseconds, -1 means no expiration time
va_status string FALSE
Status of VA, see VA Status
username_display string FALSE
Customizable VA display name that will be seen by user (min. 3 characters).
trx_expiration_time numeric FALSE
Transaction expiration time on Unix timestamp in milliseconds, -1 means no expiration time
partner_trx_id string TRUE
Partner unique Transaction ID of a VA. This parameter will only be sent if end user fill the data
trx_counter string FALSE
Transaction counter to limit number of transaction that can be receive by va number, if empty will be use default value -1 for multiple use va, and 1 for single use va. If counter reach zero, va cannot be inquiry or accept payment
counter_incoming_payment numeric FALSE
Count total incoming payment of VA
full_name string FALSE
If full_name is needed when creating the transaction, the inputted full_name value at creation will be shown here. This parameter will only be sent if the value inputted in creation request. Only some VA banks required this parameter.
{
  "amount": 20000,
  "is_single_use": true,
  "expiration_time": 30,
  "username_display": "johndoe",
  "email": "sender@email.com",
  "is_lifetime": false,
  "trx_expiration_time": 30,
  "partner_trx_id": "91065e08-be93-4970-b0db-e10c0e3dac42",
  "trx_counter": 1
}
Request Samples
200
{
  "status": {
    "code": "000",
    "message": "Success"
  },
  "amount": 20000,
  "va_number": "910306000000000028",
  "id": "45a8acac-aafc-40b8-b09c-99527a676f2b",
  "bank_code": "002",
  "partner_user_id": "e8df1d97-56c2-4fcf-9aa6-0b42d688ba7b",
  "is_open": false,
  "is_single_use": true,
  "expiration_time": 30,
  "va_status": "WAITING_PAYMENT",
  "username_display": "johndoe",
  "trx_expiration_time": 30,
  "partner_trx_id": "91065e08-be93-4970-b0db-e10c0e3dac42",
  "trx_counter": 1,
  "counter_incoming_payment": 0,
  "full_name": "Jane Doe"
}
500
{
  "status": {
    "code": "500",
    "message": "Internal server error"
  }
}
Response Samples

Deactivate VA

To deactivate a VA number, use API Update VA with specific request parameter explained below.

Endpoint:

[Production] PUT https://partner.danarapay.com/api/static-virtual-account/{vaId}

[Staging] PUT https://api-stg.danarapay.com/api/static-virtual-account/{vaId}

Request

Parameter Type Required Description
expiration_time numeric TRUE
To deactivate/cancel the VA, pass "0" in the expiration_time.

Response

Parameter Type Nullable Description
amount numeric FALSE
Amount of the VA transaction
va_number string FALSE
Generated VA number
id string FALSE Unique VA ID
partner_user_id string FALSE
Partner unique ID for specific user
bank_code string FALSE
Bank code which the VA number will be generated. List of eligible bank codes: "002" (BRI), "008" (Mandiri), "009" (BNI), "013" (Permata), "014" (BCA), "022" (CIMB)
is_open boolean FALSE
True means VA number can accept any amount, False means VA number only accept the specified amount in the field amount
is_single_use boolean FALSE
True means VA number can accept any amount, False means VA number only accept the specified amount in the field amount
expiration_time numeric FALSE
Expiration time of VA on Unix timestamp in milliseconds, -1 means no expiration time
va_status string FALSE
Status of VA, see VA Status
username_display string FALSE
Customizable VA display name that will be seen by user (min. 3 characters).
trx_expiration_time numeric FALSE
Transaction expiration time on Unix timestamp in milliseconds, -1 means no expiration time
partner_trx_id string TRUE
Partner unique Transaction ID of a VA. This parameter will only be sent if end user fill the data
trx_counter string FALSE
Transaction counter to limit number of transaction that can be receive by va number, if empty will be use default value -1 for multiple use va, and 1 for single use va. If counter reach zero, va cannot be inquiry or accept payment
counter_incoming_payment numeric FALSE
Count total incoming payment of VA
email string FALSE
This parameter will only be sent if the value inputted in creation request
full_name string FALSE
If full_name is needed when creating the transaction, the inputted full_name value at creation will be shown here. This parameter will only be sent if the value inputted in creation request. Only some VA banks required this parameter.
{
  "expiration_time": 0
}
Request Samples
200
{
  "status": {
    "code": "000",
    "message": "Success"
  },
  "amount": 20000,
  "va_number": "910306000000000028",
  "id": "45a8acac-aafc-40b8-b09c-99527a676f2b",
  "bank_code": "002",
  "partner_user_id": "e8df1d97-56c2-4fcf-9aa6-0b42d688ba7b",
  "is_open": false,
  "is_single_use": true,
  "expiration_time": 30,
  "va_status": "WAITING_PAYMENT",
  "username_display": "johndoe",
  "trx_expiration_time": 30,
  "partner_trx_id": "91065e08-be93-4970-b0db-e10c0e3dac42",
  "trx_counter": 1,
  "counter_incoming_payment": 0,
  "full_name": "Jane Doe"
}
500
{
  "status": {
    "code": "500",
    "message": "Internal server error"
  }
}
Response Samples

Simulate Staging Callback

STAGING environment only

Use this endpoint to simulate the VA payment on staging environment.

Endpoint:

[Staging] POST https://api-stg.danarapay.com/api/va-aggregator/simulate-callback

Request

Parameter Type Required Description
id string TRUE
Unique VA identifier given in creation response as id
amount numeric TRUE
The payment amount

Response

Parameter Type Nullable Description
success boolean FALSE
The value will be true for successfull simulate callback process
{
  "id": "aeaedae8-7e92-4c14-b923-b944667190902",
  "amount": 20000
}
Request Samples
200
{
  "error": null,
  "success": true
}
500
{
  "status": {
    "code": "500",
    "message": "Internal server error"
  }
}
Response Samples

VA Bank Codes

The following bank codes are available for the VA aggregator service:

Bank Name Bank Code Open Amount Close Amount Min. Amount Max. Amount Lifetime Capability Maximum Expiration Time Intrabank Payment / On Us Payment
Interbank Payment / Off Us Payment
BRI 002 10.000 500.000.000 -
Mandiri 008 10.000 50.000.000 -
BNI 009 10.000 50.000.000 -
Permata 013 10.000 50.000.000 -
BCA 014 10.000 50.000.000 -
CIMB 022 10.000 50.000.000 -
BSS 523 10.000 50.000.000 -

Request Samples
Response Samples

VA Status

Here are the possible statuses for a Virtual Account:

• WAITING_PAYMENT: The VA is active and can receive a payment.

• PAYMENT_DETECTED: There's an incoming payment to the VA Number.

• EXPIRED: The VA is expired. You cannot accept or update a VA with this status.

• STATIC_TRX_EXPIRED: The transaction is expired. If the VA has unlimited lifetime, you can create a new transaction by updating the VA info.

• COMPLETE: The VA is closed after receiving an incoming payment. You cannot accept or update a VA with this status. This status is only for Static VAs with is_single_use set to true.

Request Samples
Response Samples

VA Response Codes

Below is the list of response codes for the VA aggregator APIs:

Code Descriptions
000
Response success without error
203
Request is Rejected (Duplicate partner tx id)
207
Request is Rejected (Request IP address is not registered)
208
Request is Rejected (API key is not valid)
211
Request is Rejected (Bank code is not available for this service)
212
Request is Rejected (Given amount is less than the allowed value for static VA)
213
Request is Rejected (Given amount is greater than the allowed value for static VA)
214
Request is Rejected (Failed to generate static VA)
215
Request is Rejected (Amount type is not supported for the requested bank code)
216
Request is Rejected (VA id is empty)
217
Request is Rejected (VA number is still active for this partner user id)
219
Request is Rejected (Virtual account is not enabled for this bank)
226
Request is rejected (Transaction expiry time exceeds VA expiry time)
246
Request is rejected (Failed update VA)
261
Request is rejected (VA name detected as random string)
999
Internal Server Error
Request Samples
Response Samples