Miscellaneous
The MiscellaneousResource provides access to supporting APIs that can be used to provide more details to other APIs, such as listing banks, countries, and states for address verification.
List Banks
Get a list of all supported banks and their properties.
php
// List all banks
$banks = paystack()->miscellaneous()->listBanks();
// Filter banks by country
$nigerianBanks = paystack()->miscellaneous()->listBanks([
'country' => 'nigeria'
]);
// Filter banks that support direct debit
$directDebitBanks = paystack()->miscellaneous()->listBanks([
'pay_with_bank' => true
]);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
country | String | No | The country from which to obtain the list of supported banks. Accepted values: ghana, kenya, nigeria, south africa. |
use_cursor | Boolean | No | Flag to enable cursor pagination. |
perPage | Integer | No | The number of objects to return per page. Defaults to 50. |
pay_with_bank_transfer | Boolean | No | Filter for available banks a customer can make a transfer to. |
pay_with_bank | Boolean | No | Filter for banks a customer can pay directly from. |
enabled_for_verification | Boolean | No | Filter banks supported for account verification in South Africa. |
next | String | No | Cursor for the next page. |
previous | String | No | Cursor for the previous page. |
gateway | String | No | Gateway type of the bank. |
type | String | No | Type of financial channel (e.g., mobile_money, ghipps). |
currency | String | No | One of the supported currencies. |
include_nip_sort_code | Boolean | No | Returns Nigerian banks with their NIP institution code. |
List Countries
Get a list of countries that Paystack currently supports.
php
$countries = paystack()->miscellaneous()->listCountries();List States (AVS)
Get a list of states for a country for address verification (AVS).
php
$countryCode = 'NG'; // Nigeria
$states = paystack()->miscellaneous()->listStates($countryCode);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
country | String | Yes | The country code of the states to list (e.g., NG, GH). |
Use Cases
Populating a Bank Dropdown
When building a withdrawal or transfer form, you can use listBanks to populate the bank selection dropdown dynamically.
php
$banks = paystack()->miscellaneous()->listBanks(['country' => 'nigeria']);
foreach ($banks['data'] as $bank) {
echo "<option value='{$bank['code']}'>{$bank['name']}</option>";
}Validating Address Information
When collecting address information for AVS (Address Verification System), you can ensure the user selects a valid state for their country.
php
// Get states for Nigeria
$nigerianStates = paystack()->miscellaneous()->listStates('NG');
// Get regions for Ghana
$ghanaRegions = paystack()->miscellaneous()->listStates('GH');
// Use this list to validate user input or populate a select field