OnLink
Guides

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.

An internal transfer moves money between accounts that are all inside your book: from your own account to one of your customers, from a customer back to you, or from one customer to another. Both accounts are in the same currency (KES, USD, GBP or EUR) and nothing is converted. OnLink charges nothing on it. These calls are on a Remittance account and need their own scopes: customer_transfers:write to move money and customer_transfers:read to read a transfer back. A key that holds only customer_accounts:* or transfers:* is refused 403 insufficient_scope, and errorCode names the scope it lacks. A key issued before these scopes existed needs a new key. See Products and scopes.

Every customer belongs to you alone. Another partner's customer id reads exactly like one that does not exist.

1. Create a transfer

POST /v1/internal-transfers
Content-Type: application/json
{
  "from": { "type": "partner" },
  "to": {
    "type": "customer",
    "customerId": "a9c1d2e3-0000-4000-8000-000000000020"
  },
  "amount": { "currency": "USD", "value": "250.00" },
  "partnerReference": "ACME-INT-000123",
  "idempotencyKey": "int-2026-11-19-000123"
}
  • from and to are each { "type": "partner" } (your own account in the currency) or { "type": "customer", "customerId": "…" }. A partner end must not carry a customerId: that is 400, because dropping it silently would move your money when you meant a customer's.
  • amount.value is a decimal string in whole currency units, with at most two decimal places and greater than zero. Never a JSON number.
  • partnerFee is optional: see Your fee.
  • partnerReference is your own reference, up to 64 characters, echoed on every read and in the webhook.
  • idempotencyKey is required, 8 to 64 characters from A-Z a-z 0-9 . _ : -. Any other field is 400 UNKNOWN_BODY_FIELD.

The write is limited to ten a minute per partner.

The answer is 202. Nothing has moved yet:

{
  "id": "3f0c1f0e-5a3e-4d6e-9b53-0b8d2f6f4a51",
  "status": "awaiting_confirmation",
  "from": { "type": "partner" },
  "to": {
    "type": "customer",
    "customerId": "a9c1d2e3-0000-4000-8000-000000000020"
  },
  "amount": { "value": "250.00", "currency": "USD" },
  "fees": { "onlink": "0.00", "partner": "0.00" },
  "partnerReference": "ACME-INT-000123",
  "confirmation": {
    "id": "df9f1e6a-0000-4000-8000-000000000030",
    "channel": "email",
    "deliveredTo": "o***@partner.co.ke",
    "expiresAt": "2026-11-19T08:15:00.000Z",
    "resendAvailableAt": "2026-11-19T08:00:15.000Z"
  },
  "createdAt": "2026-11-19T08:00:00.000Z",
  "completedAt": null
}

Posting again is safe

A retry with the same idempotencyKey and the same request returns the original transfer, in whatever status it has reached, and never creates a second one. The same key with a different request is 422 IDEMPOTENCY_KEY_REUSED. So when a call times out and you do not know whether it landed, post it again unchanged.

2. Confirm it

Like a bank transfer, an internal transfer is instructed by your integration and confirmed with a one-time code. The code goes to your webhook as confirmation.code_issued by default (or, on contact delivery, to your registered confirmation contact), and you post it back. With webhook delivery and no usable webhook the transfer is refused 409 CONFIRMATION_WEBHOOK_NOT_CONFIGURED and nothing is created:

POST /v1/confirmations/{confirmation.id}

See Send money from your KES account for the call and the resend; they are the same here. The answer is the transfer at status: confirmed, and it runs at once. If you do not confirm before confirmation.expiresAt, the transfer ends expired and confirmation.expired is sent. Nothing was moved or held. A code posted after that is 409 INTERNAL_TRANSFER_NOT_CONFIRMABLE, and details.status says what became of it: create a new transfer.

A partner account OnLink has enabled confirmation waiving for, on a key with an IP allowlist, gets the transfer back already confirmed with no confirmation block.

3. Read it, and the webhook

GET /v1/internal-transfers/{id}

The status moves awaiting_confirmation, confirmed, executing, then ends:

