Skip to content

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

ParameterTypeRequiredDescription
countryStringNoThe country from which to obtain the list of supported banks. Accepted values: ghana, kenya, nigeria, south africa.
use_cursorBooleanNoFlag to enable cursor pagination.
perPageIntegerNoThe number of objects to return per page. Defaults to 50.
pay_with_bank_transferBooleanNoFilter for available banks a customer can make a transfer to.
pay_with_bankBooleanNoFilter for banks a customer can pay directly from.
enabled_for_verificationBooleanNoFilter banks supported for account verification in South Africa.
nextStringNoCursor for the next page.
previousStringNoCursor for the previous page.
gatewayStringNoGateway type of the bank.
typeStringNoType of financial channel (e.g., mobile_money, ghipps).
currencyStringNoOne of the supported currencies.
include_nip_sort_codeBooleanNoReturns 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

ParameterTypeRequiredDescription
countryStringYesThe 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

Released under the MIT License.