Disbursements
Verify an account number
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:
| Stage | What to do |
|---|---|
| Collect details | Ask for the account number and bank |
| Resolve account | Call Resolve account number and read the returned account_name |
| Confirm with the sender | Show the resolved name and ask the sender to confirm it before you continue |
| Create recipient | Create the transfer recipient only after the sender confirms the name |
| Initiate transfer | Send 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=1000000001&bank_code=057" \
-H "Authorization: Bearer $PAYSTACK_SECRET_KEY"const https = require("https");
const options = {
hostname: "api.paystack.co",
port: 443,
path: "/bank/resolve?account_number=1000000001&bank_code=057",
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=1000000001&bank_code=057",
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;
?>Pricing
This endpoint is free to use.