UPI Address Validate API
This API to validate whether the UPI address (VPA) provided by the customer is valid and ready to accept payments.
Environment
| Environment | HTTP Method | API |
| Sandbox | POST | https://api-preprod.phonepe.com/apis/pg-sandbox/v2/validate/upi |
| Production | POST | https://api.phonepe.com/apis/pg/v2/validate/upi |
Request
Request Header
| Header Name | Header Value |
| Content-Type | application/json |
Authorization | O-Bearer <access_token> |
Request Parameters
| Parameter Name | Data Type | Mandatory | Description | Constraints |
| String | Yes | Type of UPI Payment Address. | Values allowed: • VPA • UPI_NUMBER |
vpa | String | Conditional | VPA of user to validate. | Max Length = 255 Pass only if “type” = “VPA” |
Sample Request
{
"type": "VPA",
"vpa": "****@ybl" //add success@ybl/failure@ybl/pending@ybl here.
}📘 Simulating PhonePe Mandate Responses!
In the UAT environment, you will not receive an actual collect request. The system provides a mocked API response that is simulated based on the VPA address you enter.
To test the different scenarios, please follow these steps:
- In the VPA Address field, enter one of the following test VPAs:
Success@ybl(Simulates a successful validation and mandate creation)Failure@ybl(Simulates a failed validation)Pending@ybl(Simulates a pending or in-progress response)
- After submitting, the API will return a corresponding response based on the VPA you entered.
- Please verify that the subscription status correctly reflects that API response.
Response
Sample Response for Case 1: VPA is Valid
{
"valid": true,
"name": "<Name of User>"
}Sample Response for Case 2: Invalid VPA
{
"valid": false
}| Field Name | Data Type | Description |
|---|---|---|
valid | Boolean | • true → UPI address is valid. • false → UPI address is not valid. |
name | String | Name of the user. |
Try it yourself!
Request Payload with VPA
headers
body params