Masukkan jumlah → generate QR → scan untuk bayar ke merchant kamu.
Base URL:
Semua endpoint ada di domain yang sama. Di Vercel, base URL otomatis berubah.
curl -s {BASE_URL}/health
// JavaScript (browser)
const resp = await fetch('{BASE_URL}/qris/dynamic', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
// 'x-api-key': 'ISI_API_KEY_KAMU' // jika API key aktif
},
body: JSON.stringify({ amount: 15000, format: 'png-dataurl' })
});
const data = await resp.json();
console.log(data.qris);
console.log(data.pngDataUrl);
// PowerShell (Windows)
Invoke-RestMethod {BASE_URL}/qris/dynamic -Method Post -ContentType application/json -Headers @{
'x-api-key' = 'ISI_API_KEY_KAMU'
} -Body (@{ amount = 15000; format = 'string' } | ConvertTo-Json)
// cURL (Linux/Mac)
curl -X POST {BASE_URL}/qris/dynamic \
-H "Content-Type: application/json" \
-H "x-api-key: ISI_API_KEY_KAMU" \
-d '{"amount":15000,"format":"string"}'
curl -X POST {BASE_URL}/qris/decode \
-H "x-api-key: ISI_API_KEY_KAMU" \
-F "image=@/path/to/qris.jpg"
curl -X POST {BASE_URL}/qris/dynamic/from-image \
-H "x-api-key: ISI_API_KEY_KAMU" \
-F "image=@/path/to/qris.jpg" \
-F "amount=15000" \
-F "format=string"