StaticQR Init API
post https://mercury-uat.phonepe.com/enterprise-sandbox/v1/sqr

Request Headers

Header NameHeader Value
Content-Typeapplication/json
X-VERIFYSHA256(base64 encoded payload + “/v1/sqr” +
salt key) + ### + salt index
Sample Request - Payload
{ "merchantId": "PHONEPETESTUAT", "storeId": "teststore1", "orderId": "testorder", "message": "test message for user", "amountRestrictionType": "UNKNOWN", "activeTill": 1738139169 }
Sample Request - Base64 Encoded Payload
{ "request": "ewogICAgIm1lcmNoYW50SWQiOiAiUEhPTkVQRVRFU1RVQVQiLAogICAgInN0b3JlSWQiOiAidGVzdHN0b3JlMSIsCiAgICAib3JkZXJJZCI6ICJ0ZXN0b3JkZXIiLAogICAgIm1lc3NhZ2UiOiAidGVzdCBtZXNzYWdlIGZvciB1c2VyIiwKICAgICJhbW91bnRSZXN0cmljdGlvblR5cGUiOiAiVU5LTk9XTiIsCiAgICAiYWN0aXZlVGlsbCI6IDE3MzgxMzkxNjkKfQ==" }

Request Parameters

Parameter NameTypeDescriptionMandatory
merchantIdSTRINGUnique MerchantID assigned to the merchant by PhonePeYes
superMerchantIdSTRINGUnique ID for the master MerchantID under which the multiple MIDs are taggedNo
storeIdSTRINGStore Id of store. Should be unique across. Special characters like ” “, “,”, “@” etc. are not allowed. Length should be lesser than 38 charactersYes
terminalIdSTRINGStore Id of store. Should be unique across. Special characters like ” “, “,”, “@” etc. are not allowed. Length should be lesser than 38 charactersNo
orderIdSTRINGUnique orderId for each POS payments. Special characters like ” “, “,”, “@” etc. are not allowed. Length should be lesser than 38 charactersNo
customerIdSTRINGUnique customerId for whom the QRCode is created. Avoid Special characters like ” “, “,”, “@” etc. Length should be lesser than 38 charactersNo
messageSTRINGMessage for the user. Special characters like ” “, “,”, “@” etc. are not allowed. Length should be lesser than 38 charactersNo
amountRestrictionTypeSTRINGThe type of restriction required for the QRcode, possible values are FIXED_AMOUNT, MIN_BOUNDED, UNKNOWNYes
amountSTRINGThe amount to be populated in SQR. Mandatory in case of FIXED_AMOUNT QR codeYes
activeFromLONGThe activeFrom parameter used as start timestamp and it’s in epoch datetime format.No
activeTillLONGThe activeTill parameter used as the end timestamp and it’s in epoch datetime format.Yes
minAmountSTRINGThe amount to be populated in SQR. Mandatory in case of MIN_BOUNDED QR codeYes
Sample Success Response
{ "success": true, "data": { "staticQrCodeId": "EQR2407291400248170583464", "merchantId": "PHONEPETESTUAT", "storeId": "teststore1", "terminalId": "ET2407291400248170583056", "orderId": "testorder", "message": "test message for user", "amountRestrictionType": "UNKNOWN", "sourceType": "INTERNAL_API", "state": "ENABLED", "intent": "upi://pay?mode=02&pa=EQR2407291400248170583464@ybl&purpose=00&mc=5311&pn=PhonePeMerchant&orgid=500044", "activeTill": [ 2025, 1, 29, 13, 56, 9 ] } }
{“method”:”post”,”url”:”/v1/sqr”,”auth”:”required”,”results”:{“codes”:[{“status”:200,”language”:”json”,”code”:”{\n \”success\”: true,\n \”code\”: \”SUCCESS\”,\n \”message\”: \”Your request has been successfully completed.\”,\n \”data\”: {\n \”merchantId\”: \”MERCHANTUAT\”,\n \”transactionId\”: \”TX32321849644234\”,\n \”amount\”: 1000,\n \”qrString\”: \”upi://pay?pa=MERCHANTUAT@ybl&pn=Test%20MerchantTT&am=10.00&mam=10.00&tr=TX32321849644234&tn=Payment%20for%20TX32321849644234&mc=5311&mode=04&purpose=00&gstBrkUp=GST:1.0|CGST:0.25|SGST:0.25|IGST:0.25|CESS:0.25|GSTIncentive:1.0|GSTPCT:10.0&invoiceNo=123456fffff##_##&invoiceDate=2021-06-29T15:43:54+05:30&invoiceName=bccbd_cjdcdjc******\”\n }\n}”,”name”:””},{“status”:400,”language”:”json”,”code”:”{}”,”name”:””}]},”params”:[{“name”:”request”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”base64 encoded payload”,”required”:true,”in”:”body”,”ref”:””,”_id”:”5b33509909875c0003cd7b18″},{“name”:”X-VERIFY”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”SHA256(base64 encoded payload + \”/v1/sqr\” + salt key) + ### + salt index”,”required”:true,”in”:”header”,”ref”:””,”_id”:”5b33509909875c0003cd7b17″},{“name”:”X-CALL-MODE”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”HTTP mode to be used for UI callback. Default Values are POST/PUT.”,”required”:false,”in”:”header”,”ref”:””,”_id”:”5b3350c906aa32000399ead3″},{“name”:”Content-Type”,”type”:”string”,”enumValues”:””,”default”:”application/json”,”desc”:””,”required”:false,”in”:”header”,”ref”:””,”_id”:”5b3350c906aa32000399ead1″},{“name”:”X-PROVIDER-ID”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”Used for the cases where the merchant has multiple merchant IDs”,”required”:false,”in”:”header”,”ref”:””,”_id”:”5f43d752d2b7fb00182dd92c”}],”apiSetting”:”64c244096688b200429110a5″,”examples”:{“codes”:[]}}
https://mercury-uat.phonepe.com/enterprise-sandbox

HEADERS
X-VERIFY string required
SHA256(base64 encoded payload + "/v1/sqr" + salt key) + ### + salt index
X-CALL-MODE string
HTTP mode to be used for UI callback. Default Values are POST/PUT.
Content-Type string
X-PROVIDER-ID string
Used for the cases where the merchant has multiple merchant IDs

BODY PARAMS
request string required
base64 encoded payload

RESPONSES