<html-block html=”
“>
Header Name | Header Value |
---|---|
Content-Type | application/json |
X-VERIFY | SHA256(“/v3/vpa/{merchantId}/{vpa}/validate” + saltKey) + “###” + saltIndex |
<html-block html=”
“>
Parameter Name | Type | Description | Mandatory |
---|---|---|---|
merchantId | STRING | Unique Merchant ID assigned to the merchant by PhonePe | Yes |
vpa | STRING | VPA (UPI ID) for which validation is required | Yes |
<html-block html=”
“>
Parameter Name | Type | Description |
---|---|---|
success | BOOLEAN | A boolean to indicate the success/failure of the request. Merchant should check for this parameter if VPA exists or not |
code | ENUM (see list of codes below) | This parameter is used to decide if collect was successfully sent or not. |
message | STRING | Short message about status of VPA |
exists | BOOLEAN | Flag indicates if VPA (UPI ID) exists |
name | STRING | Name of the person registered on this VPA |
vpa | STRING | VPA ID passed in request |
<html-block html=”
“>
Code | Description |
---|---|
EXTERNAL_VPA_ERROR | Incorrect VPA. VPA ID does not exists. |
BAD_REQUEST | Some mandatory parameter was missing |
AUTHORIZATION_FAILED | Checksum sent in header was not valid |
INTERNAL_SERVER_ERROR | Something went wrong |
- 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