Unlinking

Used to unlink the PhonePe account with Merchant account of customer. The userAuthToken is also invalidated. This doesn’t involve any UI flow. Merchant needs to implement their own UI.

<html-block html=”

Request Headers

“>

Header NameHeader Value
Content-Typeapplication/json
X-VERIFYSHA256(base64 encoded payload +
‘/v3/merchant/token/unlink’ + salt key) +
‘###’ + salt index
{
 "merchantId": "MID",
 "userAuthToken": "TXN12345"
}
{
 "request" : "ew0KCeKAnG1lcmNoYW50SWTigJ06IOKAnE1JROKAnQ0KCeKAnHVzZXJBdXRoVG9rZW7igJ06IOKAnFRYTjEyMzQ14oCdLA0KfQ0K"
}

<html-block html=”

Request Parameters

“>

Parameter NameTypeDescription
merchantIdstringUnique merchantId assigned to merchant.
userAuthTokenstringAuth token for the user

<html-block html=”

Response Parameters

“>

Parameter NameTypeDescription
successbooleanDenotes if API call is successful.
codestringSee below for list of values
dataObjectSee below table

<html-block html=”

Response Codes

“>

Code ValueDescription
SUCCESSSuccess scenario
AUTHORIZATION_FAILEDValue of X-VERIFY is incorrect
BAD_REQUESTInvalid request payload
INTERNAL_SERVER_ERRORThe server is busy or the server is not responding
USER_BLACKLISTEDCustomer is blacklisted on PhonePe side
INVALID_USER_AUTH_TOKENThe userAuthToken provided is either invalid or not mapped to merchant.

<html-block html=”

Response Data

“>

Parameter NameTypeDescription
merchantIdstringmerchantId assigned to merchant.
userAuthTokenstringThe disabled Auth token for the user
{“method”:”post”,”url”:”/v3/merchant/token/unlink”,”auth”:”required”,”apiSetting”:”5ecf9143b5bd210023b3b738″,”examples”:{“codes”:[]},”results”:{“codes”:[{“name”:”Success Response”,”code”:”{\n \”success\”: true,\n \”code\”: \”SUCCESS\”,\n \”message\”: \”Your request has been successfully completed.\”,\n \”data\”: {\n \”merchantId\”: \”M2306160483220675579140\”,\n \”userAuthToken\”: \”M23061604832206755791408c38b65b84314a3293b8eb9a5ad43079\”\n }\n}\n”,”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”:”5a97e36dfd23730045ac1657″},{“name”:”Content-Type”,”type”:”string”,”enumValues”:””,”default”:”application/json”,”desc”:””,”required”:true,”in”:”header”,”ref”:””,”_id”:”5a97e36dfd23730045ac1656″},{“name”:”X-VERIFY”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”sha256(base64encodedRequest + \”/v3/merchant/token/unlink\” + saltKey) + \”###\” + saltIndex”,”required”:true,”in”:”header”,”ref”:””,”_id”:”5a97e36dfd23730045ac1655″}]}
https://mercury-uat.phonepe.com