Quickstart
Prerequisites
Section titled “Prerequisites”| Requirement | Notes |
|---|---|
| API key | See Authentication |
| Project ID | Shown on the project’s page in the dashboard |
Create a payment link
Section titled “Create a payment link”curl https://api.baiyar.id/v1/payment-links \ -H "Authorization: Bearer sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "project_id": "018f1f29-7c00-73e4-a310-744d2167fc60", "title": "Invoice August", "amount": 125000, "allowed_payment_methods": [{ "type": "qris" }] }'const response = await fetch("https://api.baiyar.id/v1/payment-links", { method: "POST", headers: { Authorization: "Bearer sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "Content-Type": "application/json", }, body: JSON.stringify({ project_id: "018f1f29-7c00-73e4-a310-744d2167fc60", title: "Invoice August", amount: 125000, allowed_payment_methods: [{ type: "qris" }], }),});
const paymentLink = await response.json();import requests
response = requests.post( "https://api.baiyar.id/v1/payment-links", headers={"Authorization": "Bearer sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}, json={ "project_id": "018f1f29-7c00-73e4-a310-744d2167fc60", "title": "Invoice August", "amount": 125000, "allowed_payment_methods": [{"type": "qris"}], },)payment_link = response.json()Response
Section titled “Response”{ "id": "018f1f29-8a10-73e4-a310-744d2167fc90", "project_id": "018f1f29-7c00-73e4-a310-744d2167fc60", "merchant_name": "Zara Store", "reference": "001/P/IX/26", "title": "Invoice August", "amount": 125000, "currency": "IDR", "fee_bearer": "merchant", "fee_previews": [ { "payment_method": { "type": "qris" }, "fee_amount": 875, "customer_amount": 125000, "merchant_net": 124125 } ], "allowed_payment_methods": [{ "type": "qris" }], "allow_multiple_payments": false, "customer_fields": { "name": false, "email": false, "phone": false, "address": false }, "status": "active", "created_at": "2026-09-02T08:00:00Z", "url": "https://checkout.baiyar.id/p/018f1f29-8a10-73e4-a310-744d2167fc90"}Send the customer to url — that’s the hosted page where they complete
payment.
Next steps
Section titled “Next steps”- Payment Links guide — the full concept and lifecycle.
- Webhooks — get notified when the customer pays, instead of polling.
- API Reference — every field, every endpoint.