get https://api-preprod.phonepe.com/apis/hermes/pg/v1/options/
Payment options can be fetched using this API.
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 |
allBanks | BOOLEAN | Indicates whether the bank supports account constraint or not. |
allBanks | INT | Indicates the priority of the bank. |
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.
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.