Payment Options API

Payment options can be fetched using this API.

Request Headers

Header NameHeader Value
Content-Typeapplication/json
X-VERIFYSHA256(“/pg/v1/options/{merchantId}” + saltKey) + “###” + saltIndex
X-MERCHANT-IDUnique Merchant ID assigned to the merchant by PhonePe

Path Parameters

Parameter NameTypeDescriptionMandatory
merchantIdSTRINGUnique Merchant ID assigned to the merchant by PhonePeYes

Query Parameters

Parameter NameTypeDescriptionMandatory
includeNetBankingBanksListBooleanWhether or not to include Net Banking banks list in response
Comments:
If passed as true, Net Banking banks list will be included in the response.
No

Sample Response

{
  "success": true,
  "code": "SUCCESS",
  "message": "Your request has been successfully completed.",
  "data": {
    "upiCollect": {
      "enabled": true
    },
    "intent": {
      "enabled": true
    },
    "cards": {
      "enabled": true
    },
    "netBanking": {
      "enabled": true,
      "popularBanks": [
        {
          "bankId": "ICIC",
          "bankName": "ICICI Bank",
          "bankShortName": "ICICI",
          "available": "AVAILABLE",
          "accountConstraintSupported": false,
          "priority": 1
        },
        {
          "bankId": "KVBL",
          "bankName": "Karur Vysya Bank",
          "bankShortName": "Karur",
          "available": "AVAILABLE",
          "accountConstraintSupported": false,
          "priority": 2
        },
        {
          "bankId": "LAVB",
          "bankName": "Laxmi Vilas Bank",
          "bankShortName": "Laxmi",
          "available": "AVAILABLE",
          "accountConstraintSupported": false,
          "priority": 3
        },
        {
          "bankId": "SBIN",
          "bankName": "State Bank Of India",
          "bankShortName": "SBI",
          "available": "AVAILABLE",
          "accountConstraintSupported": false,
          "priority": 0
        }
      ],
      "allBanks": [
        {
          "bankId": "ICIC",
          "bankName": "ICICI Bank",
          "bankShortName": "ICICI",
          "available": "AVAILABLE",
          "accountConstraintSupported": false,
          "priority": 1
        },
        {
          "bankId": "KVBL",
          "bankName": "Karur Vysya Bank",
          "bankShortName": "Karur",
          "available": "AVAILABLE",
          "accountConstraintSupported": false,
          "priority": 2
        },
        {
          "bankId": "LAVB",
          "bankName": "Laxmi Vilas Bank",
          "bankShortName": "Laxmi",
          "available": "AVAILABLE",
          "accountConstraintSupported": false,
          "priority": 3
        },
        {
          "bankId": "SBIN",
          "bankName": "State Bank Of India",
          "bankShortName": "SBI",
          "available": "AVAILABLE",
          "accountConstraintSupported": false,
          "priority": 0
        }
      ]
    }
  }
}
{
  "success": true,
  "code": "SUCCESS",
  "message": "Your request has been successfully completed.",
  "data": {
    "upiCollect": {
      "enabled": true
    },
    "intent": {
      "enabled": true
    },
    "cards": {
      "enabled": true
    },
    "netBanking": {
      "enabled": true
    }
  }
}

Response Parameters

Parameter NameTypeDescription
successBOOLEANA boolean to indicate the success/failure of the request.
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_MERCHANT_ID
messageSTRINGMessage giving more information about the code.
upiCollectJSONObject with details for UPI Collect payment option
intentJSONObject with details for Intent payment option
cardsJSONObject with details for Cards payment option
netBankingJSONObject with details for Net Banking payment option
enabledBOOLEANWhether the particular payment option is enabled for the merchant
popularBanksARRAYList of popular banks that support Net Banking
allBanksARRAYList of all banks that support Net Banking
bankIdSTRINGA short code to identify the bank, to be used in Pay API.
bankNameSTRINGFull name of the bank, to be used for display purposes.
bankShortNameSTRINGShort name of the bank, to be used for display purposes.
availableENUMIndicates whether the bank is currently available for Net Banking transactions. Its value will be one of the following:
AVAILABLE
UNAVAILABLE
DEGRADED
accountConstraintSupportedBOOLEANIndicates whether the bank supports account constraint or not.
priorityINTIndicates the preferred order/sequence of the banks. It can be used for sorting the bank’s list displayed to the end user.

– For the first 6 banks, the priority is based on SR & other factors.
– For the remaining banks, the priority is based on alphabetic ordering.

Bank Logo images can be obtained from PhonePe by using the template URL and replacing with the value of the “bankId” field from the above response.

https://img.phonepe.com/images/banks/40/40/{bankId}.png

For example, if “bankId” is “HDFC”, the logo image URL will be
https://img.phonepe.com/images/banks/40/40/HDFC.png

Also, if the logo image for a bank does not exist, a default bank logo image can be used with the below URL.

https://img.phonepe.com/images/banks/40/40/DEFAULT.png

