Skip to content

Winpay — QRIS

Gerbang Pay provides Dynamic MPM QRIS creation services via Winpay. This QRIS is unique for every transaction (the amount is pre-filled) so the customer cannot change the amount to be paid.

How to Create

To create a QRIS, set method_type to qris and provide method_detail with type: qris. There is no specific channel or bank to select, because QRIS is universal (it can be scanned by any m-banking or e-wallet application incorporated in the QRIS network).

http
POST /v1/payments/create
json
{
  "amount": 2500000, 
  "currency": "IDR",
  "method_type": "qris",
  "method_detail": {
    "type": "qris"
  },
  "customer_name": "Budi Santoso",
  "expiry_minutes": 15
}

Important Request Notes

  • Amount: Use the cents format (2500000 = Rp 25,000).
  • Minimum Expiry: Winpay requires a minimum time limit of 2 minutes for QRIS. If you send an expiry_minutes of less than 2, the API will reject the request with a validation error.

Response

If successful, you will receive a Payment object with method_data containing the QRIS data.

json
{
  "success": true,
  "data": {
    "id": "...",
    "status": "pending",
    "method_data": {
      "type": "qris",
      "qr_string": "00020101021126660016ID.CO.WINPAY.WWW0118936009121111979927021111119799270303UMI51440014ID.CO.QRIS.WWW0215ID10200214693950303UMI5204481453033605406250.005802ID5913GERBANG PAY6008JAKARTA61051234562300109TX-1234560709TX-1234566304CA11",
      "qr_image_url": "https://gerbang-pay-api.gai.co.id/qr/image?data=000201..."
    }
  }
}

How to Display the QR Code to Customers

There are two approaches you can use on the frontend:

  1. Use qr_string (Recommended)

    • This string is the standard raw QRIS payload. You can render it into a QR Code image directly in your application or web using a local QR generator library (e.g., qrcode.react, zxing, or similar).
    • This method is the fastest and most secure.
  2. Use qr_image_url (Alternative)

    • If you do not want to/cannot render the QR code locally on the client, you can use the image URL provided by Gerbang Pay. Simply place the URL string in an <img src="..."> tag.

End-to-End Payment Flow

  1. Client Application: Sends POST /v1/payments/create with the qris method.
  2. Gerbang Pay: Returns the qr_string.
  3. Client Application: Renders the QR Code on the screen.
  4. Customer: Opens an e-wallet application (DANA, OVO, GoPay) or M-Banking and scans the QR code. The amount will immediately appear on the customer's phone.
  5. Customer: Enters PIN/payment confirmation.
  6. Winpay: Detects the incoming funds and sends a callback to Gerbang Pay.
  7. Gerbang Pay: Changes the transaction status to paid and sends a Webhook to your server.

Gerbang Pay API Documentation