PaymentLink API

PROD

Base Url: https://mercury-t2.phonepe.com

Paylink Endpoint: https://mercury-t2.phonepe.com/v3/payLink/init

{
 "merchantId":"MERCHANTUAT",
 "transactionId":"TEST20231004021536",
 "merchantOrderId":"TEST20231004021536",
 "amount":100,
 "mobileNumber":"8296412345",
 "message":"paylink for 1 order",
 "expiresIn":3600,
 "storeId":"store1",
 "terminalId":"terminal1",
 "shortName":"DemoCustomer",
 "subMerchantId":"DemoMerchant"
}
{
    "request": "ewogIm1lcmNoYW50SWQiOiJVQVRNRVJDSEFOVDEwMSIsCiAidHJhbnNhY3Rpb25JZCI6IkE2NjEiLAogIm1lcmNoYW50T3JkZXJJZCI6Ik0xMjM0NTY3ODkiLAogImFtb3VudCI6MTAwLAogIm1vYmlsZU51bWJlciI6IjcwNjUyNjU0MDciLAogIm1lc3NhZ2UiOiJjb2xsZWN0IGZvciAxIG9yZGVyIiwKICJleHBpcmVzSW4iOjM2MDAsCiAic2hvcnROYW1lIjoiRGVtb0N1c3RvbWVyIiwKICJzdWJNZXJjaGFudElkIjoiRGVtb01lcmNoYW50Igp9"
}
{
    "success": true,
    "code": "SUCCESS",
    "message": "Your request has been successfully completed.",
    "data": {
        "transactionId": "TEST20231004021536",
        "amount": 100,
        "merchantId": "MERCHANTUAT",
        "upiIntent": "upi://pay?pa=MERCHANTUAT@ybl&pn=P2Mstore3&am=100&mam=100&tr=TEST20231004021536&tn=Payment%20for%20M123456789&mc=5192&mode=04&purpose=00",
        "payLink": "http://preprod.phon.pe/p3cgztr4",
        "mobileNumber": "8296412345"
    }
}

Response Body

Parameter NameData TypeDescription
successBooleanSuccess status of the request
codeENUMStatus of the transaction
messageStringShort message about status of request
dataJSONDATA JSON Object

Data JSON Object

Parameter NameData TypeDescription
transactionIdStringUnique Transaction ID generated by the merchant to track
this request to PhonePe
amountLONGTransaction amount in paise
merchantIdStringUnique Merchant ID assigned to the merchant by
PhonePe
payLinkShort URLPayment link to be shared with customer
mobileNumberStringMobile Number
storeIdStringStore ID
terminalIdStringTerminal ID
{“method”:”post”,”url”:”/v3/payLink/init”,”auth”:”required”,”results”:{“codes”:[{“name”:””,”code”:”{}”,”language”:”json”,”status”:200},{“name”:””,”code”:”{}”,”language”:”json”,”status”:400}]},”params”:[{“name”:”request”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”base64 encoded payload”,”required”:true,”in”:”body”,”ref”:””,”_id”:”6526906535afde004aae6ea7″},{“name”:”Content-Type”,”type”:”string”,”enumValues”:””,”default”:”application/json”,”desc”:””,”required”:true,”in”:”header”,”ref”:””,”_id”:”6526906535afde004aae6ea6″},{“name”:”X-VERIFY”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”SHA256(base64 encoded payload + \”/v3/payLink/init\” + salt key) + ### + salt index”,”required”:true,”in”:”header”,”ref”:””,”_id”:”6526906535afde004aae6ea5″},{“name”:”X-CALLBACK-URL”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”Dynamic callback URI for server to server callback”,”required”:false,”in”:”header”,”ref”:””,”_id”:”6526906535afde004aae6ea4″},{“name”:”X-CALL-MODE”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”HTTP mode to be used for server to server callback”,”required”:false,”in”:”header”,”ref”:””,”_id”:”6526906535afde004aae6ea3″},{“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”:”6526906535afde004aae6ea2″}],”examples”:{“codes”:[]},”apiSetting”:”64c244096688b200429110a5″}
https://mercury-uat.phonepe.com/enterprise-sandbox