statusMeaning
awaiting_confirmationCreated; waiting for the code. The amount (and your fee) is reserved on the sending account, so it cannot be spent twice.
confirmedThe code was right. It is about to run.
executingIt is running. Read again shortly. A transfer whose outcome is not yet certain stays here until OnLink has resolved it.
completedThe money moved. completedAt is set.
failedNothing moved. failureCode says why: see below.
expiredThe code was never verified in time. Nothing moved.

You are told when it ends with internal_transfer.completed or internal_transfer.failed, so you do not have to poll. A transfer that expires is announced by confirmation.expired instead.

failureCode is one of three, and each says what to do next. In every case nothing moved and no fee is owed:

failureCodeWhat happenedWhat to do
CUSTOMER_NOT_ACTIVEA customer was suspended or closed after you confirmed.Resolve that customer's status, then send a new transfer.
ACCOUNT_NOT_READYAn account could not send or receive when it came to run.Check both accounts with GET /v1/customers/{id}/accounts, then send a new transfer.
TRANSFER_REFUSEDThe transfer was refused.Send a new transfer; contact us with the id if it is refused again.

A failed transfer is final: send a new transfer with a new idempotencyKey. Reusing the old key returns the failed one.

4. Your fee

A partnerFee is your fee on moving a customer's money: it is taken from the sending customer's account and paid to your own account, after the transfer completes.

{ "partnerFee": { "amount": "1.50", "currency": "USD" } }
  • currency must equal the currency of the amount.
  • It is at most the lower of a share of the amount and a ceiling, both set for your account. With no terms set for your account, or a share or a ceiling of zero, only "0.00" is accepted. Over the limit is 422 PARTNER_FEE_OVER_CAP, and details.cap is the largest fee that would have passed (0.00 when either limit is zero, or when the amount is too small for the share to reach one minor unit).
  • It applies only to a transfer from a customer. A fee above "0.00" on a transfer from your own account is 422 PARTNER_FEE_NOT_APPLICABLE.
  • The sending account must hold the amount plus the fee.
  • If the transfer fails or expires, no fee is taken.
  • The response shows it as fees.partner; fees.onlink is always "0.00".

5. When creating is refused

Nothing is created, held or moved on any of these. A malformed body (400) is refused first; after that they are checked in this order, and each has its own code so you know what to fix:

StatusCodeWhat to do
503REMITTANCE_DISABLEDRemittance is not enabled right now. Contact us; retrying will not clear it.
503MONEY_MOVEMENT_PAUSEDMoving money is paused for a short time. Retry later.
409PARTNER_SUSPENDEDYour partner account is not active. Contact us; retrying will not clear it.
422IDEMPOTENCY_KEY_REUSEDThe key was used for a different request. Use a new key. (The same key with the same request returns the original transfer.)
404CUSTOMER_NOT_FOUNDCheck the id. A customer of another partner reads the same.
409CUSTOMER_NOT_ACTIVEResolve the status in details.status; details.side says which end.
409MONEY_MODE_MISMATCHLive and sandbox money cannot be moved into each other. Use accounts of the same kind, and when you attach a partner fee make sure your own account is the same kind too.
409ACCOUNT_NOT_READYdetails.reason says why. Open or review the account, then try again.
503ACCOUNT_NOT_READY (activating)The account is still being opened. Retry after retryAfterSeconds.
422INTERNAL_TRANSFER_SAME_ACCOUNTName two different accounts.
422PARTNER_FEE_NOT_APPLICABLEA fee on a transfer from your own account would be paid to yourself. Send "0.00".
409PARTNER_FEE_ACCOUNT_UNAVAILABLEYour own account cannot receive the fee. Send "0.00", or contact us.
422PARTNER_FEE_OVER_CAP and the other fee codesThe fee is over the cap, in another currency, or malformed.
422INTERNAL_TRANSFER_INSUFFICIENT_BALANCEThe sending account, less what other transfers reserve, does not cover the amount plus the fee.

A transfer already accepted can still fail later, and then internal_transfer.failed tells you why (see the failure codes above); that is not a refusal of the create.

Every code is in Errors — Remittance.

On this page