Create a payment
Creates a payment: QRIS (returns qris.content), a virtual account (va_bank; returns va.number) or any (the buyer picks on the checkout page). Always returns the hosted checkout_url.
apiKeyAuthorizationBearer <token>lbp_test_... or lbp_live_...
Idempotency-Key*stringlength <= 255application/json- body
amount*integerWhole rupiah. QRIS: 1,000 to 10,000,000. Virtual account: 10,000 to 50,000,000. any: 1,000 to 50,000,000 (the buyer sees only the methods that take the amount).
1000 <= value <= 50000000reference*stringYour order id.
1 <= length <= 64method?stringqris (the default) or va (needs va_bank) fix the method now. any lets the buyer pick on the checkout page among the app's switched-on methods that take this amount; until then the payment has no qris or va, fee 0 and total = amount, and the method, fee, total and fee_payer are set by the buyer's pick.
"qris""qris""va""any"va_bank?stringFor method va: the bank of the virtual account. Amounts from 10,000 to 50,000,000.
"mandiri""bri""bni""bsi""cimb""permata""maybank""danamon"expires_in?integerSeconds the payment stays open: up to 86400 (24 h) for qris and va, up to 2592000 (30 days) for any. Its QR is renewed as needed (see POST /v1/payments/{id}/qris).
60 <= value <= 259200086400description?stringlength <= 255customer?return_url?stringhttps URL the buyer returns to after paying.
metadata?Up to 20 keys and 4 KB
Created
application/json- response
id*stringobject*"payment""payment"app_id*stringThe app (integration) the payment belongs to: the key's app, or the one picked in the dashboard.
mode*string"test""live"reference*stringmethod*stringany: the buyer has not picked a method yet on the checkout page (fee, total and fee_payer are final once it is qris or va).
"qris""va""any"status*stringA paid payment is never undone, only refunded.
"pending""paid""expired""failed""refunded"currency*"IDR""IDR"amount*integerfee*integerOur fee
total*integerWhat the buyer pays: the amount, plus the fee when fee_payer is customer.
net*integerWhat the merchant receives: total minus fee.
fee_payer*stringWho pays our fee, from the app's settings when the payment was created. customer (virtual accounts only): the buyer pays amount + fee. QRIS is always merchant.
"merchant""customer"refunded_amount*integerpaid_late*booleanPaid after it expired.
review_reason*|Set when our team is checking this payment: a different amount was paid (never booked), a second QR of the payment was paid too (not booked), or the issuer reports a refund we did not make. Null otherwise.
"amount_mismatch""duplicate_payment""refunded_at_issuer"nulldescription*stringcustomer*metadata*return_url*string|nullcheckout_url*stringprovider_ref*|The payment provider's reference, for reconciliation with bank or provider reports: the paid QR's (or, while pending, the current QR's) reference number, or the virtual account's transaction id. Null until there is one (method any before the buyer's pick).
qris*|Present while pending.
va*|For method va: the account the buyer transfers the exact total to. Paid is confirmed by the bank's callback; it may arrive after expires_at (paid_late).
expires_at*stringdate-timepaid_at*|date-timecreated_at*stringdate-timesource*|Who made it: an API key, a team member on the dashboard (a tagihan), a subscription's invoice, a Xendit-compatible invoice, or a Duitku-compatible transaction. Null for payments made before 2026-11-29.
"api""dashboard""subscription""xendit""duitku"nullcreated_by*|For source dashboard: the team member who made it (their name then).
subscription*|For a subscription's invoice: which subscription and which period (cycle from 1; periods skipped while paused or while the plan was off keep their numbers).
curl -X POST 'https://pay.piti.id/v1/payments' \ -H 'Idempotency-Key: string' \ -H 'Content-Type: application/json' \ -d '{ "amount": 150000, "reference": "INV-1042", "method": "qris", "description": "Order 1042", "return_url": "https://shop.example/orders/1042"}'{ "id": "string", "object": "payment", "app_id": "string", "mode": "test", "reference": "string", "method": "qris", "status": "pending", "currency": "IDR", "amount": 0, "fee": 0, "total": 0, "net": 0, "fee_payer": "merchant", "refunded_amount": 0, "paid_late": true, "review_reason": "amount_mismatch", "description": "string", "customer": {}, "metadata": {}, "return_url": "string", "checkout_url": "string", "provider_ref": "string", "qris": { "content": "string", "expires_at": "2019-08-24T14:15:22Z" }, "va": { "bank": "mandiri", "bank_name": "string", "number": "string" }, "expires_at": "2019-08-24T14:15:22Z", "paid_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "source": "api", "created_by": { "id": "string", "name": "string" }, "subscription": { "id": "string", "cycle": 0, "period_start": "2019-08-24T14:15:22Z", "period_end": "2019-08-24T14:15:22Z" }}