Skip to Content

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_bankBank
mandiriBank Mandiri
briBRI
bniBNI
bsiBSI
cimbCIMB Niaga
permataPermata
maybankMaybank
danamonDanamon

Create a VA payment

Send method: "va" and va_bank.

Terminal
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" }
  }'
Response (part)
{
  "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.number and total to the customer, or send them to checkout_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 and amount + fee goes over Rp50,000,000, you get 400 invalid_amount.

Who pays the fee

For VAs you choose per app and per bank in the dashboard, under Metode bayar (payment methods):

fee_payertotal (customer pays)net (you receive)
merchant (default)amountamount - fee
customeramount + feeamount
  • fee_payer is 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= gives fee, total, net and fee_payer per 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). See expires_at.
  • After that the VA cannot be paid. The status becomes expired and we send the payment.expired webhook.
  • If the bank's confirmation of a transfer made in time arrives after expires_at, the payment is still booked: paid with paid_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 answers 422 method_unavailable. Use QRIS for now.
  • disabled: this bank is switched off for this app. Creating a VA payment answers 409 method_disabled. Switch it on under Metode bayar.
ErrorWhen
400 invalid_requestva_bank is missing for method: "va", or sent with another method.
400 method_unknownva_bank is not one of mandiri, bri, bni, bsi, cimb, permata, maybank, danamon.
400 invalid_amountThe amount (or the total with a customer-paid fee) is outside Rp10,000 to Rp50,000,000.
409 method_disabledThis bank is switched off for this app.
422 method_unavailableVAs are not available for your business yet.
502 payment_unavailableThe 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.