This api is used to validate UPI VPA address.
API Details :
Copied !
Host URL
Environment | Http Method | Header Value |
---|---|---|
Sandbox | POST | https://api-preprod.phonepe.com/apis/pg-sandbox |
Production | POST | https://api.phonepe.com/apis/pg |
API Endpoint
/v2/validate/upi
Request Details
Copied !
Request Headers
Header Name | Header Value |
---|---|
Content-Type | application/json |
Authorization | O-Bearer <access_token> |
Request Parameters
Parameter Name | Data Type | Description | Mandatory (Yes/No) | Constraints |
type | STRING | Type of UPI Payment Address | Yes | Values allowed = [VPA] |
vpa | STRING | VPA of user to validate | Yes | Max Length = 255 |
Request Payload
{
"type": "VPA",
"vpa": "abc@ybl"
}
Response from the API :
Response Headers:
Header Name | Header Value |
---|---|
Content-Type | application/json |
Response Payload:
Case 1: VPA is Valid
{
"valid": true,
"name": "<Name of User>"
}
Case 2: Invalid VPA
{
"valid": false
}
Response Field Details:
Field Name | Data Type | Description |
---|---|---|
valid | Boolean | true → UPI address is valid. false → UPI address is not valid. |
name | String | Name of the user. |