API Documentation
QRIS Gateway API
All endpoints require the header X-API-KEY matching QRIS_API_TOKEN.
Endpoints
Create Invoice
POST /api/payments/qris/create
curl -X POST http://127.0.0.1:8000/api/payments/qris/create \\
-H "Content-Type: application/json" \\
-H "X-API-KEY: changeme-superkey" \\
-d "{\"amount\":15000,\"merchant_order_id\":\"INV12345\"}"
{
"amount": 15000,
"merchant_order_id": "INV12345"
}
{
"success": true,
"invoice_id": 1,
"merchant_order_id": "INV12345",
"amount": 15000,
"fee_amount": 105,
"unique_code": 237,
"total_amount": 15342,
"status": "pending",
"qris_payload": "000201...",
"qr_image_png_url": "http://127.0.0.1:8000/api/payments/qris/1/qr.png"
}
QR PNG
GET /api/payments/qris/{id}/qr.png
curl -I http://127.0.0.1:8000/api/payments/qris/1/qr.png \\ -H "X-API-KEY: changeme-superkey"
Response: image/png
Status
GET /api/payments/qris/{id}/status
curl -X GET http://127.0.0.1:8000/api/payments/qris/1/status \\ -H "X-API-KEY: changeme-superkey"
{
"success": true,
"invoice_id": 1,
"merchant_order_id": "INV12345",
"amount": 15000,
"fee_amount": 105,
"unique_code": 237,
"total_amount": 15342,
"status": "pending",
"paid_at": null
}
Notify
POST /api/payments/qris/notify
curl -X POST http://127.0.0.1:8000/api/payments/qris/notify \\
-H "Content-Type: application/json" \\
-H "X-API-KEY: changeme-superkey" \\
-d "{\"invoice_id\":1,\"status\":\"paid\",\"amount\":15000}"
{
"invoice_id": 1,
"status": "paid",
"amount": 15000,
"provider_tx_id": "RRN123"
}
{
"success": true,
"invoice_id": 1,
"status": "succeeded"
}
Mutasi Fetch + Process
POST /api/qris/mutasi/fetch-process
{
"success": true,
"fetched": 10,
"inserted_events": 10,
"skipped_events": 0,
"matched_paid": 3
}
Auth
Use this header for all requests:
X-API-KEY: <QRIS_API_TOKEN>