PaymentLink API


PaymentLink API is used to send a payment request to the customer’s mobile number via a text message.

Header NameHeader Value
Content-Typeapplication/json
X-VERIFYSHA256(base64 encoded payload + “/v3/payLink/init” + salt key) + ### + salt index
X-PROVIDER-IDUsed for the cases where the merchants are getting onboarded via their Providers
X-CALLBACK-URLMerchants need to pass their Callback URL to receive automated callbacks/ webhooks from Phonepe post performing transactions
Sample Request JSON
{
 "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"
}
Encoded Request Body
{
    "request": "ewogIm1lcmNoYW50SWQiOiJVQVRNRVJDSEFOVDEwMSIsCiAidHJhbnNhY3Rpb25JZCI6IkE2NjEiLAogIm1lcmNoYW50T3JkZXJJZCI6Ik0xMjM0NTY3ODkiLAogImFtb3VudCI6MTAwLAogIm1vYmlsZU51bWJlciI6IjcwNjUyNjU0MDciLAogIm1lc3NhZ2UiOiJjb2xsZWN0IGZvciAxIG9yZGVyIiwKICJleHBpcmVzSW4iOjM2MDAsCiAic2hvcnROYW1lIjoiRGVtb0N1c3RvbWVyIiwKICJzdWJNZXJjaGFudElkIjoiRGVtb01lcmNoYW50Igp9"
}
Sample Response JSON
{
    "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"
    }
}
Parameter NameData TypeDescription
successBooleanSuccess status of the request
codeENUMStatus of the transaction
messageStringShort message about status of request
dataJSONDATA 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
Is this article helpful?