Miscellaneous

This section contains information about APIs that are useful for handling additional non-core management operations. With the APIs described here, You can manage wallet balances, resolve payment details (BVN, Account details, etc.), get fx rate for transactions and querying balance history.

Get multiple Wallet balances

This endpoint allows you query the balances for all your wallets.

get https://api.flutterwave.com/v3/balances

Headers

Authorization string

Pass your secret key as a bearer token in the request header to authorize this call. Unauthorized calls would return a 401 http code or raise unauthorized error in the different SDKs.

const Flutterwave = require('flutterwave-node-v3');
const flw = new Flutterwave("public key", "secret key");
const response = await flw.Misc.bal();
require './flutterwave_sdk'
payment = Flutterwave.new("public key", "secret key", "encryption key")
misc = Misc.new(payment)
response = misc.get_all_wallet_balance
print response
{
  "status": "success",
  "message": "Wallet balances fetched",
  "data": [
    {
      "currency": "NGN",
      "available_balance": 2367840,
      "ledger_balance": 253125.82
    },
    {
      "currency": "KES",
      "available_balance": 0,
      "ledger_balance": 1226.72
    },
    {
      "currency": "GHS",
      "available_balance": 0,
      "ledger_balance": 0
    },
    {
      "currency": "USD",
      "available_balance": 0,
      "ledger_balance": 472.08
    },
    {
      "currency": "EUR",
      "available_balance": 0,
      "ledger_balance": 0
    },
    {
      "currency": "ZAR",
      "available_balance": 0,
      "ledger_balance": 0
    },
    {
      "currency": "GBP",
      "available_balance": 0,
      "ledger_balance": 0
    },
    {
      "currency": "TZS",
      "available_balance": 0,
      "ledger_balance": 0
    },
    {
      "currency": "UGX",
      "available_balance": 0,
      "ledger_balance": 0
    },
    {
      "currency": "RWF",
      "available_balance": 0,
      "ledger_balance": 5000
    },
    {
      "currency": "ZMW",
      "available_balance": 0,
      "ledger_balance": 0
    },
    {
      "currency": "INR",
      "available_balance": 0,
      "ledger_balance": 0
    },
    {
      "currency": "XOF",
      "available_balance": 0,
      "ledger_balance": 0
    },
    {
      "currency": "MUR",
      "available_balance": 0,
      "ledger_balance": 0
    },
    {
      "currency": "ETB",
      "available_balance": 0,
      "ledger_balance": 0
    }
  ]
}
{}

Get a single Wallet balance

This endpoint allows you query the balance for a specific wallet.

get https://api.flutterwave.com/v3/balances/:currency

Path Params

currency string

This is the wallet whose currency you want to fetch the balance.

Headers

Authorization string

Pass your secret key as a bearer token in the request header to authorize this call. Unauthorized calls would return a 401 http code or raise unauthorized error in the different SDKs.

const Flutterwave = require('flutterwave-node-v3');
const flw = new Flutterwave("public key", "secret key");
const response = await flw.Misc.bal_currency("NGN");
require './flutterwave_sdk'
payment = Flutterwave.new("public key", "secret key", "encryption key")
misc = Misc.new(payment)
response = misc.get_balance_per_currency("NGN")
print response
{
  "status": "success",
  "message": "Wallet balance fetched",
  "data": {
    "currency": "NGN",
    "available_balance": 2168880,
    "ledger_balance": 253125.82
  }
}
{}

Resolve Account details

This endpoint helps you to resolve the details of a bank account from an account number. Please note that only Nigerian bank details can be resolved using this endpoint. You can also resolve MPesa details and Flutterwave account details with this endpoint.

post https://api.flutterwave.com/v3/accounts/resolve

Body Params

account_number string

This is the account number (could also be a Merchant ID or MPesa mobile number) to be resolved. If you are resolving a Flutterwave account or MPesa mobile number, You should pass the merchant ID or mobile number.

account_bank string

This is the code for the Bank. You can get this code using the /banks endpoint.

type string

This is the payment type. This is only needed for resolving Mpesa mobile numbers.

country string

This is the country associated with the payment type. Expected values include NG, KE and US

Headers

Authorization string

PPass your secret key as a bearer token in the request header to authorize this call. Unauthorized calls would return a 401 http code or raise unauthorized error in the different SDKs.

{
  "account_number": "0690000032",
  "account_bank": "044"
}
const Flutterwave = require('flutterwave-node-v3');
const flw = new Flutterwave("public key", "secret key");
const payload = {"account_number": "0690000032", "account_bank": "044"};
const response = await flw.Misc.verify_Account(payload);
require './flutterwave_sdk'
payment = Flutterwave.new("public key", "secret key", "encryption key")
misc = Misc.new(payment)
payload = {
  "account_number" => "0690000032",
  "account_bank" => "044"
}
response = misc.resolve_account(payload)
print response
{
  "status": "success",
  "message": "Account details fetched",
  "data": {
    "account_number": "0690000032",
    "account_name": "Pastor Bright"
  }
}
{}
Resolving Bank Account Numbers
In order to properly make use of this endpoint. You should check out our recommended best practices for using the resolve endpoint.

