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
Response
{
"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"
}{
"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"
}{
"status": {
"code": "500",
"message": "Internal server error"
}
}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
{
"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"
}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
Response
{
"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"
}{
"status": {
"code": "500",
"message": "Internal server error"
}
}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
Response
{
"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
}{
"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"
}{
"status": {
"code": "500",
"message": "Internal server error"
}
}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
Response
{
"expiration_time": 0
}{
"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"
}{
"status": {
"code": "500",
"message": "Internal server error"
}
}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
Response
{
"id": "aeaedae8-7e92-4c14-b923-b944667190902",
"amount": 20000
}{
"error": null,
"success": true
}{
"status": {
"code": "500",
"message": "Internal server error"
}
}The following bank codes are available for the VA aggregator service:
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.