Verify VPA
get https://api-preprod.phonepe.com/apis/pg-sandbox/v3/vpa/{merchantId}/{vpa}/validate

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

Request Headers

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

Path Parameters

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

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

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
  1. To check if a VPA is valid, Merchant should consider the following values.
    The value of data would be populated only if value of
  • success: true
  • code: SUCCESS
{“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”:””,”desc”:”SHA256(\”/v3/vpa/{merchantId}/{vpa}/validate\” + saltKey) + \”###\” + saltIndex”,”required”:true,”in”:”header”,”ref”:””,”_id”:”5b333235807ba50003d7dba3″}],”apiSetting”:”63bb01b11abcf7046d98754c”,”examples”:{“codes”:[]}}
https://api-preprod.phonepe.com/apis/pg-sandbox

HEADERS
merchantId string
Unique Merchant ID assigned to the merchant by PhonePe
vpa string
VPA (UPI ID) for which validation is required
Content-Type string required
X-VERIFY string required
SHA256("/v3/vpa/{merchantId}/{vpa}/validate" + saltKey) + "###" + saltIndex

RESPONSES