UPI Address Validate API


This API to validate whether the UPI address (VPA) provided by the customer is valid and ready to accept payments.

EnvironmentHTTP MethodAPI
SandboxPOSThttps://api-preprod.phonepe.com/apis/pg-sandbox/v2/validate/upi
ProductionPOSThttps://api.phonepe.com/apis/pg/v2/validate/upi
Request Header
Header NameHeader Value
Content-Typeapplication/json
AuthorizationO-Bearer <access_token>
Request Parameters
Parameter NameData TypeMandatoryDescriptionConstraints
typeStringYesType of UPI Payment Address.Values allowed:
VPA
UPI_NUMBER
vpaStringConditionalVPA 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:

  1. 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)
  2. After submitting, the API will return a corresponding response based on the VPA you entered.
  3. Please verify that the subscription status correctly reflects that API 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 NameData TypeDescription
validBooleantrue → UPI address is valid.
false → UPI address is not valid.
nameStringName of the user.

Request Payload with VPA

headers
body params

Is this article helpful?