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:readfor the bank list,payouts:writefor a lookup: a lookup returns a person's name, and it is the first step of paying them.- A live key with
payouts:writeneeds 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
GET /payout-banksgives the banks a bank payout can reach, and thecodeto send for each.POST /account-lookupsasks the network or bank whether it can pay a wallet or account, and whose it is.- 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"{
"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 | |
|---|---|
code | Send this as destination.bank_code on a bank payout, or as bank_code on a lookup. |
name | The bank's name, for your user. |
swift | The bank's SWIFT/BIC. In Uganda it is also accepted as bank_code; in Rwanda it is not. |
commercial | false 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
}'{
"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"
}'{
"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_code | required | UG. |
method | required | mobile_money or bank. |
phone_number | mobile_money | The wallet's number, in any of the usual forms. Must be a Ugandan MTN or Airtel mobile number. |
network | mobile_money | MTN or Airtel. Read only when the number's prefix does not already say which network it is — see how the network is read. |
bank_code | bank | A code from the bank list, or the bank's SWIFT/BIC. |
bank_name | bank | Only when you have no bank_code. Matched exactly. |
account_number | bank | 5 to 34 letters and digits after spaces and dashes are removed. |
amount_minor | optional | What 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 | |
|---|---|
valid | Whether the network or bank can pay this destination. |
account_name | The 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. |
message | The network's or bank's reason, when valid is false — e.g. Account Validation failed. |
Step 3 — Read the answer
| Response | Means | Do |
|---|---|---|
200, "valid": true | It can be paid, and here is whose it is. | Show the name and let your user confirm. |
200, "valid": false | The network or bank answered: the number or account does not exist, or cannot be paid. | Ask your user to check it. |
503 LOOKUP_UNAVAILABLE | We 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
| Status | code | |
|---|---|---|
400 | INVALID_LOOKUP | The request does not name something that can be looked up. field says which part. |
400 | LOOKUP_NOT_SUPPORTED | No lookup for this country or method yet. supported_countries lists the ones there are. |
429 | LOOKUP_RATE_LIMITED | Your business has used its lookups for the hour. |
503 | LOOKUP_UNAVAILABLE | We 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 account | Answer |
|---|---|
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.