Virtual Account APIs
There are two methods available related to Virtual Account generation:
Minimum Amount | Maximum Amount |
---|---|
IDR 10.000 | IDR 500.000.000 |
The VA generation is available for these banks:
Bank Name | Bank Shortcode | Maximum Amount | Closed VA | Open VA | Settlement |
---|---|---|---|---|---|
Bank Mandiri | MANDIRI | IDR 500.000.000 | Available | Available | T+0 Working Day |
Bank Rakyat Indonesia | BRI | IDR 500.000.000 | Available | Available | T+0 Working Day |
Bank CIMB Niaga | CIMB_NIAGA | IDR 500.000.000 | Available | Available | T+0 Working Day |
Bank Danamon | DANAMON | IDR 25.000.000 | Available | Available | T+1 Working Day |
Bank Permata | PERMATA | IDR 500.000.000 | Available | Available | T+0 Working Day |
Bank Hana | HANA | IDR 50.000.000 | Available | Available | T+1 Working Day |
Bank Sahabat Sampoerna | SAHABAT_SAMPOERNA | IDR 10.000.000 | - | Available | Instant |
There are two methods available related to Virtual Account generation:
A. Open VA
Use this method when a payment method with no pre-defined amount is needed to be linked for your end-user. Brick will send you callback notifications to your designated callback URL when we detect payments made through the open VA.
These are typically used when you want to create a specific payment channel that will be tightened to each of your users (example: as a top-up channel to your users' e-wallet or balance).
1. Generating an Open VA
To start generating an open VA, you can use Open VA API with these details:
curl --location --request POST 'https://sandbox.onebrick.io/v2/payments/gs/va/open' \
--header 'publicAccessToken: Bearer {{public-access-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"bankShortCode": "MANDIRI",
"referenceId": "Brick12345",
"displayName": "BRICK"
}'
2. You will get the responses like below when successful:
{
"status": 200,
"data": {
"message": "We have successfully generated the open VA",
"id": "OP_b123123123asdas1231231123",
"referenceId": "Brick12345",
"bankShortCode": "MANDIRI",
"accountNo": "1304300000003243",
"displayName": "IKN-BRICK"
},
"metaData": {
"source": "API",
"entity": "Payment"
},
"error": null
}
3. Virtual account Callback Notification
Brick notifies you when the user has already made the payment via callbacks (you will be able to set up the Virtual account callback in the Brick Dashboard )
The callback will be sent twice:
- When the payment is made (status: "paid")
- When the fund settlement is done in each Bank (status: "completed")
{
"data": {
"id": "OP_123456i12i1i123u123",
"referenceId": "Dodo123456",
"amount": "10000.0",
"status": "paid",
"createdAt": "2023-03-28T10:29:48.000+07:00",
"paymentId": "PAY_b123b123b123b123b123b123bb1",
"bankShortCode": "MANDIRI",
"accountNo": "8804995730945965",
"displayName": "BRICK"
}
}
{
"data": {
"id": "OP_123456i12i1i123u123",
"referenceId": "Dodo123456",
"amount": "10000.0",
"status": "completed",
"createdAt": "2023-03-28T10:29:48.000+07:00",
"paymentId": "PAY_b123b123b123b123b123b123bb1",
"bankShortCode": "MANDIRI",
"accountNo": "8804995730945965",
"displayName": "BRICK"
}
}
B. Closed VA
Use this method when a static payment method with a pre-defined amount is needed to be linked for your end-user. Brick will send you callback notifications to your designated callback URL when we detect payments made through the close VA.
These are typically used when you want to create a specific payment channel that will be tightened to each of the transactions/bills of your users where the payment window is limited.
1. Generating a Close VA
To start generating a close VA, you can use Close VA API with these details:
curl --location --request POST 'https://sandbox.onebrick.io/v2/payments/gs/va/close' \
--header 'publicAccessToken: Bearer {{public-access-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": 15000,
"referenceId": "brick12345",
"expiredAt": "60",
"description": "Test Initial VA Close",
"bankShortCode": "MANDIRI",
"displayName": "BRICK"
}'
2. You will get the responses like below when successful:
{
"status": 200,
"data": {
"message": "We have successfully generated the close VA",
"id": "CL_asd123asd2322313asss2223321",
"referenceId": "brick12345",
"description": "Test Initial VA Close",
"amount": "15000",
"status": "pending",
"createdAt": "2023-04-10T13:33:03.000+07:00",
"expiredAt": "2023-04-10T14:34:03.000+07:00",
"bankShortCode": "MANDIRI",
"accountNo": "23096000000108142",
"displayName": "BRICK"
},
"metaData": {
"source": "API",
"entity": "Payment"
},
"error": null
}
3. Virtual Account Callback Notification
Brick notifies you when the user has already made the payment via callbacks (you will be able to set up the Virtual Account callback in the Brick Dashboard )
The callback will be sent twice:
- When the payment is made (status: "paid")
- When the fund settlement is done in each Bank (status: "completed")
{
"data": {
"id": "CL_asd123asd2322313asss2223321",
"referenceId": "brick12345",
"description": "Test Initial VA Close",
"amount": "15000",
"status": "paid",
"createdAt": "2023-04-10T13:33:03.000+07:00",
"expiredAt": "2023-04-10T14:34:03.000+07:00",
"paymentId": "PAY_zxc123azx123zxc123zxc123",
"bankShortCode": "MANDIRI",
"accountNo": "23096000000108142",
"displayName": "BRICK"
}
}
{
"data": {
"id": "CL_asd123asd2322313asss2223321",
"referenceId": "brick12345",
"description": "Test Initial VA Close",
"amount": "15000",
"status": "paid",
"createdAt": "2023-04-10T13:33:03.000+07:00",
"expiredAt": "2023-04-10T14:34:03.000+07:00",
"paymentId": "PAY_zxc123azx123zxc123zxc123",
"bankShortCode": "MANDIRI",
"accountNo": "23096000000108142",
"displayName": "BRICK"
}
}
Updated 4 months ago