Sign in

Disbursements

Verify an account number

View as Markdown

In a nutshell

Confirm a customer's bank account details before you create a transfer recipient.

Confirm a customer's bank account details before you create a transfer recipient, so you don't send money to the wrong person or to an invalid account. Small input mistakes, such as a swapped digit or the wrong bank, are common when customers enter their own details. Checking the account turns those mistakes into a visible confirmation step instead of a failed or misdirected transfer, and the support work that follows it.

Use the account name that Paystack returns to confirm the account with the sender before you save the recipient:

StageWhat to do
Collect detailsAsk for the account number and bank
Resolve accountCall Resolve account number and read the returned account_name
Confirm with the senderShow the resolved name and ask the sender to confirm it before you continue
Create recipientCreate the transfer recipient only after the sender confirms the name
Initiate transferSend money to the verified recipient

Copy linkResolve account number

The Resolve Account Number endpoint takes the customer's account number and bank code and returns the customer's account details. To resolve an account number, make a GET request to the /bank/resolve endpoint:

GETapi.paystack.co/bank/resolve

curl "https://api.paystack.co/bank/resolve?account_number=0123456047123&bank_code=230100" \
  -H "Authorization: Bearer $PAYSTACK_SECRET_KEY"
const https = require("https");

const options = {
  hostname: "api.paystack.co",
  port: 443,
  path: "/bank/resolve?account_number=0123456047123&bank_code=230100",
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.PAYSTACK_SECRET_KEY}`,
  },
};

const req = https.request(options, (res) => {
  let data = "";
  res.on("data", (chunk) => {
    data += chunk;
  });
  res.on("end", () => {
    console.log(res.statusCode, JSON.parse(data));
  });
});

req.on("error", (error) => {
  console.error(error);
});

req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.paystack.co/bank/resolve?account_number=0123456047123&bank_code=230100",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer " . getenv("PAYSTACK_SECRET_KEY"),
    "Cache-Control: no-cache",
  ),
));
$response = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_HTTP_CODE) . " " . $response;
?>
{
  "status": true,
  "message": "Account number resolved",
  "data": {
    "account_number": "0123456047123",
    "account_name": "John Doe"
  }
}

Pricing

This endpoint is free to use.

Was this page helpful?