Create a rate lock
Locks the current reference rate for a currency pair so it can be reused across multiple merchant transactions until lock expiry or market-drift cancellation.
The rate, markup, and validity window are fixed when the lock is created and stay constant for its lifetime, even if pricing changes afterwards.
Pricing is mid-market reference + markup; the mid, the markup, and the resulting all-in rate are all returned.
You can hold up to two active locks per currency pair, so you can pre-fetch a
replacement (typically about an hour before the current lock expires) and overlap it
with the lock it succeeds. While both are active, keep pricing existing browsing
sessions off the current lock and send new sessions to the new one. If fewer than two
locks are active a new one is minted (201); if two are already active the freshest
existing lock is returned instead (200).
Idempotency: none. Each mint creates a distinct lock, subject to the two-lock cap.
Authentication
Request
Base currency of the pair (ISO 4217) — the currency you price in, e.g. USD.
Quote currency of the pair (ISO 4217) — the currency you collect in, e.g. KES.
Response
An existing active rate lock, returned because two active locks already exist for this currency pair (the maximum of two). The freshest of the two is returned.
active— usable.expired— pastexpiresAt. Terminal.cancelled— invalidated before expiry; seecancellationReason. Terminal.
expired and cancelled are permanent — a lock never returns to active.
A lock at or past expiresAt is invalid even if status still reads active.
Base currency (ISO 4217).
Quote currency (ISO 4217).
Reference mid-market rate the lock was priced from. 1 base = <midRate> quote.
The markup applied over the mid, in basis points (100 bps = 1%).
The rate you transact at: mid plus markup. This is the rate carried onto every
transaction that uses the lock. 1 base = <allInRate> quote.
End of the lock's validity window. The lock is invalid from this time even if
status still reads active.
Why the lock was cancelled. Present only when status is cancelled.
market_drift — the rate moved beyond the allowed tolerance. requested — you
cancelled the lock yourself via the cancel endpoint.