Payment methods
How a payer pays, and how to name the method when you start an attempt.
You choose the method by its instrument code in POST /api/merchant/v1/payments/{id}/attempts. The code is upper case letters, digits, _ and -, up to 40 characters.
Method (paymentMethod.type) | Instrument code | What the payer sees (nextAction) |
|---|---|---|
Virtual account (va) | The bank's code, for example BCA | display_va: a number to transfer to |
QRIS (qris) | QRIS | display_qr: a QR code to scan |
E-wallet (ewallet) | The e-wallet's code, for example GOPAY | redirect: the e-wallet's page |
The API also reserves the types card, bank_transfer, crypto and paypal, and your code must accept a type or an instrument it does not know yet.
Which instruments can my payers use?
The instruments you can use depend on what is switched on for your business, and Zeny can add more over time. Ask support@usezeny.com for the list that is active for you. Build your payment screen from a list you keep, and never let a payer type an instrument code. When an attempt comes back failed, offer the payer another method. When you do not know the outcome (a timeout, a 5xx, or an attempt that is processing), do not start another attempt: repeat the same request with the same Idempotency-Key and body, or read the payment, and wait for the webhook. See Errors for the other cases.
Things that differ by method
- Fees. Each method has its own price. After a payment is
paid,feeslists what Zeny kept andnetwhat you receive. - Unique code. On some methods the attempt's
uniqueCodeis added tochargeso the payment can be told apart by its amount. The payer pays it and Zeny keeps it. It is not a fee and does not changenet. - Expiry. The payer's instructions stop working at the attempt's
expiresAt, which can be earlier than the payment's ownexpiresAt. - Late payments. A payment that has already expired can still become
paidwhen the provider reports a capture late. Money that arrived is never ignored, so handle apayment.paidevent for an order you had given up on.