Skip to content
PGSwift Docs

QRIS

Merchants can use this API to create a checkout interface for processing transactions.

POST /api/create/qris

Request

NameTypeRequiredValidationDescription
merchant_transaction_idstringtrueMerchant-provided unique transaction identifier.
amountstringtrueNumeric, 1-12 digitsTransaction amount expressed as a numeric value.
currencystringtrueAllowed value: "IDR"Transaction currency (only Indonesian Rupiah is supported).
customer_namestringtrue

Between 5 - 25 characters

Allowed chars: a-z, A-Z, 0-9, - (dash),(space)

Customer name linked to the transaction.
product_namestringtrue

Between 5 - 25 characters

Allowed chars: a-z, A-Z, 0-9, - (dash),(space)

Product name linked to the transaction.
descriptionstringfalseOptional transaction details.
success_redirect_urlstringfalseURL to redirect the customer upon successful payment. Also supports mobile deep link URLs.
{
  "merchant_transaction_id": "ICZ10000001",
  "amount": "100000",
  "currency": "IDR",
  "description": "Lorem Ipsum",
  "customer_name": "John Doe",
  "product_name": "Product Test",
  "success_redirect_url": "https://example.com/success"
}

Response

NameDescription
statusRequest status indicator. true indicates success, false indicates failure.
messageResult message for the request. Usually "success" when the request succeeds.
data.transaction_idSystem-generated unique transaction identifier.
data.qr_urlURL of the QR code image (PNG). Display it directly for the customer to scan.
data.qr_contentRaw QR code content string, typically formatted for payment systems (e.g., QRIS format)
data.redirect_urlHosted checkout page that displays the same QR code. Redirect the customer here if you do not render the QR code yourself.
data.expired_atPayment expiry datetime (ISO 8601). The QR code cannot be paid after this time.
data.expired_at_isoSame expiry as expired_at, as ISO 8601 with offset (e.g. "2025-02-26T19:00:00+07:00"). Same format on every channel. null when expired_at is null.
data.payment_channelNormalized payment channel, one format for every payment type and provider: a value such as QRIS, VA_BRI, BANK_BCA, or EWALLET_DANA (payment type prefix + code from the Appendix). null when the channel cannot be determined. Prefer this over channel.
data.success_redirect_urlURL to redirect the customer upon successful payment. Also supports mobile deep link URLs.
{
    "status": true,
    "message": "success",
    "data": {
        "transaction_id": "8366a675-f1cc-418c-b3a8-358410671ca0",
        "payment_channel": "QRIS",
        "qr_url": "{host}/images/payment/qris/BP1f44d20caefb8b0ef181797bffed088c.png",
        "qr_content": "00020101021226660014ID.EXAMPLE.WWW01189360000000000000000215ID12345678901230303UMI51440014ID.CO.QRIS.WWW0215ID12345678901230303UMI5204599953033605405100005802ID5913EXAMPLE STORE6007JAKARTA61051234562230703A010812qris_invoice6304FF2D",
        "redirect_url": "{host}/checkout/8366a675-f1cc-418c-b3a8-358410671ca0/qris",
        "success_redirect_url": "https://example.com/success",
        "expired_at": "2025-02-26T12:00:00.000000Z",
        "expired_at_iso": "2025-02-26T19:00:00+07:00"
    }
}

Webhook