Mulai Cepat
Prasyarat
Bagian berjudul "Prasyarat"| Kebutuhan | Catatan |
|---|---|
| API key | Lihat Autentikasi |
| Project ID | Ditampilkan di halaman project pada dashboard |
Membuat payment link
Bagian berjudul "Membuat 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 Agustus", "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 Agustus", 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 Agustus", "amount": 125000, "allowed_payment_methods": [{"type": "qris"}], },)payment_link = response.json()Response
Bagian berjudul "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 Agustus", "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"}Arahkan pelanggan ke url — itulah halaman hosting tempat mereka
menyelesaikan pembayaran.
Langkah selanjutnya
Bagian berjudul "Langkah selanjutnya"- Panduan Payment Links — konsep lengkap dan siklus hidupnya.
- Webhooks — dapatkan notifikasi saat pelanggan membayar, tanpa perlu polling.
- Referensi API — setiap field, setiap endpoint.