QRIS Generator API Documentation

Generate dynamic QRIS payment codes with custom amounts and retrieve them via API endpoints.

Get Started

API Overview

This API allows you to generate QRIS payment codes dynamically with custom amounts and provides endpoints to view the generated QR codes.

Key Features

  • Generate QRIS payment codes with custom amounts
  • Customizable QR code parameters (size, margin, error correction)
  • Automatic cleanup of generated QR images after 60 seconds
  • Formatted amount in Indonesian Rupiah (Rp)
  • Jakarta timezone (WIB) timestamp for all transactions

Create QRIS Code

Generate a new QRIS payment code with the specified amount and parameters.

GET /api/create

Generates a QRIS payment QR code with the specified parameters. The generated QR image will be automatically deleted after 60 seconds.

Query Parameters

Parameter Type Required Description Default
amount Integer Yes The payment amount in Indonesian Rupiah (IDR) -
qrisCode String Yes The base QRIS code (URL-encoded) -
margin Integer No White space around QR code (in pixels) 5
eccLevel String No Error correction level (L, M, Q, H) M
width Integer No Width of QR code in pixels 1500
Note: The qrisCode qrisCode must be filled in according to the payment qris code.

Example Request

GET /api/create?amount=50000&qrisCode=00020101021126650014COM.GO-JEK.WWW01189360091400000000000000303UMI51440014ID.CO.QRIS.WWW0215ID10190000000000303UMI52045812530336054055000.05802ID5913Merchant%20Name6013Jakarta%20City6105123456236050450006304A13D

Success Response

{ "status": "success", "timestamp": "2023-05-08T07:30:45.000Z", "data": { "amount": 50000, "formatted_amount": "Rp 50.000", "generated_at": "Monday, 08 May 2023 at 14.30.45 WIB", "download_url": "https://qris.autsc.my.id/api/view/qris_1683549045000.png" } }

Error Response

{ "status": "error", "message": "Amount and QRIS code are required" } { "status": "error", "message": "Failed to generate QR Code", "error": "Detailed error message" }

Response Fields

Field Type Description
status String Request status ("success" or "error")
timestamp String ISO timestamp of the request
data.amount Integer The payment amount in IDR
data.formatted_amount String Formatted amount with "Rp" prefix
data.generated_at String Formatted timestamp in WIB timezone
data.download_url String URL to download the generated QR image (valid for 60 seconds)
message String Error message (present when status is "error")
error String Detailed error message (present for some errors)
Important: Generated QR images are automatically deleted from the server after 60 seconds. Make sure to download or process the image immediately after generation.

View QR Code

Retrieve a previously generated QR code image by its filename.

GET /api/view/:filename

Returns the QR code image file with the specified filename. The image will be served with Content-Type: image/png header.

Path Parameters

Parameter Type Required Description
filename String Yes The filename received from the create endpoint (e.g. qris_1683549045000.png)

Example Request

GET /api/view/qris_1683549045000.png

Success Response

Returns the PNG image file with Content-Type: image/png header.

Error Response

{ "status": "error", "message": "File not found" }
Note: This endpoint will return a 404 error if the file doesn't exist or has been automatically deleted (after 60 seconds).

Error Handling

Common error responses and status codes

HTTP Status Codes

Code Description
200 OK Successful request
400 Bad Request Missing or invalid parameters
404 Not Found QR image not found or invalid endpoint
500 Internal Server Error Server error during QR generation

404 Endpoint Not Found

For any invalid API endpoints, the server will return:

{ "status": "false", "message": "API endpoint not found" }