Skip to content

Banks ​

Bank operations.

Use it as client.banks. Every method takes keyword arguments, returns a PaystackSdk::Response, and raises a PaystackSdk::Error if a parameter is invalid before anything is sent. An unsuccessful result from Paystack (a 400 or 404) comes back as a Response with success? false.

Methods ​

list ​

ruby
banks.list(
  country: nil,
  currency: nil,
  use_cursor: nil,
  per_page: nil,
  page: nil,
  next_cursor: nil,
  previous: nil,
  pay_with_bank_transfer: nil,
  pay_with_bank: nil,
  enabled_for_verification: nil,
  gateway: nil,
  type: nil,
  include_nip_sort_code: nil
)

List Banks.

List banks supported on Paystack

ParameterTypeRequiredDescription
countryStringThe country from which to obtain the list of supported banks One of: ghana, kenya, nigeria, south africa.
currencyStringThe currency of the banks to list. One of: GHS, KES, NGN, ZAR, USD.
use_cursorBooleanA flag to indicate if cursor based pagination should be used
per_pageIntegerThe number of records to fetch per request
pageIntegerThe offset to retrieve data from
next_cursorStringAn alphanumeric value returned for every cursor based retrieval, used to retrieve the next set of data
previousStringAn alphanumeric value returned for every cursor based retrieval, used to retrieve the previous set of data
pay_with_bank_transferBooleanA flag to filter for available banks a customer can make a transfer to complete a payment
pay_with_bankBooleanA flag to filter for banks a customer can pay directly from
enabled_for_verificationBooleanA flag to filter the banks that are supported for account verification in South Africa.
gatewayStringThe type of gateway for a Nigerian bank One of: emandate, digitalbankmandate.
typeStringType of financial channel One of: ghipss, mobile_money, nuban, kepss, basa.
include_nip_sort_codeBooleanA flag that returns Nigerian banks with their NIP institution code.

Paystack docs: https://paystack.com/docs/api/miscellaneous/#bank

resolve_account_number ​

ruby
banks.resolve_account_number(account_number:, bank_code:)

Resolve Account Number.

Resolve an account number to confirm the name associated with it

ParameterTypeRequiredDescription
account_numberStringyesThe account number of interest
bank_codeStringyesThe bank code associated with the account number

Paystack docs: https://paystack.com/docs/api/verification/#resolve-account

validate_account ​

ruby
banks.validate_account(
  account_name:,
  account_number:,
  account_type:,
  bank_code:,
  country_code:,
  document_type:,
  document_number: nil
)

Validate Bank Account.

Confirm the authenticity of a customer's account number before sending money

ParameterTypeRequiredDescription
account_nameStringyesCustomer's first and last name registered with their bank
account_numberStringyesCustomer's account number
account_typeStringyesThe type of the customer's account number One of: personal, business.
bank_codeStringyesThe bank code of the customer’s bank.
country_codeStringyesThe two digit ISO code of the customer’s bank
document_typeStringyesCustomer’s mode of identity One of: identityNumber, passportNumber, businessRegistrationNumber.
document_numberStringCustomer’s mode of identity number

Paystack docs: https://paystack.com/docs/api/verification/#validate-account

Unofficial community SDK. Not affiliated with or endorsed by Paystack. · MIT License · rubygems.org/gems/paystack_sdk