Partner API

Convert USD to KES

Debits the USD from your USD account and credits the KES to your KES account, asynchronously. Poll GET /v1/conversions/:id or wait for conversion.settled or conversion.failed. If the exchange cannot be completed after your USD was debited, the USD is returned to you and the conversion ends failed with the reason. No confirmation code: both accounts are your own.

post/v1/conversions

Request

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

Request body

fromstring required

The currency you convert from. Only USD is supported.

tostring required

The currency you receive. Only KES is supported.

amountstring required

The amount of from to convert, as a decimal string with at most 2 decimal places.

partnerReferencestring required

Your own reference for this conversion, stored for your records and returned on reads.

idempotencyKeystring required

Makes the create safe to retry: the same key with the same body returns the same conversion; the same key with a different body is refused IDEMPOTENCY_KEY_REUSED (422). 8 to 64 characters from A-Z, a-z, 0-9, _ and -.

Example request

{
  "from": "USD",
  "to": "KES",
  "amount": "100.00",
  "partnerReference": "payout-run-2026-10-24",
  "idempotencyKey": "cnv-2026-10-24-0001"
}

Response

The conversion was accepted and is processing.

idstring required

The conversion id. Poll GET /v1/conversions/:id with it.

status'processing' | 'settled' | 'failed' required

processing, settled or failed.

Example response

{
  "id": "c0a8012e-7b1a-4c39-9d3e-2f5c8a1b6d40",
  "status": "processing"
}

Changes

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