Virtual account
Give the customer a virtual account number for a bank transfer of the exact amount.
With a virtual account (VA), the customer transfers to an account number made for one payment, through mobile banking, internet banking or an ATM.
Banks
Pick the bank with va_bank:
va_bank | Bank |
|---|---|
mandiri | Bank Mandiri |
bri | BRI |
bni | BNI |
bsi | BSI |
cimb | CIMB Niaga |
permata | Permata |
maybank | Maybank |
danamon | Danamon |
Create a VA payment
Send method: "va" and va_bank.
curl https://pay.piti.id/v1/payments \
-H "Authorization: Bearer lbp_test_xxxxxxxx" \
-H "Idempotency-Key: order-1043" \
-H "Content-Type: application/json" \
-d '{
"amount": 250000,
"reference": "INV-1043",
"method": "va",
"va_bank": "mandiri",
"customer": { "name": "Budi Santoso" }
}'{
"id": "pay_hGKm...",
"method": "va",
"status": "pending",
"amount": 250000,
"fee": 4000,
"total": 250000,
"net": 246000,
"fee_payer": "merchant",
"qris": null,
"va": {
"bank": "mandiri",
"bank_name": "Bank Mandiri",
"number": "7001400002266271"
},
"checkout_url": "https://pay.piti.id/pay/pay_hGKm...",
"expires_at": "2026-12-01T03:00:00Z"
}The fee above is only an example. See each bank's fee with GET /v1/methods?amount=.
- Each payment gets its own VA number (
va.number). - The customer must transfer exactly the
total. - The name the customer sees in their bank app is
customer.name, or your business name when it is empty. - Show
va.bank_name,va.numberandtotalto the customer, or send them tocheckout_url. The payment page shows the VA number with a copy button. See Payment page.
Amounts
- Whole rupiah, from Rp10,000 to Rp50,000,000.
- The limit applies to the
total. If the customer pays the fee andamount + feegoes over Rp50,000,000, you get400 invalid_amount.
Who pays the fee
For VAs you choose per app and per bank in the dashboard, under Metode bayar (payment methods):
fee_payer | total (customer pays) | net (you receive) |
|---|---|---|
merchant (default) | amount | amount - fee |
customer | amount + fee | amount |
fee_payeris fixed when the payment is created, from the app's settings at that time. Changing the setting does not change existing payments.- When the customer pays the fee, the payment page shows the breakdown: amount + service fee.
GET /v1/methods?amount=givesfee,total,netandfee_payerper bank for your key's app.- A refund returns the
amount, not the fee the customer paid. See Refunds.
QRIS has no such choice: the merchant always pays its fee. See QRIS.
Expiry
- Set it with
expires_in(seconds): 60 to 86400, default 86400 (24 hours). Seeexpires_at. - After that the VA cannot be paid. The status becomes
expiredand we send thepayment.expiredwebhook. - If the bank's confirmation of a transfer made in time arrives after
expires_at, the payment is still booked:paidwithpaid_late: true.
When the payment is paid
A VA payment is paid when the bank's confirmation for this VA arrives with the exact amount. Then status becomes paid and we send the payment.paid webhook. See Webhooks.
If a different amount came in, the payment is not marked paid. Our team checks it (review_reason: "amount_mismatch").
A VA has no QR, so POST /v1/payments/{id}/qris answers 409 not_qris. A VA's status comes from the bank's confirmation, so rely on webhooks, or read it with GET /v1/payments/{id}.
Availability and errors
Check first with GET /v1/methods. Each bank has available and, when it is false, an unavailable_reason:
coming_soon: VAs are not available for your business yet. Creating a VA payment answers422 method_unavailable. Use QRIS for now.disabled: this bank is switched off for this app. Creating a VA payment answers409 method_disabled. Switch it on under Metode bayar.
| Error | When |
|---|---|
400 invalid_request | va_bank is missing for method: "va", or sent with another method. |
400 method_unknown | va_bank is not one of mandiri, bri, bni, bsi, cimb, permata, maybank, danamon. |
400 invalid_amount | The amount (or the total with a customer-paid fee) is outside Rp10,000 to Rp50,000,000. |
409 method_disabled | This bank is switched off for this app. |
422 method_unavailable | VAs are not available for your business yet. |
502 payment_unavailable | The VA could not be made. Nothing was charged. Create a new payment (new Idempotency-Key) or try another method. |
The full list is in Errors.
VA refunds
Refunds are made by our team by bank transfer, so a live refund stays pending until it is done. See Refunds.
Try it in the sandbox
With an lbp_test_ key you get a test VA. Pay it with POST /v1/payments/{id}/simulate or the simulate button on the payment page. See Testing.