Partner API

Send money from your KES account

Validates the destination, verifies the beneficiary name where the rail supports it, checks your caps and balance, then writes the instruction and sends a confirmation code to your registered confirmation contact, or to your webhook as confirmation.code_issued if OnLink has switched your account to webhook delivery. Nothing reaches the bank until that code is verified via POST /v1/confirmations/:id, unless OnLink has enabled confirmation waiving for your account and, in production, the API key has an IP allowlist, in which case the transfer is returned already confirmed and is executed immediately.

post/v1/transfers

Request

  • Base URL
    https://sandbox.onlink.africa
  • Auth
    API key in header X-OnLink-Key

Request body

rail'mpesa' | 'pesalink' | 'rtgs' | 'eft' | 'swift' | 'internal' required

The rail to send on.

partnerReferencestring

Your own reference for this transfer, echoed back on every read.

idempotencyKeystring required

A key unique to your account. A retried create with the same key and the same request body returns the original transfer rather than creating a second one; the same key with a DIFFERENT request body is refused.

paymentPurposeIdstring

Payment purpose code. Required for rtgs, eft, swift. Not allowed for mpesa, pesalink, internal.

senderAddressstring

Your registered address. Required for rtgs, eft, swift. Not allowed for mpesa, pesalink, internal.

remarkstring

Optional free-text remark. Allowed on every rail.

Example request

{
  "rail": "mpesa",
  "destination": {
    "accountNumber": "254700000000",
    "accountName": "Jane Wanjiku",
    "bankCode": "11",
    "bankName": "Equity Bank",
    "branchCode": "001",
    "swift": {
      "bic": "BARCKENXXXX",
      "bankCity": "Nairobi",
      "bankCountry": "Kenya",
      "chargeType": "OUR",
      "accountCurrency": "KES"
    }
  },
  "amount": {
    "currency": "KES",
    "value": "1500.00"
  },
  "partnerReference": "ACME-TRF-000123",
  "idempotencyKey": "trf-2026-09-11-000123",
  "paymentPurposeId": "SALA",
  "senderAddress": "1 Kenyatta Ave, Nairobi",
  "remark": "September rent"
}

Response

The instruction was created. Normally a confirmation code is sent and the response carries a confirmation object. When OnLink has enabled confirmation waiving for your account and, in production, the API key has an IP allowlist, the transfer is created already confirmed, executes immediately, and the response carries no confirmation object.

idstring required

The transfer id.

status'awaiting_confirmation' | 'confirmed' | 'executing' | 'processing' | 'settled' | 'failed' | 'expired' | 'cancelled' required

The transfer status.

rail'mpesa' | 'pesalink' | 'rtgs' | 'eft' | 'swift' | 'internal' required

The rail this transfer moves on.

nameVerification'verified' | 'unavailable' required

Whether the beneficiary name could be verified against the rail. unavailable covers both "this rail has no verification" (rtgs, eft, swift) and a provider outage — see verifiedAccountName.

verifiedAccountNamestring

The resolved beneficiary name, present only when nameVerification is verified.

partnerReferencestring

Your own reference, echoed back.

failureCodestring

A classified failure code, present only once failed.

createdAtstring date-time required

ISO-8601 instant the transfer was created.

confirmedAtstring date-time

ISO-8601 instant the transfer was confirmed: when its confirmation code was verified, or, when confirmation is waived for your account, when the transfer was created already confirmed.

settledAtstring date-time

ISO-8601 instant the transfer settled.

Example response

{
  "id": "bd9f1e6a-0000-4000-8000-000000000010",
  "status": "awaiting_confirmation",
  "rail": "mpesa",
  "amount": {
    "currency": "KES",
    "value": "1500.00"
  },
  "fee": {
    "currency": "KES",
    "value": "1500.00"
  },
  "destination": {
    "accountNumber": "254700000000",
    "accountName": "Jane Wanjiku",
    "bankCode": "11"
  },
  "nameVerification": "verified",
  "verifiedAccountName": "JANE WANJIKU",
  "partnerReference": "ACME-TRF-000123",
  "failureCode": "PROVIDER_REJECTED",
  "createdAt": "2026-09-11T00:00:00.000Z",
  "confirmedAt": "2026-09-11T00:02:00.000Z",
  "settledAt": "2026-09-11T00:05:00.000Z",
  "confirmation": {
    "id": "df9f1e6a-0000-4000-8000-000000000030",
    "channel": "email",
    "deliveredTo": "o***@partner.co.ke",
    "expiresAt": "2026-09-11T00:15:00.000Z",
    "resendAvailableAt": "2026-09-11T00:00:15.000Z",
    "webhookDelivery": {
      "status": "delivered",
      "attempts": 1,
      "lastAttemptAt": "2026-09-11T00:00:02.000Z"
    },
    "waiverNotApplied": "key_without_ip_allowlist"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.