Open accounts for your customers
Open a verified customer a KES, USD, GBP or EUR account, read their numbers and balances, and show a payer how to send money into it.
A verified customer can hold a KES account, a USD account, a GBP account
and a EUR account, all in their own name. You open each one on request: nothing opens by itself when a
customer is verified. These calls are on a Remittance account. They need their
own scopes: customer_accounts:write to open and customer_accounts:read to read.
They are separate from the customers:* scopes of
your customers on purpose: a key that can
read or edit a customer cannot thereby read their bank details and balances, or
open an account for them. A key that holds only the customers:* scopes is
refused with 403 insufficient_scope, and errorCode names the scope it lacks.
A key issued before these scopes existed holds only the customers:* scopes, so
issue a new key with the scopes you need.
See Products and scopes.
Every account belongs to one of your customers, and every customer to you alone. Another partner's customer id reads exactly like one that does not exist.
1. Open an account
POST /v1/customers/{id}/accounts
Content-Type: application/json{ "currency": "USD" }currency is KES, USD, GBP or EUR, in upper case. Anything else (CHF,
usd) is 422 CUSTOMER_ACCOUNT_CURRENCY_UNSUPPORTED, and details.supported lists
the currencies that work. Send only currency: any other field is
400 UNKNOWN_BODY_FIELD.
GBP and EUR can also answer 503 CUSTOMER_ACCOUNT_CURRENCY_DISABLED: those
accounts are not open for use yet in this environment. See
paying into a GBP or EUR account.
The customer must be verified, and your own account must be active. A customer
at any other status is 409 CUSTOMER_NOT_VERIFIED, and details.status says
where they are, so you know whether to finish verification or stop.
Posting again is safe
This call means "make sure this customer has this account". It answers 201
when it opened the account and 200 when the account already existed, with the
same body either way. It never opens a second account of the same currency for a
customer. So when anything below says "open the account again", the way to do it
is to post the same body.
2. Read the accounts
GET /v1/customers/{id}/accountsThe answer is { "data": [ … ] }, in the order KES, USD, GBP, EUR. For each currency it shows the
open account, or when there is none the latest one that was closed or refused, so
a failed opening does not look like nothing happened. A customer with no accounts
has "data": []. Reading works while your account is suspended, and it keeps
working when opening is switched off.
{
"data": [
{
"id": "3f0c1f0e-5a3e-4d6e-9b53-0b8d2f6f4a10",
"customerId": "5f0c1a3e-2d4b-4c6a-8e9f-0a1b2c3d4e5f",
"currency": "KES",
"status": "active",
"accountNumber": "00000000123456",
"accountName": "Amina Wanjiru",
"balance": {
"available": "1146.00",
"asOf": "2026-11-18T09:00:00.000Z",
"unavailableReason": null
},
"kesInstructions": [
{
"rail": "mpesa_paybill",
"paybill": "000000",
"accountReference": "00000000123456",
"currency": "KES",
"instructions": "M-PESA > Lipa na M-PESA > Pay Bill > Business number 000000 > Account number 00000000123456. This tops up this customer's KES balance. There is no reference to quote per payment.",
"beneficiaryName": "Amina Wanjiru"
},
{
"rail": "bank_transfer",
"accountReference": "00000000123456",
"currency": "KES",
"instructions": "Send KES to account 00000000123456 by PesaLink, RTGS or EFT. This tops up this customer's KES balance. The narration does not need to carry a reference.",
"beneficiaryName": "Amina Wanjiru"
}
],
"namedAccount": null,
"depositDetails": null,
"depositRoutes": [],
"depositRoutesNote": null,
"createdAt": "2026-11-18T08:00:00.000Z"
}
]
}Every account carries the same fields. depositDetails is null, depositRoutes is
[] and depositRoutesNote is null on a KES account, which is paid through
kesInstructions.
Status
status | Meaning |
|---|---|
provisioning | Asked for; the account number has not landed yet. Read again in a few seconds. The accountNumber is null until then. |
active | Open. The number, name and (for KES) the payment instructions are set. |
suspended | Held by OnLink for review. It exists and nothing can be sent to it. Contact us. |
failed | The opening was refused. Open the currency again. |
closed | Shut. Open the currency again for a new one. |
You are told when an opening finishes in the
customer.account.updated event, so you do not have to poll.
Balance
balance.available is a decimal string such as "1146.00". It is
null, never "0.00", whenever we cannot show a figure, because zero is a
balance and would read as "this customer holds nothing". unavailableReason
says why: ACCOUNT_NOT_ACTIVE (the account is not open yet) or
BALANCE_UNAVAILABLE (it could not be read just now: read again).
balance.asOf is the instant the figure was read. Over the API it can be up to
about thirty seconds behind, because a balance is cached for that long, so show
it beside the number. In the portal, Refresh balances reads each balance
directly rather than taking the cached figure, so a deposit that has just landed
shows straight away.
3. A KES account
Once a KES account is active, kesInstructions says how the customer is paid
into it, by M-PESA or bank transfer. accountReference is what the payer quotes,
verbatim. beneficiaryName is there only when the account has a confirmed name:
a bank transfer must be addressed to it, so it is never guessed. Until the account
is active, kesInstructions is null.
4. A USD account, with and without US bank details
A USD account always has a balance. When the customer is approved for US bank details, it also gets its own, in the customer's name, so payers can send USD to it by ACH, FedNow or wire:
{
"namedAccount": {
"status": "active",
"beneficiaryName": "Amina Wanjiru",
"bankName": "Example Bank",
"routingNumber": "000000000",
"accountNumber": "000000000000",
"rails": ["ach", "wire"]
}
}namedAccount.status is provisioning while those details are being set up (the
fields are null and rails is []), active when they are ready, or closed.
Once they are active the same details are also in depositDetails, with
"scheme": "us_bank" (beneficiaryName, bankName, routingNumber,
accountNumber, rails). namedAccount is unchanged and stays the place to read
a USD account's reason when it has none.
When the customer has no US bank details, the USD account still opens, with the
same 201 or 200, and namedAccount says why instead:
{
"namedAccount": {
"status": "unavailable",
"reason": {
"code": "ENDORSEMENT_MISSING",
"message": "This customer is not approved for US bank details, so this USD account has no US bank details of its own.",
"retryable": false
}
}
}reason.code | What it means | retryable |
|---|---|---|
ENDORSEMENT_MISSING | The customer is not approved for US bank details, and waiting will not change it. | false |
ENDORSEMENT_PENDING | Their approval is still under review. Open the USD account again later to add the details. | true |
TEMPORARILY_UNAVAILABLE | Setting the details up failed just now. Open the USD account again. | true |
UNAVAILABLE | Setting them up was refused or needs OnLink. Posting again will not change it: contact us. | false |
reason.message is a sentence you can show to your own user as it is. To add the
details later, post the same { "currency": "USD" } again: it adds them once the
customer is approved, or finishes setting up details that were still
provisioning, without touching the account that already exists.
A EUR account reads the same way, with euro bank details instead of US ones: see
A EUR account's euro bank details. It adds one
reason.code of its own, EUR_DETAILS_UNAVAILABLE: the euro bank details could not be
issued for this account and that attempt was closed, so open the EUR account again
(retryable is true), and contact us if it happens again.
A USD account also takes transfers from outside, the same two ways a retail account does, whether or not it has US bank details: see Paying into a USD, GBP or EUR account.
When a payment arrives
A payment into the customer's US bank details is credited to the customer's USD
balance, net of OnLink's fee, and you are told with
customer.deposit.received. Reconcile
against its net. A KES payment into the customer's KES account, and a transfer from
outside into a USD, GBP or EUR account, are announced with the same event.
A payment is held for review instead, and not credited, when the customer is
suspended or has not been cleared, when the customer is closed, when your partner
account is suspended, or when the account has been closed. You are told once with
customer.deposit.held, whose heldReason says which. The money is safe: if OnLink
releases it you get customer.deposit.received for the same deposit. A KES payment
cannot be held, because it reaches the customer's account before we can review it.
A payment the payer's bank takes back before it is credited is never credited. You are
told once with
customer.deposit.refunded, whose amount
is what was returned and whose reason is always returned_by_bank_after_review. Do not
show the customer a balance change for it. If it was held first, the refund closes the
hold: no customer.deposit.received follows.
5. Paying into a USD, GBP or EUR account
A GBP or EUR account is a balance account in that currency. You open it the
same way, with { "currency": "GBP" } or { "currency": "EUR" }, and it answers
201 or 200 like the others. It accepts transfers from outside, the same way a
retail account does, and so does a USD account: once the account is active, its
own accountNumber is the number a payer uses, and depositRoutes lists exactly how
to send.
| Route | Who sends | Currencies | Addressed to |
|---|---|---|---|
local_bank | A bank inside Kenya, by RTGS in currency | USD, GBP, EUR | The bank itself, with the account's own number. Nothing depends on the payment reference. |
international_bank | A bank outside Kenya | USD, GBP | A correspondent bank. The account number must be in the payment reference, or the money is delayed or returned. |
EUR has no international route yet: depositRoutes lists the local route only,
and depositRoutesNote says so, in a sentence you can show your own user:
International transfers in EUR are not available yet. Nothing was invented to fill
the gap, so never send a EUR payer to another currency's details.
{
"id": "3f0c1f0e-5a3e-4d6e-9b53-0b8d2f6f4a11",
"customerId": "5f0c1a3e-2d4b-4c6a-8e9f-0a1b2c3d4e5f",
"currency": "GBP",
"status": "active",
"accountNumber": "00000000123456",
"accountName": "Amina Wanjiru",
"balance": {
"available": "0.00",
"asOf": "2026-11-18T09:00:00.000Z",
"unavailableReason": null
},
"kesInstructions": null,
"namedAccount": null,
"depositDetails": null,
"depositRoutes": [
{
"scheme": "local_bank",
"currency": "GBP",
"beneficiaryName": "Amina Wanjiru",
"bankName": "Example Bank Kenya",
"bankCode": "99",
"accountNumber": "00000000123456",
"transferType": "rtgs",
"weekdaysOnly": true,
"cutOffTime": "3:00 PM",
"maxBusinessDays": 3
},
{
"scheme": "international_bank",
"currency": "GBP",
"beneficiaryName": "Example Holder Ltd",
"bankName": "Example Correspondent Bank Ltd",
"swiftBic": "EXAMPLKX",
"bankCode": "99",
"branch": "Example Branch",
"branchCode": "001",
"accountNumber": "0000000000",
"reference": "00000000123456",
"referenceName": "Amina Wanjiru"
}
],
"depositRoutesNote": null,
"createdAt": "2026-11-18T08:00:00.000Z"
}Give a payer these values exactly as they are shown. We never compose them. Each route carries:
local_bank:beneficiaryNameis the account's registered name, which the payer's bank checks the number against.bankNameandbankCodeare the bank and its clearing code inside Kenya,accountNumberis the customer's own number, andtransferTypeisrtgs: ask the payer's bank for an RTGS transfer incurrency. Transfers are processed on weekdays (weekdaysOnly); one sent beforecutOffTimelands the same day, and one sent after it can take up tomaxBusinessDaysbusiness days.international_bank:bankName,swiftBic,bankCode,branchandbranchCodeare the correspondent bank's,accountNumberis the account at that bank (not the customer's), andbeneficiaryNameis the name on it.referenceis the customer's own account number and is required on the payment, in its payment reference or narration field;referenceNameis the account's name to quote beside it. The values in the example above are made up: send a payer the ones the API returns.
While the account is provisioning, or active but without its registered name yet,
depositRoutes is [] and depositRoutesNote says the payment details are not ready
yet: read the account again shortly. A suspended, failed or closed account shows
no routes and no note: nothing can be sent to it. depositRoutes is [] and
depositRoutesNote is null on a KES account, which is paid through
kesInstructions.
Only outside money is a deposit
A transfer from outside is announced with
customer.deposit.received, in the
currency it arrived in, with rail set to local_transfer (a bank inside Kenya) or
international_transfer (from abroad), or null when the bank did not say. Money
OnLink itself moves onto the account (crediting a collection, and any conversion or
other internal movement) is not a deposit and is never announced with it: it is
already reported by the event for that movement, so you are never told about one
payment twice. A transfer from outside into one of these accounts has no OnLink fee
and no fee of yours.
Fees on deposits
A payment into the customer's dedicated bank details (depositDetails) can carry two
fees. They are different money, and they are never mixed up:
- OnLink's fee is taken before the credit.
customer.deposit.receivedcarriesgross,feeandnet, and the customer is creditednet, in the currency the payment arrived in (a GBP payment is credited in GBP). Reconcile againstnet. - Your own fee, when your partner terms set an inbound schedule for that currency
(a percentage and a flat part, with a ceiling). We work it out on the
net, round it up (the customer pays it) and never take more than thenet. It is charged from the customer's account to your own account in the same currency, as a separate transfer after the credit, so the customer's balance first showsnetand thennetless your fee once that transfer has settled. It is never converted.
A schedule never charges a deposit credited before it was set: raising your inbound fee does not bill deposits that were already credited. A currency with no inbound schedule charges no fee of yours. A transfer from outside, and a KES payment, carry neither fee.
Both amounts are on the deposit in
the customer's transactions: fees.onlink
is ours and fees.partner is yours, each in the deposit's own currency. fees.partner
reads "0.00" until your fee has been recorded, which is within minutes of the credit,
and stays "0.00" where none is charged.
Dedicated bank details
depositDetails is separate: it holds a dedicated account issued for this
customer, when there is one, with a scheme that says which fields to read. A USD
account's details use "scheme": "us_bank" (see above). A EUR account's use
"scheme": "sepa" (an IBAN and a BIC) once they are issued (next section). There is no
dedicated GBP scheme, so a GBP account's depositDetails is null and a payer uses
depositRoutes. A EUR account that has no euro bank details yet is paid through
depositRoutes too.
A EUR account's euro bank details
When the customer is approved for euro bank details, a EUR account also gets its
own, so a payer in the euro area can send EUR by SEPA. Opening the EUR account asks
for them in the same call, and a later POST with { "currency": "EUR" } adds or
finishes them, exactly as for USD. They arrive in depositDetails and
namedAccount:
{
"namedAccount": {
"status": "active",
"beneficiaryName": "Example Holder S.A.",
"bankName": "Example Bank S.A.",
"routingNumber": null,
"accountNumber": null,
"rails": ["sepa"]
},
"depositDetails": {
"scheme": "sepa",
"beneficiaryName": "Example Holder S.A.",
"bankName": "Example Bank S.A.",
"iban": "LU000000000000000000",
"bic": "EXAMPLLL"
}
}- Give a payer the
iban,bic,beneficiaryNameandbankNameexactly as shown. The beneficiary is the name on the account at the bank, which is not the customer's name: tell the payer to use it as written, because their bank may check the name against the IBAN. - A customer who is not approved for euro bank details still gets the
EURaccount, withnamedAccount.statusunavailableand areasonas forUSD(the message speaks of euro bank details).EUR_DETAILS_UNAVAILABLEandTEMPORARILY_UNAVAILABLEareretryable: post{ "currency": "EUR" }again. - A payment to the euro bank details is not credited yet. It is not
lost: OnLink holds it, you receive no
customer.deposit.receivedfor it, and OnLink returns it to the payer or settles it by hand. Until OnLink tells you this has changed, send aEURpayer todepositRoutes(the local route), which is credited and announced, and treat the euro bank details as not yet in use. Contact us with the customer id if a payer has already sent money to them.
An account that already exists keeps working, and GET /v1/customers/{id}/accounts
still reads it, whatever happens to opening. Every POST for a GBP or EUR
account can be refused with 503 CUSTOMER_ACCOUNT_CURRENCY_DISABLED, including a
repeat POST for an account that already exists: that currency is not open for use
in this environment yet, nothing you can change caused it, and nothing was opened or
changed. Read an existing account with GET, not by posting again. The refusal will
not clear on a retry until OnLink enables that currency in this environment (GBP and
EUR are enabled separately, so one can be open while the other is not): retry after
that, and contact us with the requestId if it persists.
6. When opening fails
503 CUSTOMER_ACCOUNT_CURRENCY_DISABLED: aGBPorEURaccount is not open for use yet, so everyPOSTfor one is refused, an existing account's included. Retry after OnLink enables that currency in this environment (GBPandEURare enabled separately); contact us if it persists.503 CUSTOMER_ACCOUNT_UNAVAILABLE: the account could not be opened just now. Post again shortly. We never open a second account of the same currency for a customer, but an attempt whose outcome we could not confirm is left pending until it settles, and posting again does not open another. If an account staysprovisioningfor more than a few minutes, contact us with the customer id.503 CUSTOMER_ACCOUNTS_DISABLED: opening accounts is switched off in this environment. Reading accounts, accounts that already exist and their deposits all keep working. Retrying will not clear it: contact us.503 REMITTANCE_DISABLED: Remittance is not enabled in this environment.
7. Closing a customer who has accounts
Closing a customer (DELETE /v1/customers/{id}, or Close in the portal) closes its
accounts with it, and only when they are empty. The close is refused, with nothing
closed, while an account holds money (409 CUSTOMER_HAS_BALANCE, details.currencies
names which: a customer cannot be closed while any balance remains, so move it out first
with a payout or an internal transfer to your own account, which carries no OnLink fee and
can bring the balance to exactly zero, then close again; if you cannot move it, contact us
to arrange returning it), a deposit is still being credited
(409 CUSTOMER_DEPOSITS_IN_FLIGHT: wait, and contact us if it persists past an hour),
a transfer, payout, conversion or fee of the customer is still moving
(409 CUSTOMER_HAS_MOVEMENTS_IN_FLIGHT: wait, then close again; a SWIFT or RTGS payout
can take several days), deposits are under review (409 CUSTOMER_HAS_HELD_DEPOSITS), an account is frozen or
dormant (409 CUSTOMER_ACCOUNT_FROZEN: contact us) or an account is still being opened
(409 CUSTOMER_ACCOUNT_OPENING). A balance we cannot read is never taken
as empty (503 CUSTOMER_BALANCE_UNAVAILABLE). Once closed, a customer's accounts show
status: closed and are never reused. The full list, and what to do for each, is in
Manage your customers.
Errors worth handling
Every code is in Errors — Remittance. In every body below
except PARTNER_SUSPENDED and the two 403s the code is in errorCode as well as
message. The two 403s carry theirs in error, as everywhere in this API: see
Errors.
| Status | Code | What to do |
|---|---|---|
400 | UNKNOWN_BODY_FIELD | Remove the fields details.fields names. |
403 | insufficient_scope | The key lacks customer_accounts:write (open) or customer_accounts:read (read); errorCode names it. |
403 | product_not_supported | Your account is not a Remittance account. Contact us if you expected it to be. |
404 | CUSTOMER_NOT_FOUND | Check the id. A customer of another partner reads the same. |
409 | CUSTOMER_NOT_VERIFIED | Finish verifying the customer; details.status says where they are. |
409 | PARTNER_SUSPENDED | Your account is suspended, so opening is refused. Reads still work. Contact us. |
422 | CUSTOMER_ACCOUNT_CURRENCY_UNSUPPORTED | Use a currency in details.supported. |
503 | CUSTOMER_ACCOUNT_CURRENCY_DISABLED | A GBP or EUR account is not open for use yet. Retry later; contact us if it persists. |
503 | CUSTOMER_ACCOUNT_UNAVAILABLE | Post again shortly. |
503 | CUSTOMER_ACCOUNTS_DISABLED | Opening is switched off here. Contact us; retrying will not clear it. |
503 | REMITTANCE_DISABLED | Remittance is not enabled right now. Contact us; retrying will not clear it. |
Manage your customers
Create, find, change and close the customers you move money for, with one set of calls and two webhook events.
Move money between your customers
Move one currency from your own account to a customer, from a customer to you, or from one customer to another, confirm it with a code, and attach your own fee.