Resolve BVN details

Bank Verification Number or BVN is a biometric identification widely used by Banks in Nigeria. This endpoint allows you to fetch a user's information from their BVN. It supports only BVNs generated by Nigerian Banks.

get https://api.flutterwave.com/v3/kyc/bvns/:bvn

Path Params

bvn string

This is a valid BVN you want to resolve.

Headers

Authorization string

Pass your secret key as a bearer token in the request header to authorize this call. Unauthorized calls would return a 401 http code or raise unauthorized error in the different SDKs.

const Flutterwave = require('flutterwave-node-v3');
const flw = new Flutterwave("public key", "secret key");
const payload = {"bvn": "123456789010"};
const response = await flw.Misc.bvn(payload);
require("Flutterwave-PHP-v3/library/Bvn.php");
use Flutterwave\Bvn;
$bvn_number = "123456789";
$bvn = new Bvn();
$result = $bvn->verifyBVN($bvn_number);
print_r($result);
require './flutterwave_sdk'
payment = Flutterwave.new("public key", "secret key", "encryption key")
misc = Misc.new(payment)
response = misc.resolve_bvn("12345678901")
print response
{
  "status": "success",
  "message": "BVN details fetched",
  "data": {
    "bvn": "123456789",
    "first_name": "Wendy",
    "middle_name": "Chucky",
    "last_name": "Rhoades",
    "date_of_birth": "01-01-1905",
    "phone_number": "08012345678",
    "registration_date": "01-01-1921",
    "enrollment_bank": "044",
    "enrollment_branch": "Idejo",
    "image_base_64": null,
    "address": null,
    "gender": "Male",
    "email": null,
    "watch_listed": null,
    "nationality": "Nigerian",
    "marital_status": null,
    "state_of_residence": null,
    "lga_of_residence": null,
    "image": null
  }
}
{}

Resolve Card BINs

This endpoint will help you to resolve issuer information from the card bins on Flutterwave. Card Bins (or Bank Identification Numbers) are usually the first six digits of a card number.

get https://api.flutterwave.com/v3/card-bins/:bin

Path Params

bin int32

The first 6 six digits on a debit/credit card

Headers

Authorization string

Pass your secret key as a bearer token in the request header to authorize this call. Unauthorized calls would return a 401 http code or raise unauthorized error in the different SDKs.

require './flutterwave_sdk'
payment = Flutterwave.new("public key", "secret key", "encryption key")
misc = Misc.new(payment)
response = misc.resolve_card_bin(553188)
print response
{
  "status": "success",
  "message": "completed",
  "data": {
    "issuing_country": "UNITED KINGDOM GB",
    "bin": "123456",
    "card_type": "VISA",
    "issuer_info": "NATIONAL WESTMINSTER BANK PLC DEBITCLASSIC"
  }
}
{}

Get Balance history

This endpoint allows developers track the transaction history on a Wallet. With this, you can get the balance history (credit and debit actions on an account) and filter using currency, date, transaction type or page number.

get https://api.flutterwave.com/v3/wallet/statement

Query Params

from string

This is the specific date you would like to start the balance history query from. The expected date format for this parameter is YYYY-MM-DD.

to string

The is the specific end period for the search. Like from, It also has an expected date format of YYYY-MM-DD.

currency string

This is the wallet whose currency you want to fetch the balance history.

type string

This value can either be C or D (where C means Credit and D means Debit)

page int32

This is the page number to retrieve i.e. setting 1 retrieves the first page.

Headers

Authorization string

Pass your secret key as a bearer token in the request header to authorize this call. Unauthorized calls would return a 401 http code or raise unauthorized error in the different SDKs.

{
  "status": "success",
  "message": "Wallet statement fetched",
  "data": {
    "page_info": {
      "total": 2,
      "current_page": 1,
      "total_pages": 1
    },
    "transactions": [
      {
        "type": "D",
        "amount": 5000,
        "currency": "NGN",
        "balance_before": 5306,
        "balance_after": 306,
        "reference": "CC-REFD-17124232941-000003201208145443000641923609",
        "date": "2021-01-04T09:57:14+00:00",
        "remarks": "",
        "sent_currency": "NGN",
        "rate_used": 1,
        "sent_amount": 5000,
        "statement_type": "available"
      },
      {
        "type": "C",
        "amount": 5300,
        "currency": "NGN",
        "balance_before": 6,
        "balance_after": 5306,
        "reference": "FLW414422434",
        "date": "2021-01-04T09:52:48+00:00",
        "remarks": "WALLET FUNDING WITH RAVE - FLW414422434",
        "sent_currency": "",
        "rate_used": 0,
        "sent_amount": 0,
        "statement_type": "available"
      }
    ]
  }
}
{}
Loading...