Skip to main content
Before you send a payout, you can check that the destination exists and find out whose name is on it. POST /payouts/validate_account returns the account holder’s name and whether the account is frozen or restricted. This matters because a payout to a valid-looking but wrong number will often succeed. Validating first turns a silent misdirected payment into a question you can ask the user: is this the right John Doe?
Validation is a read-only lookup. It moves no money, creates no payout, and does not reserve anything.

Request

The request rejects unknown fields outright. A typo in a field name is a 400, not a silently ignored key.

Response

A 200 does not mean “safe to pay”. It means the account was found. Check freeze_status and restrict_status yourself — a frozen or restricted account returns a perfectly successful response, and a payout to it will fail at the connector.

What each connector supports

Validation rules differ per connector, and a mismatch is rejected before any network call:
Co-op supports M-Pesa payouts but not M-Pesa validation — Co-op has not provided a validation endpoint for it. Sending any account_type other than pesalink to cooperativebank returns a “not supported” error rather than attempting it.

Account types

A customer’s M-Pesa number. The most common lookup — use it to confirm a recipient’s name before a wallet payout.
A business paybill or till number, rather than a personal wallet. Validate these before a pay_bill or pay_till payout.
A local bank account checked by name enquiry through AICAPAY. bank_code is always required.
An Airtel Money wallet. currency is required, because Airtel runs a separate endpoint per country.
An MTN MoMo account, checked through MTN’s own subscriber lookup. Only the momomtn connector serves it.
An international money transfer recipient. Only choicebank and daraja can serve this — any other connector returns a “not supported” error.

M-Pesa validation

Validating an M-Pesa account with connector: "daraja" works, but the lookup itself does not go to Safaricom. Daraja has no account-validation API, so Pesaswap routes M-Pesa name checks through Choice Bank’s verification service using Pesaswap’s own credentials. Two consequences:
  • You do not need a Choice Bank account to validate M-Pesa numbers. It works whether your payouts run through Choice Bank or Daraja.
  • M-Pesa validation depends on a third party. If Choice Bank’s verification service is down, M-Pesa name lookups fail even though M-Pesa payouts themselves are fine. Removing this dependency is on our roadmap.
The same pattern applies to Airtel Money: validating an Airtel number through a non-Airtel connector such as Choice Bank uses Pesaswap’s global Airtel credentials. But if you set connector: "airtel" directly, your own Airtel connector account is required.

Common errors

pesalink lookups, every cooperativebank lookup and every aicapay lookup need bank_code. The request fails validation before any connector is contacted.
Airtel resolves which country’s endpoint to call from currency. Omitting it fails immediately. connector: "choicebank" with account_type: "airtel_money" needs it too, since that lookup is handed to Airtel.
Each row of the table above is enforced. imt_validate on anything but Choice Bank or Daraja, any non-pesalink type on Co-op, or any non-momo_mtn type on MTN all return this.
freeze_status: "frozen" or restrict_status: "restricted" arrives inside a 200. If your code only checks the HTTP status, it will send a payout that cannot land.
The value of validation is a human confirming the name. Fetching account_name and sending anyway gets you the same misdirected payout, one API call later.

Next steps

Payouts

Send the payout once the account checks out.

Wallet balance

Confirm you have the funds to send.

Supported connectors

Which connectors support which flows.

Roadmap

What we are building next.