Get payment options API

API to get payment options for a user

Request Headers

Header Name

Header Value

Content-Type

application/json

X-VERIFY

SHA256(base64 encoded payload +
"/v3/merchant/payment/options" +
salt key) + ### + salt index

{  
   "merchantId":"M2306160483220675579140", // String Mandatory
   "amount":100, // String Mandatory
   "merchantOrderId":"ORDERID", // String Optional
   "merchantUserId":"TXX", // String Mandatory
}
{    
"request": "eyAgCiAgICJtZXJjaGFudElkIjoiTTIzMDYxNjA0ODMyMjA2NzU1NzkxNDAiLAogICAiYW1vdW50IjoxMDAsCiAgICJtZXJjaGFudE9yZGVySWQiOiJPUkRFUklEIiwKICAgIm1lcmNoYW50VXNlcklkIjoiVFhYIiwKfQ=="
}

Request Parameters

Parameter Name

Type

Description

Mandatory

merchantId

STRING

Unique MerchantID assigned to the merchant by PhonePe

Yes

merchantUserId/ userAuthToken

STRING

Token to identify
user (generated
while linking user)

Yes

amount

LONG

Transaction amount in Paise

Yes

merchantOrderId

STRING

Merchant order id

No

Response Parameters

Parameter Name

Type

Description

success

BOOLEAN

Success status of the request

code

ENUM

See list of response codes below

data

OBJECT

See 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

CODE

Despcription

SUCCESS

Success status of the request

AUTHORIZATION_FAILED

Value of X-VERIFY is incorrect

BAD_REQUEST

Some mandatory parameter is missing

INTERNAL_SERVER_ERROR

Something went wrong

USER_NOT_FOUND

Cannot resolve user

INVALID_USER_AUTH_TOKEN

Invalid userAuthToken

Language
Click Try It! to start a request and see the response here!