Get payment options API

API to get payment options for a user

Request Headers

Header NameHeader Value
Content-Typeapplication/json
X-VERIFYSHA256(base64 encoded payload +
"/v3/merchant/payment/options" +
salt key) + ### + salt index
{  
   "merchantId":"MERCHANTUAT", // String Mandatory
   "amount":100, // String Mandatory
   "merchantOrderId":"ORDERID", // String Optional
   "userAuthToken":"TXX", // String Mandatory
}
{  
   "merchantId":"MERCHANTUAT", // String Mandatory
   "amount":100, // String Mandatory 
   "userAuthToken":"TXX", // String Mandatory
   "mobileNumber": "9999999999",
   "deviceContext": {
    "phonePeUserStatus": "VALID",   // String Mandatory
    "phonePeVersionCode": 400922    // Long Mandatory
  }
}
{    
    "request": "eyAgCiAgICJtZXJjaGFudElkIjoiTUVSQ0hBTlRVQVQiLAogICAiYW1vdW50IjoxMDAsCiAgICJ1c2VyQXV0aFRva2VuIjoiVFhYIiwKICAgIm1vYmlsZU51bWJlciI6ICI5OTk5OTk5OTk5IiwKICAgImRldmljZUNvbnRleHQiOiB7CiAgICAicGhvbmVQZVVzZXJTdGF0dXMiOiAiVkFMSUQiLCAKICAgICJwaG9uZVBlVmVyc2lvbkNvZGUiOiA0MDA5MjIKICB9Cn0="
}
{    
    "request": "eyAgCiAgICJtZXJjaGFudElkIjoiTUVSQ0hBTlRVQVQiLAogICAiYW1vdW50IjoxMDAsCiAgICJtb2JpbGVOdW1iZXIiOiAiOTk5OTk5OTk5OSIsCiAgICJkZXZpY2VDb250ZXh0IjogewogICAgInBob25lUGVVc2VyU3RhdHVzIjogIlZBTElEIiwKICAgICJwaG9uZVBlVmVyc2lvbkNvZGUiOiA0MDA5MjIKICB9Cn0K"
}

Request Parameters

Parameter NameTypeDescriptionMandatory
merchantIdSTRINGUnique MerchantID assigned to the merchant by PhonePeYes
merchantUserId/ userAuthTokenSTRINGToken to identify
user (generated
while linking user)
Yes
mobileNumberSTRINGMobile numberNo
amountLONGTransaction amount in PaiseYes
merchantOrderIdSTRINGMerchant order idNo
deviceContextObjectDevice detailsNo - For Web
Yes - Android
phonePeUserStatusSTRINGValues can be:
● "VALID"
● "INVALID"
No - For Web
Yes - For Android
phonePeVersionCodeLongPhonePe Version CodeNo - For Web
Yes - For Android

Response Parameters

Parameter NameTypeDescription
successBOOLEANSuccess status of the request
codeENUMSee list of response codes below
dataOBJECTSee the below for more details

Data will contain list of instruments. Currently supported are wallet, upi, card. This can increase in future to EGV etc. Only enabled instruments must be shown.

  • instrumentPriority​: This is instrument level priority. Priority 0 being the highest.
  • priority: ​This will be for priority inside an instrument. For eg: If 3 saved cards there, then this denotes which one should be shown in what order.
  • deviceMapped : ​For inline UPI use cases. If deviceId comes in incoming request and UPI is enabled** on that device then this field will be true. (Currently not applicable)

Response Codes

CODEDespcription
SUCCESSSuccess status of the request
AUTHORIZATION_FAILEDValue of X-VERIFY is incorrect
BAD_REQUESTSome mandatory parameter is missing
INTERNAL_SERVER_ERRORSomething went wrong
USER_NOT_FOUNDCannot resolve user
INVALID_USER_AUTH_TOKENInvalid userAuthToken
Language
Click Try It! to start a request and see the response here!