Skip to content

Payment Links

A payment link is a checkout page Baiyar hosts for you. You create it with one API call and get back a url — send that to the customer (chat, email, invoice, QR poster) and they complete payment there. You don’t render any payment UI yourself.

This is different from a direct payment, where you render the QRIS code or virtual account number in your own app.

  1. You call POST /v1/payment-links with an amount and, optionally, which payment methods to allow.
  2. The customer opens the returned url, picks a payment method, and pays.
  3. Baiyar reports the outcome via a webhook (payment.paid or payment.failed) if you’ve configured one — or you can poll GET /v1/payments/{paymentID}.
POST /v1/payment-links
{
"project_id": "018f1f29-7c00-73e4-a310-744d2167fc60",
"reference": "ORDER-2026-0001",
"title": "Invoice August",
"description": "Monthly subscription payment",
"amount": 125000,
"allowed_payment_methods": [
{ "type": "qris" },
{ "type": "virtual_account", "bank": "bca" }
],
"allow_multiple_payments": true,
"customer_fields": { "name": true, "email": true, "phone": false, "address": false }
}
  • amount is in IDR (whole rupiah — there’s no smaller unit to divide into). The minimum is 100 for qris and 10,000 for virtual_account; when a link allows both, the higher floor applies.
  • allowed_payment_methods is optional — omit it to use the project’s default payment methods.
  • allow_multiple_payments: true keeps the link reusable (e.g. a donation link) instead of deactivating it after the first payment.

See the Payment Links API reference for every field.

A payment link’s status is one of:

Status Meaning
active Payable now — a single-use link stays active even after its one payment succeeds; claim-ability is enforced by the payment session, not by this field flipping
cancelled Cancelled via POST /v1/payment-links/{id}/cancel
inactive Past its expires_at

See Payment Statuses for how to tell whether a single-use link has actually been paid.

  • Selling one-off items or sending an invoice without building a checkout flow.
  • You don’t want to handle QR rendering, virtual account display, or polling/webhook wiring for payment status in your own UI.

For more control over the payment UI itself, see Direct Payments.

Set a webhook URL on the project (dashboard → Project → Notifications tab) to get notified the moment a payment is paid or fails, instead of polling — see Webhooks.