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/createjson
{
"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_minutesof 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:
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.
- 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.,
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.
- 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
End-to-End Payment Flow
- Client Application: Sends
POST /v1/payments/createwith theqrismethod. - Gerbang Pay: Returns the
qr_string. - Client Application: Renders the QR Code on the screen.
- 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.
- Customer: Enters PIN/payment confirmation.
- Winpay: Detects the incoming funds and sends a callback to Gerbang Pay.
- Gerbang Pay: Changes the transaction status to
paidand sends a Webhook to your server.