QRIS
Generate QRIS
Complete guide to create QRIS via Paylabs API.
Request URL
URL: ${ROOT_URL}/payment/v2.3/qris/create
HTTPMethod: POST
EndpointUrl: /payment/v2.3/qris/create
Generate QRIS Request Parameters
Header
| Field Name | Type | Value | Required |
|---|---|---|---|
| Content-Type | String(30) | Fixed value "application/json;charset=utf-8" | Yes |
| X-TIMESTAMP | String(29) | Current time, format 2022-09-16T16:58:47.964+07:00 | Yes |
| X-SIGNATURE | String(64) | Signature. For details please check Data Signing Rules | Yes |
| X-PARTNER-ID | String(20) | Merchant ID | Yes |
| X-REQUEST-ID | String(64) | Unique ID for each request | Yes |
Body
| Parameter | Type | Required | Remarks |
|---|---|---|---|
| requestId | String(64) | Yes | Unique identifier on every request |
| merchantId | String(20) | Yes | The unique identifier provided by payment gateway to the merchant |
| storeId | String(30) | No | Only if merchant has branches and wish to create order using its branch ID |
| paymentType | String(20) | Yes | The name of the payment type; check Payment Type below |
| amount | Decimal(12,2) | Yes | Amount in Indonesia Rupiah |
| merchantTradeNo | String(32) | Yes | The unique identifier created by the merchant for each transaction |
| notifyUrl | String(200) | No | The URL that will be redirected to after payment is done; see Order Inquiry for parameters |
| expire | Number | No | Unit seconds; channel default varies |
| feeType | String(3) | No | Fee deduction type: BEN/OUR. Default BEN. OUR will add fee to order amount automatically. |
| productName | String(100) | Yes | Product/service name |
| + productInfo | Array<Object>(30) | No | Product/service details |
| - id | String(10) | Yes | Product ID |
| - name | String(32) | Yes | Product Name |
| - price | decimal(12,2) | Yes | Amount in IDR, supports two decimals |
| - type | String(20) | Yes | Product Type |
| - url | String(200) | No | Product URL |
| - quantity | Number(4) | Yes | Product Quantity |
paymentType
| Payment Type | Code |
|---|---|
| QRIS | QRIS |
Generate QRIS Response Parameters
Header
| Field Name | Type | Value | Required |
|---|---|---|---|
| Content-Type | String(30) | Fixed value "application/json;charset=utf-8" | Yes |
| X-TIMESTAMP | String(29) | Current time, format 2022-09-16T16:58:47.964+07:00 | Yes |
| X-SIGNATURE | String(64) | Signature. For details please check Data Signing Rules | Yes |
| X-PARTNER-ID | String(20) | Merchant ID | Yes |
| X-REQUEST-ID | String(64) | Unique ID for each request | Yes |
Body
| Parameter | Type | Required | Remarks |
|---|---|---|---|
| requestId | String(64) | Yes | Unique identifier on every request |
| errCode | String(32) | Yes | 0 means success, otherwise see Error Code |
| errCodeDes | String(128) | No | Error description |
| merchantId | String(20) | Yes | Merchant ID |
| storeId | String(30) | No | Only if using branch ID channel account |
| paymentType | String(20) | Yes | Payment type |
| requestAmount | Decimal(12,2) | No | Amount at request |
| amount | Decimal(12,2) | Yes | Amount in IDR, 2 decimals. Fee type: OUR adds fee to order; if fee has decimals it is rounded up (e.g. 10,000.11 → 10,001.00). |
| merchantTradeNo | String(32) | Yes | Merchant order number |
| createTime | String(16) | No | yyyyMMddHHmmss |
| qrCode | String(300) | No | QRIS code |
| qrisUrl | String(300) | No | QRIS image link |
| nmid | String(32) | No | National Merchant ID |
| platformTradeNo | String(32) | No | Paylabs platform order number |
| successTime | String(16) | No | yyyyMMddHHmmss |
| expiredTime | String(16) | No | yyyyMMddHHmmss |
| status | String(32) | No | 01: Pending, 09: Failed, 02: Success |
| productName | String(100) | Yes | Product/service name |
| rrn | String(32) | No | Payment success code |
| tid | String(32) | No | Terminal/POS ID |
| payer | String(60) | No | Actual payer name if supported; otherwise null. Currently only QRIS. Not the payer sent by merchant. |
| phoneNumber | String(20) | No | Payer phone |
| issuerId | String(20) | No | Issuer Application ID |
| + productInfo | Array<Object>(30) | No | Product/service details |
| - id | String(10) | Yes | Product ID |
| - name | String(32) | Yes | Product Name |
| - price | decimal(12,2) | Yes | Amount in IDR, supports two decimals |
| - type | String(20) | Yes | Product Type |
| - url | String(200) | No | Product URL |
| - quantity | Number(4) | Yes | Product Quantity |
| transFeeRate | Decimal(6,6) | No | Transaction Rate, six decimals |
| transFeeAmount | Decimal(12,2) | No | Fees, two decimals |
| totalTransFee | Decimal(12,2) | No | Total transaction fee rate (excluding vatFee), two decimals |
| vatFee | Decimal(12,2) | No | Taxes, two decimals |
| accountNo | String(32) | No | Account number of actual payer if supported; otherwise null |
Example
Request
POST /payment/v2.3/qris/create
# HTTP Header
Content-Type: application/json;charset=utf-8
X-TIMESTAMP: 2022-09-16T16:58:47.964+07:00
X-SIGNATURE: xxxxxxxxx
X-PARTNER-ID: 010001
X-REQUEST-ID: xxxxxxxxxxxxxxxxxxxxxxxx
# HTTP Body
{
"merchantId":"0010001",
"merchantTradeNo":"100100011649756102739",
"requestId":"200100011649756102739",
"paymentType":"QRIS",
"amount":"10000.00",
"productName":"Test"
}Response
POST /payment/v2.3/qris/create
# HTTP Header
Content-Type: application/json;charset=utf-8
X-TIMESTAMP: 2022-09-16T16:58:47.964+07:00
X-SIGNATURE: xxxxxxxxx
X-PARTNER-ID: 010001
X-REQUEST-ID: xxxxxxxxxxxxxxxxxxxxxxxx
# HTTP Body
{
"amount":"10000.00",
"merchantTradeNo":"100100011649756102739",
"platformTradeNo":"2022041200000000026",
"expiredTime":"20220412163603",
"paymentType":"QRIS",
"qrCode":"00020101021126690011ID.CO.QRIS.WWW01081234567800204NWU0108925093038634030314CERIAQR10120507ORBTEC02120104QRIS0303UMA51440014ID.CO.POSPAY.WWW02130139045930345104334140516Bill Test 1.0005802ID5903UMI6007BANDUNG6105402506304D13F",
"qrisUrl":"https://sit-api.paylabs.co.id/payment/qr/img?url=00020101021126690011ID.CO.QRIS.WWW01081234567800204NWU0108925093038634030314CERIAQR10120507ORBTEC02120104QRIS0303UMA51440014ID.CO.POSPAY.WWW02130139045930345104334140516Bill Test 1.0005802ID5903UMI6007BANDUNG6105402506304D13F",
"createTime":"20220412163603",
"merchantId":"0010001",
"errCode":"0",
"requestId":"200100011649756102739",
"productName":"Test",
"status":"01",
"transFeeRate":"0",
"transFeeAmount":"0",
"totalTransFee":"0",
"vatFee":"0"
}