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

Data Signing Rules

Field NameTypeValueRequired
Content-TypeString(30)Fixed value "application/json;charset=utf-8"Yes
X-TIMESTAMPString(29)Current time, format 2022-09-16T16:58:47.964+07:00Yes
X-SIGNATUREString(64)Signature. For details please check Data Signing RulesYes
X-PARTNER-IDString(20)Merchant IDYes
X-REQUEST-IDString(64)Unique ID for each requestYes

Body

ParameterTypeRequiredRemarks
requestIdString(64)YesUnique identifier on every request
merchantIdString(20)YesThe unique identifier provided by payment gateway to the merchant
storeIdString(30)NoOnly if merchant has branches and wish to create order using its branch ID
paymentTypeString(20)YesThe name of the payment type; check Payment Type below
amountDecimal(12,2)YesAmount in Indonesia Rupiah
merchantTradeNoString(32)YesThe unique identifier created by the merchant for each transaction
notifyUrlString(200)NoThe URL that will be redirected to after payment is done; see Order Inquiry for parameters
expireNumberNoUnit seconds; channel default varies
feeTypeString(3)NoFee deduction type: BEN/OUR. Default BEN. OUR will add fee to order amount automatically.
productNameString(100)YesProduct/service name
+ productInfoArray<Object>(30)NoProduct/service details
- idString(10)YesProduct ID
- nameString(32)YesProduct Name
- pricedecimal(12,2)YesAmount in IDR, supports two decimals
- typeString(20)YesProduct Type
- urlString(200)NoProduct URL
- quantityNumber(4)YesProduct Quantity

paymentType

Payment TypeCode
QRISQRIS

Generate QRIS Response Parameters

Header

Data Signing Rules

Field NameTypeValueRequired
Content-TypeString(30)Fixed value "application/json;charset=utf-8"Yes
X-TIMESTAMPString(29)Current time, format 2022-09-16T16:58:47.964+07:00Yes
X-SIGNATUREString(64)Signature. For details please check Data Signing RulesYes
X-PARTNER-IDString(20)Merchant IDYes
X-REQUEST-IDString(64)Unique ID for each requestYes

Body

Error Code

ParameterTypeRequiredRemarks
requestIdString(64)YesUnique identifier on every request
errCodeString(32)Yes0 means success, otherwise see Error Code
errCodeDesString(128)NoError description
merchantIdString(20)YesMerchant ID
storeIdString(30)NoOnly if using branch ID channel account
paymentTypeString(20)YesPayment type
requestAmountDecimal(12,2)NoAmount at request
amountDecimal(12,2)YesAmount 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).
merchantTradeNoString(32)YesMerchant order number
createTimeString(16)NoyyyyMMddHHmmss
qrCodeString(300)NoQRIS code
qrisUrlString(300)NoQRIS image link
nmidString(32)NoNational Merchant ID
platformTradeNoString(32)NoPaylabs platform order number
successTimeString(16)NoyyyyMMddHHmmss
expiredTimeString(16)NoyyyyMMddHHmmss
statusString(32)No01: Pending, 09: Failed, 02: Success
productNameString(100)YesProduct/service name
rrnString(32)NoPayment success code
tidString(32)NoTerminal/POS ID
payerString(60)NoActual payer name if supported; otherwise null. Currently only QRIS. Not the payer sent by merchant.
phoneNumberString(20)NoPayer phone
issuerIdString(20)NoIssuer Application ID
+ productInfoArray<Object>(30)NoProduct/service details
- idString(10)YesProduct ID
- nameString(32)YesProduct Name
- pricedecimal(12,2)YesAmount in IDR, supports two decimals
- typeString(20)YesProduct Type
- urlString(200)NoProduct URL
- quantityNumber(4)YesProduct Quantity
transFeeRateDecimal(6,6)NoTransaction Rate, six decimals
transFeeAmountDecimal(12,2)NoFees, two decimals
totalTransFeeDecimal(12,2)NoTotal transaction fee rate (excluding vatFee), two decimals
vatFeeDecimal(12,2)NoTaxes, two decimals
accountNoString(32)NoAccount 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"
}