{“method”:”get”,”url”:”/pg/v1/options/{merchantId}”,”auth”:”required”,”results”:{“codes”:[{“name”:”Sample Response with includeNetBankingBanksList as TRUE”,”code”:”{\n \”success\”: true,\n \”code\”: \”SUCCESS\”,\n \”message\”: \”Your request has been successfully completed.\”,\n \”data\”: {\n \”upiCollect\”: {\n \”enabled\”: true\n },\n \”intent\”: {\n \”enabled\”: true\n },\n \”cards\”: {\n \”enabled\”: true\n },\n \”netBanking\”: {\n \”enabled\”: true,\n \”popularBanks\”: [\n {\n \”bankId\”: \”ICIC\”,\n \”bankName\”: \”ICICI Bank\”,\n \”bankShortName\”: \”ICICI\”,\n \”available\”: \”AVAILABLE\”,\n \”accountConstraintSupported\”: false,\n \”priority\”: 1\n },\n {\n \”bankId\”: \”KVBL\”,\n \”bankName\”: \”Karur Vysya Bank\”,\n \”bankShortName\”: \”Karur\”,\n \”available\”: \”AVAILABLE\”,\n \”accountConstraintSupported\”: false,\n \”priority\”: 2\n },\n {\n \”bankId\”: \”LAVB\”,\n \”bankName\”: \”Laxmi Vilas Bank\”,\n \”bankShortName\”: \”Laxmi\”,\n \”available\”: \”AVAILABLE\”,\n \”accountConstraintSupported\”: false,\n \”priority\”: 3\n },\n {\n \”bankId\”: \”SBIN\”,\n \”bankName\”: \”State Bank Of India\”,\n \”bankShortName\”: \”SBI\”,\n \”available\”: \”AVAILABLE\”,\n \”accountConstraintSupported\”: false,\n \”priority\”: 0\n }\n ],\n \”allBanks\”: [\n {\n \”bankId\”: \”ICIC\”,\n \”bankName\”: \”ICICI Bank\”,\n \”bankShortName\”: \”ICICI\”,\n \”available\”: \”AVAILABLE\”,\n \”accountConstraintSupported\”: false,\n \”priority\”: 1\n },\n {\n \”bankId\”: \”KVBL\”,\n \”bankName\”: \”Karur Vysya Bank\”,\n \”bankShortName\”: \”Karur\”,\n \”available\”: \”AVAILABLE\”,\n \”accountConstraintSupported\”: false,\n \”priority\”: 2\n },\n {\n \”bankId\”: \”LAVB\”,\n \”bankName\”: \”Laxmi Vilas Bank\”,\n \”bankShortName\”: \”Laxmi\”,\n \”available\”: \”AVAILABLE\”,\n \”accountConstraintSupported\”: false,\n \”priority\”: 3\n },\n {\n \”bankId\”: \”SBIN\”,\n \”bankName\”: \”State Bank Of India\”,\n \”bankShortName\”: \”SBI\”,\n \”available\”: \”AVAILABLE\”,\n \”accountConstraintSupported\”: false,\n \”priority\”: 0\n }\n ]\n }\n }\n}”,”language”:”json”,”status”:200},{“name”:””,”code”:”{\n \”success\”: false,\n \”code\”: \”INVALID_MERCHANT_ID\”,\n \”message\”: \”The merchant id is invalid.\”,\n \”data\”: {}\n}”,”language”:”json”,”status”:400},{“code”:”{\n \”success\”: true,\n \”code\”: \”SUCCESS\”,\n \”message\”: \”Your request has been successfully completed.\”,\n \”data\”: {\n \”upiCollect\”: {\n \”enabled\”: true\n },\n \”intent\”: {\n \”enabled\”: true\n },\n \”cards\”: {\n \”enabled\”: true\n },\n \”netBanking\”: {\n \”enabled\”: true\n }\n }\n}”,”language”:”json”,”name”:”Sample Response with includeNetBankingBanksList as FALSE or without without includeNetBankingBanksList”,”status”:200}]},”params”:[{“name”:”merchantId”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”Unique Merchant Id assigned to the merchant”,”required”:false,”in”:”path”,”ref”:””,”_id”:”62fb9351655c25003ee8af68″},{“name”:”includeNetBankingBanksList”,”type”:”string”,”enumValues”:””,”default”:”true”,”desc”:”Flag to fetch the Net Banking Banks List.”,”required”:false,”in”:”query”,”ref”:””,”_id”:”62fb9351655c25003ee8af67″},{“name”:”X-VERIFY”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”SHA256(\”/pg/v1/options/{merchantId}\” + saltKey) + \”###\” + saltIndex”,”required”:true,”in”:”header”,”ref”:””,”_id”:”62fb96b352c0ba009c8721d8″},{“name”:”X-MERCHANT-ID”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”Unique Merchant ID assigned to the merchant by PhonePe”,”required”:true,”in”:”header”,”ref”:””,”_id”:”62fb96b352c0ba009c8721d7″},{“name”:”Content-Type”,”type”:”string”,”enumValues”:””,”default”:”application/json”,”desc”:””,”required”:true,”in”:”header”,”ref”:””,”_id”:”62fb96b352c0ba009c8721d6″}],”examples”:{“codes”:[]},”apiSetting”:”620600c317396a0032e94e17″}
https://api-preprod.phonepe.com/apis/pg-sandbox