Send money

Account lookups

List the banks you can pay, and check who owns a wallet or account before you send.

Two read-only calls you make before a payout: list the banks you can pay, and check who holds a wallet or account. Neither moves money or reserves anything.

Key requirements

  • payouts:read for the bank list, payouts:write for a lookup: a lookup returns a person's name, and it is the first step of paying them.
  • A live key with payouts:write needs an IP allowlist and must call from an address on it.
  • Lookups are Uganda only today. The bank list covers Rwanda and Uganda.

How it works

  1. GET /payout-banks gives the banks a bank payout can reach, and the code to send for each.
  2. POST /account-lookups asks the network or bank whether it can pay a wallet or account, and whose it is.
  3. You show your user the name, they confirm, and you send the payout.

Step 1 — The bank list

country_code is required: RW or UG.

curl "https://api.inversepay.app/api/b/v1/payout-banks?country_code=RW" \
  -H "Authorization: Bearer $INVERSEPAY_TEST_KEY"
200 OK
{
  "country_code": "RW",
  "banks": [
    { "code": "040", "name": "BANQUE DE KIGALI", "swift": "BKIGRWRW", "commercial": true },
    { "code": "044", "name": "BANQUE POPULAIRE DU RWANDA", "swift": "BPRWRWRW", "commercial": true },
    { "code": "192", "name": "EQUITY BANK", "swift": "EQBLRWRW", "commercial": true },
    { "code": "090", "name": "UMWALIMU SACCO", "swift": "UMWARWRW", "commercial": false }
  ]
}

(Shortened — the real answer has every bank and microfinance institution.)

In Rwanda, send the code and only the code: "040", a string with its leading zero. The swift is for your records; it is not accepted as a bank_code. commercial is false for a microfinance institution or a SACCO. MTN's and Airtel's wallets are not listed: pay those with a mobile_money payout.

Field
codeSend this as destination.bank_code on a bank payout, or as bank_code on a lookup.
nameThe bank's name, for your user.
swiftThe bank's SWIFT/BIC. In Uganda it is also accepted as bank_code; in Rwanda it is not.
commercialfalse for an institution that can be paid but is not an ordinary commercial bank — a development bank, a microfinance. Sort these last; do not hide them.

Commercial banks come first, then by name. Read the list from the API rather than copying it into your code: it changes when a bank is licensed, merges or closes.

Any other country is 400 COUNTRY_NOT_SUPPORTED.

Step 2 — Look up an account

Uganda only today. A lookup for any other country is 400 LOOKUP_NOT_SUPPORTED, with supported_countries listing the ones there are.

A bank account

curl -X POST https://api.inversepay.app/api/b/v1/account-lookups \
  -H "Authorization: Bearer $INVERSEPAY_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "country_code": "UG",
    "method": "bank",
    "bank_code": "STANBIC",
    "account_number": "9030012345678",
    "amount_minor": 50000000
  }'
200 OK
{
  "valid": true,
  "account_name": "JANE DOE",
  "country_code": "UG",
  "method": "bank",
  "network": null,
  "phone_number": null,
  "bank_code": "STANBIC",
  "bank_name": "Stanbic Bank",
  "bank_swift": "SBICUGKX",
  "account_number": "9030012345678",
  "message": null
}

A mobile money wallet

curl -X POST https://api.inversepay.app/api/b/v1/account-lookups \
  -H "Authorization: Bearer $INVERSEPAY_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "country_code": "UG",
    "method": "mobile_money",
    "phone_number": "+256772123456",
    "network": "MTN"
  }'
200 OK
{
  "valid": true,
  "account_name": "JANE DOE",
  "country_code": "UG",
  "method": "mobile_money",
  "network": "MTN",
  "phone_number": "256772123456",
  "bank_code": null,
  "bank_name": null,
  "bank_swift": null,
  "account_number": null,
  "message": null
}

The request

Field
country_coderequiredUG.
methodrequiredmobile_money or bank.
phone_numbermobile_moneyThe wallet's number, in any of the usual forms. Must be a Ugandan MTN or Airtel mobile number.
networkmobile_moneyMTN or Airtel. Read only when the number's prefix does not already say which network it is — see how the network is read.
bank_codebankA code from the bank list, or the bank's SWIFT/BIC.
bank_namebankOnly when you have no bank_code. Matched exactly.
account_numberbank5 to 34 letters and digits after spaces and dashes are removed.
amount_minoroptionalWhat you mean to send, in minor units. The network or bank checks it against its limits as part of the lookup; leave it out and the smallest payout is checked instead.

The answer

The response echoes the destination as it will be paid — the number normalised to 256…, the network resolved, the bank's name and SWIFT filled in from its code. Show your user those, not what they typed.

Field
validWhether the network or bank can pay this destination.
account_nameThe holder's name as the network or bank has it. null when the network or bank does not return one — which does not make the destination invalid.
messageThe network's or bank's reason, when valid is false — e.g. Account Validation failed.

Step 3 — Read the answer

ResponseMeansDo
200, "valid": trueIt can be paid, and here is whose it is.Show the name and let your user confirm.
200, "valid": falseThe network or bank answered: the number or account does not exist, or cannot be paid.Ask your user to check it.
503 LOOKUP_UNAVAILABLEWe could not ask. Nothing was decided about the account.Retry shortly. Do not treat the account as bad.

A 503 is never valid: false. "We could not check" and "it does not exist" are different facts, and showing a user the second when the first is true makes them delete a good recipient.

valid: true with a name that is not the one your user expected is the case lookups exist for. Stop and ask — a bank transfer to the wrong account is usually unrecoverable.

Webhooks

Neither call sends a webhook.

Errors

Statuscode
400INVALID_LOOKUPThe request does not name something that can be looked up. field says which part.
400LOOKUP_NOT_SUPPORTEDNo lookup for this country or method yet. supported_countries lists the ones there are.
429LOOKUP_RATE_LIMITEDYour business has used its lookups for the hour.
503LOOKUP_UNAVAILABLEWe could not ask the network or bank.

All codes are on Errors.

Developer notes

Rate limit

Lookups are limited per business, per clock hour — a lookup turns a number into a person's name, and unmetered that is a directory. A 429 carries a Retry-After header with the seconds until the next hour starts.

Look up once when your user adds or edits a recipient, not on every payout to them. A saved beneficiary is name-checked when it is saved.

Testing

In test mode

A sk_test_ key never reaches a network or a bank. The request is checked exactly as live — a non-Ugandan number or an unknown bank code is still a 400 — and the answer is simulated:

Number or accountAnswer
ends in 0000"valid": false, "account_name": null, "message": "Account Validation failed"
anything else"valid": true, "account_name": "TEST ACCOUNT HOLDER"

So 256772120000 or account 9030012340000 exercises your not-valid branch. Test lookups do not count against the hourly limit. There is no way to simulate a 503 — write that branch from the table above.

What's next

On this page