QRIS Converter API

Modern docs untuk decode & convert QRIS statis → dinamis

Base URL:
Introduction

API ini membantu developer untuk decode QR dari gambar (opsional), lalu convert QRIS statis → dinamis dengan amount (Tag 54), set POI menjadi 12, dan menghitung ulang CRC (Tag 63).

Catatan: “Dinamis” di sini artinya payload berisi amount + CRC valid. Status pembayaran tetap berasal dari sistem payment provider (mis. Shopee/Open Platform).
Quickstart
POST /api/v1/convert

Convert payload QRIS statis menjadi dinamis dan (opsional) return QR PNG.

Request JSON
{
  "payload": "000201010211....6304ABCD",
  "amount": 10000,
  "fee": { "type": "none", "value": 0 },
  "options": { "return_qr_png": true }
}
Response JSON
{
  "ok": true,
  "data": {
    "dynamic_payload": "000201010212....6304EF12",
    "amount": { "base": "10000.00", "fee": "0.00", "total": "10000.00" },
    "qr_png_data_url": "data:image/png;base64,iVBORw0K..."
  }
}
Health
GET /health 200 OK
Response
{ "ok": true }
Convert (Payload)
POST /api/v1/convert

Input: QRIS payload (string) + amount + fee optional. Output: dynamic payload + optional QR PNG data URL.

Fee: none | fixed | percent
fixed = rupiah (contoh 1500), percent = % (contoh 1.5)
cURL Example
curl -X POST "$BASE/api/v1/convert" \
  -H "Content-Type: application/json" \
  -d '{
    "payload":"000201010211....6304ABCD",
    "amount":10000,
    "fee":{"type":"none","value":0},
    "options":{"return_qr_png":true}
  }'
Decode Image
POST /api/v1/decode

Upload gambar QR → server decode → return payload.

cURL Example
curl -X POST "$BASE/api/v1/decode" \
  -F "file=@qris.png"
Convert Image
POST /api/v1/convert-image

Upload gambar QRIS statis + amount + fee → langsung dapat QR dinamis.

cURL Example
curl -X POST "$BASE/api/v1/convert-image" \
  -F "file=@qris.png" \
  -F "amount=10000" \
  -F "fee_type=percent" \
  -F "fee_value=1.5" \
  -F "return_qr_png=true"
Error Format

Semua error diseragamkan agar mudah di-handle oleh client.

Example Error
{
  "ok": false,
  "error": {
    "code": "INVALID_PAYLOAD",
    "message": "Payload bukan format EMV MPM (Tag 00 harus '01')."
  }
}
Terima Kasih

Terima kasih kepada https://qris.bgsdtyo.com