Registration - API QRIS SNAP
About Registration - API QRIS SNAP
This API with SNAP standards uses to request order registration before proceeding with payment using the QRIS payment method.
Registration - API QRIS SNAP
Please request the access token firsthand before doing the authentication through the Request Access Token API - SNAP section.
Service Code | 47 |
|---|---|
API Endpoint | /api/v1.0/qr/qr-mpm-generate |
HTTP Method | POST |
Description | Merchant Request Registration API QRIS |
Content-type | application/json |
Request Header Parameter for Registration - API QRIS SNAP
Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
Content-Type | String (127) | Mandatory | Type of the content | Application/Json |
X-TIMESTAMP | String (25) | Mandatory | Using ISO 8601 as timestamp format. Transaction date time, in format YYYYMMDDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time). 2022-03-21T10:11:40+07:00. | |
Authorization | String (Variable) | Mandatory | "Bearer" + {access_token} | |
X-SIGNATURE | String (Variable) | Mandatory | Signature will be generated by Merchant. | |
X-PARTNER-ID | String (20) | Mandatory | NICEPAY Client ID (MID) | IONPAYTEST |
X-EXTERNAL-ID | String (40) | Mandatory | Unique messaging Reference ID generated by Merchant. Numeric String. Reference number that should be unique in every transaction in One Day. | |
CHANNEL-ID | String (5) | Mandatory | Unique Channel Merchant Credential ID Number. Client ID + "01" = Channel ID "IONPAYTEST" + "01" = "IONPAYTEST01" | IONPAYTEST01 |
Request Body Parameter for Registration - API QRIS SNAP
Parameter | Parameter Type | Required | NICEPAY Parameter | Description | Example |
|---|---|---|---|---|---|
partnerReferenceNo | String (40) | Mandatory | referenceNo | Unique Transaction ID from Merchant | OrdNo20230303001 |
amount | Object | Mandatory | - | "amount": { "value":"100", "currency":"IDR" } | - |
- value | String (12) | Mandatory | amt | Transaction Amount Note: Amount Format, currently only supported IDR (Indonesian Currency Rupiah) then value includes 2 decimal digits which are seperated by a dot (.) | 10000.00 |
- currency | String (3) | Mandatory | currency | Default Value: IDR | IDR |
merchantId | String (10) | Mandatory | iMid | Merchant Identifier | |
storeId | String (32) | Optional | storeCd / shopId | Merchant ID from Acquirer Pay Side | |
validityPeriod | String (25) | Mandatory | paymentExpDt paymentExpTm | Set Default: 5 minutes Maximum: 20 minutes Using ISO 8601 Timestamp Format | |
additionalInfo | Object | Mandatory | - | "additionalInfo": { ..., "cartData":"{...}", "mitraCd":"QSHP" } | - |
- goodsNm | String (200) | Mandatory | - | Goods Name | |
- billingNm | String (100) | Mandatory | - | Buyer Name | |
- billingPhone | String (20) | Mandatory | - | Buyer Phone Number | |
- billingEmail | String (100) | Mandatory | - | Buyer Email | |
- billingCity | String (50) | Mandatory | | Buyer City | |
- billingState | String (50) | Mandatory | - | Buyer State | |
- billingPostCd | String (10) | Mandatory | - | Buyer Post Number | |
- billingCountry | String (10) | Mandatory | - | Buyer Country | |
- callBackUrl | String (500) | Conditional | - | | |
- dbProcessUrl | String (500) | Mandatory | - | Payment Notification URL (Async Notification) | |
- userIP | String (64) | Mandatory | - | User IP (Customer) | |
- cartData | String (4000) | Mandatory | - | JSON String | |
- mitraCd | String (4) | Mandatory | - | | |
- msId | String (20) | Optional | - | Merchant Seller ID | |
- msFee | String (7) | Optional | - | Merchant Seller Fee | |
- msFeeType | String (2) | Optional | - | Merchant Seller Fee Type | |
- mbFee | String (7) | Optional | - | Merchant Balance Fee | |
- mbFeeType | String (2) | Optional | - | Merchant Balance Fee Type | |
Request Cart Data Parameter for Registration - API QRIS SNAP
Parameter | Description | Example |
|---|---|---|
count | Total Cart Data Count | 1 |
item | | |
- img_url | Goods Image URL (Image Size 50px*50px) | https://merchant.com/goodsImg.png |
- goods_name | Goods Name | Merchant Goods |
- goods_detail | Goods Detail Description | Goods Type 001 |
- goods_amt | Goods Payment Amount | 100 |
- goods_quantity | Goods Quantity | 1 |
Response Parameter for Registration - API QRIS SNAP
Parameter | Parameter Type | Required | NICEPAY Parameter | Description | Example |
|---|---|---|---|---|---|
responseCode | String (7) | Mandatory | responseCode | Error code to specify the error returned | 2004700 |
responseMessage | String (150) | Mandatory | responseMsg | Debug message to provide more information. | Successful |
referenceNo | String (40) | Mandatory | tXid | NICEPAY Transaction ID or Identifier | IONPAYTEST08202106091121206416 |
partnerReferenceNo | String (40) | Mandatory | referenceNo | Transaction identifier on Merchant side | ncpy20221017161458 |
qrContent | String (360) | Mandatory | qrContent | QR string in plain text | "000201010212265400161D.CO.SHOPEE.WWWO11893600918002024585002082024585052041234530 336054041.0058021D5911test6007Bandung61054016362200516-1- July 20-126304D0A9 |
qrUrl | String (360) | Mandatory | qrUrl | URL to download QR image, URL is valid for 5 minutes | https: //xxx.co.id/v3/merchant-host/qr/download? 4aRLCjAqjXYxIFavFxz0EPRX5C£G4nnzgEauyn1rL" |
additionalInfo | Object | Mandatory | - | "additionalinfo": { ... } | |
- goodsNm | String (200) | Mandatory | - | Goods name | Merchant Goods 1 |
- billingNm | String (100) | Mandatory | - | Buyer name | John Doe |
- validityPeriod | String (25) | Mandatory | paymentExpDt, paymentExpTm | Transaction date ISO-8601 | 2023-03-08T07:15:00+07:00 |
- mitraCd | String (4) | Mandatory | | QSHP | |
- msId | String (20) | Optional | | Merchant Seller ID | 123 |
- msFee | String (7) | Optional | | Merchant Seller Fee | 2000 |
- msFeeType | String (2) | Optional | | Merchant Seller Fee Type | 2 |
- mbFee | String (7) | Optional | | Merchant Balance Fee | 2000 |
- mbFeeType | String (2) | Optional | | Merchant Balance Fee Type | 2 |
Sample Parameter for Registration - API QRIS SNAP
Request Parameter
// --- 1. Configure the NICEPay client ---
NICEPay config = NICEPay.builder()
.isProduction(false)
.clientSecret("YOUR_CLIENT_SECRET")
.partnerId("TNICEQR081")
.externalID("09041220240418")
.timestamp("2022-04-18T09:00:40+07:00")
.privateKey("YOUR_PRIVATE_KEY")
.build();
// --- 2. Set the Access Token ---
String accessToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJUTklDRVFSMDgxIiwiaXNzIjoiTklDRVBBWSIsIm5hbWUiOiJOSUNFUEFZIiwiZXhwIjoiMjAyNC0wNC0xOFQwMjozMToyOVoifQ==.5F1rppWeObC_EqJyW64W87F3M1_TLS5DzfzFhjxPZSs=";
// --- 3. Build the Qris request body ---
String cartDataJson = "{\"count\":1,\"item\":[{\"img_url\":\"https://d3nevzfk7ii3be.cloudfront.net/igi/vOrGHXlovukA566A.medium\",\"goods_name\":\"Nokia 3360\",\"goods_detail\":\"Old Nokia 3360\",\"goods_amt\":\"100\",\"goods_quantity\":\"1\"}]}";
Qris qris = Qris.builder()
.merchantId("TNICEQR081")
.storeId("NicepayStoreID1")
.amount("100.00", "IDR")
.partnerReferenceNo("ordNo2022120215134035")
.validityPeriod("2024-04-18T10:31:33+07:00")
.additionalInfo(
"Test SNAP Transaction Nicepay",
"John Doe",
"082213561712",
"[email protected]",
"Jakarta",
"Jalan Bukit Berbunga 22",
"DKI Jakarta",
"12345",
"Indonesia",
"https://ptsv2.com/t/jhon/post",
"https://ptsv2.com/t/jhon/post",
"127.0.0.1",
cartDataJson,
"QSHP",
"", // msId
"", // msFee
"", // msFeeType
"", // mbFee
"" // mbFeeType
)
.build();
// --- 4. Make the API call ---
NICEPayResponse response =
SnapQrisService.callServiceQrisRegist(qris, accessToken, config);
Response Parameter
{
"responseCode": "2004700",
"responseMessage": "Successful",
"referenceNo": "TNICEQR08108202404181012168473",
"partnerReferenceNo": "ordNo2022120215134035",
"qrContent": "00020101021226610016ID.CO.SHOPEE.WWW01189360091800202508660208202508660303UMI5204123453033605406100.005802ID5913NicepayStore16015KAB. ACEH BARAT61052365962360520082024041810121600660708T00000026304C6F6",
"qrUrl": "https://mapi.gw.uat.airpay.co.id/v3/merchant-host/qr/download?qr=pS03QyB4ZmuQMPdhSIl1jIr2WmPx3ErgJ3VJbaVfWC",
"additionalInfo": {
"goodsNm": "Test SNAP Transaction Nicepay",
"billingNm": "John Doe",
"mitraCd": "QSHP",
"validityPeriod": "2024-04-18T10:31:33+07:00"
}
}