Verify VPA

This API is used to check if the given VPA is valid or not.

<html-block html=”

Request Headers

“>

Header NameHeader Value
Content-Typeapplication/json
X-VERIFYSHA256(“/v3/{merchantId}/{vpa}/validate” +
saltKey) + “###” + saltIndex

<html-block html=”

Path Parameters

“>

Parameter NameTypeDescriptionMandatory
merchantIdSTRINGUnique Merchant ID assigned to the merchant by PhonePeYes
vpaSTRINGVPA (UPI ID) for which validation is requiredYes

<html-block html=”

Response Parameters

“>

Parameter NameTypeDescription
successBOOLEANA boolean to indicate the success/failure of the request. Merchant should check for this parameter if VPA exists or not
codeENUM(see list of codes below)This parameter is used to decide if collect was successfully sent or not.
messageSTRINGShort message about status of VPA
exists
BOOLEANFlag indicates if VPA (UPI ID) exists
nameSTRINGName of the person registered on this VPA
vpaSTRINGVPA ID passed in request

<html-block html=”

Response Codes

“>

CodeDescription
EXTERNAL_VPA_ERRORIncorrect VPA. VPA ID does not exists.
BAD_REQUESTSome mandatory parameter was missing
AUTHORIZATION_FAILEDChecksum sent in header was not valid
INTERNAL_SERVER_ERRORSomething went wrong

To check if a VPA is valid, Merchant should consider the following values:
success:true, code:”SUCCESS”, exists:true

The value of data would be populated only if value of success is true.

{“method”:”get”,”url”:”/v3/vpa/{merchantId}/{vpa}/validate”,”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 \”exists\”: true,\n \”name\”: \”Arun\”,\n \”vpa\”: \”arunsharma@ybl\”\n }\n}\n”,”name”:”Success Response”},{“status”:417,”language”:”json”,”code”:”{\n \”success\”: false,\n \”code\”: \”EXTERNAL_VPA_ERROR\”,\n \”message\”: \”Incorrect UPI details. Please check the UPI ID entered.\”,\n \”data\”: {}\n}\n”,”name”:”Invalid VPA”},{“status”:400,”language”:”json”,”code”:”{\n \”success\”: false,\n \”code\”: \”BAD_REQUEST\”,\n \”message\”: \”Please check the inputs you have provided.\”,\n \”data\”: {}\n}\n”}]},”params”:[{“name”:”merchantId”,”type”:”string”,”enumValues”:””,”default”:”M2306160483220675579140″,”desc”:”Unique Merchant ID assigned to the merchant by PhonePe”,”required”:false,”in”:”path”,”ref”:””,”_id”:”5b333235807ba50003d7dba6″},{“name”:”vpa”,”type”:”string”,”enumValues”:””,”default”:”adityajain27@ybl”,”desc”:”VPA (UPI ID) for which validation is required”,”required”:false,”in”:”path”,”ref”:””,”_id”:”5b333235807ba50003d7dba5″},{“name”:”Content-Type”,”type”:”string”,”enumValues”:””,”default”:”application/json”,”desc”:””,”required”:true,”in”:”header”,”ref”:””,”_id”:”5b333235807ba50003d7dba4″},{“name”:”X-VERIFY”,”type”:”string”,”enumValues”:””,”default”:”5024dbd7ef52a84b5db63431b9ce34fa055deadca08a16a8480c0649da1cee16###1″,”desc”:”SHA256(\”/v3/vpa/{merchantId}/{vpa}/validate\” + saltKey) + \”###\” + saltIndex”,”required”:true,”in”:”header”,”ref”:””,”_id”:”5b333235807ba50003d7dba3″}],”apiSetting”:”5ecf9143b5bd210023b3b738″,”examples”:{“codes”:[]}}
https://mercury-uat.phonepe.com