Request Headers
Header Name | Header Value |
---|---|
Content-Type | application/json |
X-VERIFY | SHA256(“/pg/v1/options/{merchantId}” + saltKey) + “###” + saltIndex |
X-MERCHANT-ID | Unique Merchant ID assigned to the merchant by PhonePe |
Path Parameters
Parameter Name | Type | Description | Mandatory |
---|---|---|---|
merchantId | STRING | Unique Merchant ID assigned to the merchant by PhonePe | Yes |
Query Parameters
Parameter Name | Type | Description | Mandatory |
---|---|---|---|
includeNetBankingBanksList | Boolean | Whether 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 Name | Type | Description |
---|---|---|
success | BOOLEAN | A boolean to indicate the success/failure of the request. |
code | STRING | Response 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 |
message | STRING | Message giving more information about the code. |
upiCollect | JSON | Object with details for UPI Collect payment option |
intent | JSON | Object with details for Intent payment option |
cards | JSON | Object with details for Cards payment option |
netBanking | JSON | Object with details for Net Banking payment option |
enabled | BOOLEAN | Whether the particular payment option is enabled for the merchant |
popularBanks | ARRAY | List of popular banks that support Net Banking |
allBanks | ARRAY | List of all banks that support Net Banking |
bankId | STRING | A short code to identify the bank, to be used in Pay API. |
bankName | STRING | Full name of the bank, to be used for display purposes. |
bankShortName | STRING | Short name of the bank, to be used for display purposes. |
available | ENUM | Indicates whether the bank is currently available for Net Banking transactions. Its value will be one of the following: ● AVAILABLE ● UNAVAILABLE ● DEGRADED |
accountConstraintSupported | BOOLEAN | Indicates whether the bank supports account constraint or not. |
priority | INT | Indicates 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. |
To Fetch Bank Logo
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