In UPI collect flow, users have to enter a Virtual Payment Address (VPA) to make the payment. The VPA can be verified using this API.

Request Headers

Header NameHeader Value
Content-Typeapplication/json
X-VERIFYSHA256(base64 encoded payload + "/pg/v1/vpa/validate" + salt key) + ### + salt index
{
  "merchantId":"JUSPAYUAT",
  "vpa":"[email protected]"
}
{
  "request": "ewogICJtZXJjaGFudElkIjoiSlVTUEFZVUFUIiwKICAidnBhIjoiOTk5OTk5OTk5OUB5YmwiCn0K"
}

Request Parameters

Parameter NameTypeDescriptionMandatory
merchantIdSTRINGUnique Merchant ID assigned to the merchant by PhonePeYes
vpaSTRINGThe virtual payment address you want to validateYes

Sample Response

{
    "success": true,
    "code": "SUCCESS",
    "message": "Your request has been successfully completed.",
    "data": {
        "name": "ABC",
        "vpa": "[email protected]"
    }
}
{
    "success": false,
    "code": "INVALID_VPA",
    "message": "Incorrect UPI details. Please check the UPI ID entered.",
    "data": {}
}

Response Parameters

Parameter NameTypeDescription
successBOOLEANSuccess/Failure of request processing
codeSTRINGResponse code explaining reason for status.
For status SUCCESS, only one possible response code is present - SUCCESS
For status FAILURE, following response codes are possible:
INTERNAL_SERVER_ERROR
BAD_REQUEST
AUTHORIZATION_FAILED
INVALID_VPA
messageSTRINGMessage giving more information about the code.
nameSTRINGThe name linked to VPA
vpaSTRINGThe VPA sent in the request

Error Codes

CodeDescription
BAD_REQUESTInvalid request
AUTHORIZATION_FAILEDX-VERIFY header is incorrect
INTERNAL_SERVER_ERRORSomething went wrong
SUCCESSSuccessful request
INVALID_VPAIncorrect VPA entered by the user
Language
Click Try It! to start a request and see the response here!