Virtual Accounts
Virtual Accounts is a bank transfer payment method in Indonesia that allows customers to complete payments by transferring funds to a unique, transaction-specific bank account number generated at checkout. After selecting bank transfer as the payment method, customers receive a Virtual Account (VA) number and can complete the payment through their bank's mobile app, internet banking, or ATM.
By integrating Virtual Accounts, merchants can collect payments securely and efficiently through Indonesia's banking network, providing a widely adopted and trusted payment alternative for Indonesian customers who rely on bank transfers.
This guide outlines the key concepts and implementation details required to integrate Virtual Accounts via API. It covers essential steps such as creating a payment request, displaying the VA number to the customer, and monitoring the payment status.
Requirements
- API credentials - Ensure you have your EBANX integration key. If not, complete the Merchant Signup Form.
- Familiarity with EBANX Direct - This setup follows the same general structure as other payment methods, with a few unique parameters. See EBANX Direct for more info.
How it works
Web and App Flow
- The customer selects Bank Transfer (Virtual Account) as the payment method during checkout.
- A unique Virtual Account (VA) number is generated for the transaction, along with the amount and expiry time.
- The merchant displays the VA number and payment instructions to the customer.
- The customer completes the payment by logging into their bank app, internet banking, or visiting a bank ATM and entering the VA number.
- The customer confirms the bill details and completes the necessary authentication process.
- EBANX sends a real-time notification (webhook) to the merchant confirming the payment status.
- The order status is updated to "Paid" upon receiving a successful payment notification.
Customers can enter the VA number in their bank's mobile app, internet banking portal, or at a bank ATM.
Technical flow
-
Request payment - Call the
ws/directendpoint with the parameters defined below. -
Payment instructions - In response to this request, EBANX will return a
voucher_urlcontaining the Virtual Account number and payment details for the customer. -
Customer completes the payment - The customer transfers the specified amount using the VA number. During this time, the transaction will be set on our platform with the status pending (PE).
-
Payment confirmation - Once the transaction is successful, the customer receives a confirmation on their banking app, and the merchant is updated with the transaction status.
-
EBANX notification - EBANX sends you a webhook notification confirming the successful transaction, allowing you to fulfill your customer's order.
Instructions
Follow the steps below.
- Select your environment
Select the appropriate environment for your integration. Use the sandbox environment for testing, or the production environment for live transactions. Use the URL for your HTTP requests based on your selection.
https://sandbox.ebanx.com/ws/direct - Define your parameters
To create a Virtual Account payment, you need to define the parameters in your request. The following tables outline the required parameters for the payment process.
Basic parameters
Parameter Requirement Description operationRequired Set to requestintegration_keyRequired Your EBANX integration key payment_type_codeRequired Set to virtual-accountcountryRequired Set to idfor IndonesiaCustomer data
Parameter Requirement Description nameRequired Customer name emailRequired Customer email phone_numberOptional Customer phone Charge parameters
Parameter Requirement Description merchant_payment_codeRequired Unique merchant payment code currency_codeRequired Set to IDRamount_totalRequired Total amount to be charged bank_details.bank_codeRequired Bank code for the Virtual Account (see supported banks below) redirect_urlRequired URL the customer will be redirected to after completing payment Supported bank codes
Bank Code Bank Name cimbCIMB Niaga bsiBank Syariah Indonesia bcaBCA bncBank Neo Commerce bniBNI mandiriMandiri briBRI btnBTN permataPermata danamonDanamon bssBank Sahabat Sampoerna maybankMaybank dokuDOKU VA sinarmasSinarmas Transaction limitsTransaction limits vary by bank and transfer type:
Bank Min Amount Max Amount Notes BCA IDR 10,000 IDR 50,000,000 CIMB IDR 10,000 IDR 50,000,000,000 BNI IDR 10,001 IDR 50,000,000 BSI IDR 10,002 IDR 100,000,000 DOKU VA IDR 10,003 IDR 250,000,000 Mandiri IDR 10,004 IDR 300,000,000 Same bank Mandiri IDR 10,005 IDR 500,000,000 Interbank BRI IDR 10,006 IDR 50,000,000,000 Same bank BRI IDR 10,007 IDR 500,000,000 Interbank Danamon IDR 10,008 IDR 2,000,000,000 Same bank Danamon IDR 10,009 IDR 200,000,000 Interbank Maybank IDR 10,010 IDR 10,000,000,000 Same bank Maybank IDR 10,011 IDR 200,000,000 Interbank Sinarmas IDR 10,012 IDR 5,000,000,000 Same bank Sinarmas IDR 10,013 IDR 50,000,000 Interbank Permata IDR 10,014 IDR 9,999,999,999 BTN IDR 10,015 IDR 9,999,999,999 - Payment request
Once your customer selects a bank and submits a Virtual Account payment, create a payment request using the ws/direct endpoint.
Sample request
curl -X POST \
--location 'https://sandbox.ebanx.com/ws/direct' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "{{integration_key}}",
"operation": "request",
"payment": {
"name": "John Doe",
"email": "john.doe@example.com",
"country": "id",
"phone_number": "5555555555",
"payment_type_code": "virtual-account",
"merchant_payment_code": "{{unique_merchant_code}}",
"currency_code": "IDR",
"amount_total": 99.85,
"bank_details": {
"bank_code": "permata"
},
"redirect_url": "https://merchant.example.com/callback"
}
}' - Payment successful response
Each request returns a response similar to the example below.
{
"payment": {
"hash": "59acc5f00945fa382ab051651440826da7701533249b3a475",
"country": "id",
"merchant_payment_code": "{{unique_merchant_code}}",
"order_number": null,
"status": "PE",
"status_date": null,
"open_date": "{{YYYY-MM-DD HH:mm:ss}}",
"confirm_date": null,
"transfer_date": null,
"amount_br": "99.85",
"amount_ext": "99.85",
"amount_iof": "1",
"currency_rate": "1",
"currency_ext": "IDR",
"due_date": "{{YYYY-MM-DD}}",
"instalments": "1",
"payment_type_code": "virtual-account",
"voucher_url": "https://sandbox.ebanx.com/print/voucher?hash=59acc5f00945fa382ab051651440826da7701533249b3a475",
"pre_approved": false,
"capture_available": null,
"customer": {
"email": "john.doe@example.com",
"name": "John Doe"
}
},
"status": "SUCCESS"
}At this stage, the payment will appear as pending (PE) in yourMerchant Areachevron_rightTimeoutFor Virtual Account payments, the timeout is 1 hour. Ensure the customer completes the payment within this time frame.
- Display Virtual Account number
Redirect your customer to the URL provided in the
voucher_urlparameter. The page will display the Virtual Account number that the customer needs to use for the bank transfer."voucher_url": "https://sandbox.ebanx.com/print/voucher?hash=59acc5f00945fa382ab051651440826da7701533249b3a475"Below is how the Virtual Account payment instructions page will look:
Sandbox behaviorWhen testing in sandbox, a simulator environment will be rendered to accept or decline the payment.
- Monitor payment for status changes
Notifications
-
EBANX will send a notification whenever a payment status changes.
-
Make sure your system is set up to receive notifications from EBANX for any changes in payment status.
Status
-
After receiving a notification that the status has changed, retrieve the payment status.
-
When a payment is confirmed, the status will change from pending (PE) to confirmed (CO). If the customer does not complete the payment, the status will eventually change to cancelled (CA).
-
- Congratulations!
You have successfully integrated Virtual Accounts.
For more information, refer to theDirect API reference guidechevron_right
Resources
Use the following resources when testing in your sandbox environment.
API Reference
Click here to access detailed API documentation to integrate efficiently.
Mock Customer Data
Click here to view mock customer data for testing and validating user flows.
Error Codes
Click here to review common error codes to troubleshoot and resolve issues quickly.
Still need help?
We hope this article was helpful. If you still have questions, you can explore the following options:
- Merchant support: Contact our support team at sales.engineering@ebanx.com for assistance.
- Not a partner yet? Please complete the Merchant Signup Form, and our commercial team will reach out to you.