API reference

One REST API for quoting, sending and tracking payouts. JSON in, JSON out. Amounts are always strings with their currency, never floats.

Quickstart

Create an API key in the console under API & webhooks. You receive a key and a signing secret, shown once. Fund your balance, then quote and send.

request
POST /v1/quotes { "amount": { "value": "500000", "currency": "NGN" }, "source_currency": "USD", "destination": { "country": "NG", "method": "bank_account" }, "routing": { "strategy": "cheapest" } }

Signing requests

Every API-key request carries three headers in addition to Authorization: Bearer <api key>. The signature is an HMAC-SHA256, hex encoded, over five lines joined with newlines, keyed with your signing secret. Timestamps must be within five minutes, and each nonce can be used once.

canonical string
METHOD /path?query hex(SHA256(body)) # empty body hashes the empty string unix_timestamp_seconds nonce # 8-64 chars: A-Z a-z 0-9 _ -
node
import crypto from 'node:crypto'; function sign(method, pathWithQuery, body, signingSecret) { const ts = Math.floor(Date.now() / 1000).toString(); const nonce = crypto.randomUUID(); const bodyHash = crypto.createHash('sha256').update(body ?? '').digest('hex'); const canonical = [method, pathWithQuery, bodyHash, ts, nonce].join('\n'); const sig = crypto.createHmac('sha256', signingSecret).update(canonical).digest('hex'); return { 'X-Onavia-Timestamp': ts, 'X-Onavia-Nonce': nonce, 'X-Onavia-Signature': sig }; }

Payouts

POST/v1/quotesRank every eligible route. Valid for 60 seconds.
POST/v1/payoutsCreate a payout. Send an Idempotency-Key header.
GET/v1/payoutsList, filter by status or corridor.
GET/v1/payouts/{id}Full detail: timeline, attempts, routing decision, screening.
POST/v1/payouts/{id}/cancelCancel before dispatch.
POST/v1/recipients/verifyName enquiry before you send.
GET/v1/corridorsSupported corridors, limits and live health.
GET/v1/balancesAvailable and reserved balances per currency.
request
POST /v1/payouts Idempotency-Key: 6f1c0e0a-9d4e-4f63-9a8c-0b2f4e9e1a11 { "amount": { "value": "500000", "currency": "NGN" }, "source_currency": "USD", "recipient": { "type": "bank_account", "country": "NG", "bank_code": "058", "account_number": "0123456789", "name": "Adaeze Okafor" }, "routing": { "quote_id": "9b2d6f0e-41c7-4a3a-8e15-6c0f2d7a5b34", "provider": "baobab" }, "reference": "INV-2041", "guarantee": true }

Payout states

A payout is always in exactly one state. UNKNOWN means a provider timed out: the payment may have happened. Onavia polls the provider until it is certain and only fails over after confirmed non-execution, so you are never paid out twice.

CREATED → SCREENING → (IN_REVIEW | PENDING_APPROVAL) → DISPATCHED → PROCESSING → COMPLETED
                                                                    ↘ UNKNOWN → (resolved by polling)
Terminal: COMPLETED · FAILED · REJECTED · RETURNED

Routing

Pass routing.strategy as cheapest, fastest, reliable or custom, optionally with max_fee_usd or a saved rule_id. The response of every quote tells you which route wins, why, and what the backups are.

Webhooks

Add an endpoint in the console under API & webhooks. Onavia POSTs JSON events and signs each delivery. Treat a webhook as a prompt to fetch the payout, not as the source of truth.

headers
Onavia-Signature: t=1764950400,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd Onavia-Event-Id: 3b1d6c52-8a0e-4f6b-9e0d-2f4c7a1b9d10 Content-Type: application/json

To verify: take t and the body exactly as received, compute HMAC-SHA256(endpoint_secret, t + "." + body) as hex, and compare it in constant time with each v1 value (there are two while a secret is being rotated). Reject if t is more than five minutes old. Deduplicate on Onavia-Event-Id, because delivery is at least once.

Why this differs from request signing. Requests you send are signed with your per-key signing secret and a single-use nonce, so Onavia can reject replays. Webhooks you receive are signed with the endpoint's own secret and a timestamp, so you can verify them without storing nonces, and a leaked endpoint secret can never be used to call Onavia.

Failed deliveries (anything but a 2xx within 5 seconds) retry with exponential backoff, from about 10 seconds up to 6 hours between tries, for 72 hours.

events
payout.created · payout.dispatched · payout.completed · payout.failed payout.unknown · payout.returned · guarantee.breached
payload
{ "event_id": "3b1d6c52-8a0e-4f6b-9e0d-2f4c7a1b9d10", "type": "payout.completed", "created_at": "2026-12-05T10:00:00.412Z", "data": { "payout_id": "c4a1e2f7-5d3b-4b8e-9a60-1f2e7d9c0b83", "reference": "INV-2041", "status": "COMPLETED", "amount": { "value": "500000", "currency": "NGN" } } }

Rate limits & pagination

Each API key can make about 50 requests per second with bursts to 100. Each business is capped at about 200 per second with bursts to 400 across all its keys. Agent credentials are limited to about 10 per second, burst 20. Over the limit you get 429 and code rate_limited: back off and retry with jitter.

List endpoints return newest first. GET /v1/payouts takes limit (1 to 200, default 50), status, corridor and before, an ISO timestamp. To get the next page, pass the created_at of the last item you received as before.

request
GET /v1/payouts?status=COMPLETED&limit=50&before=2026-12-05T09:41:12Z

Agents & MCP

Create an agent credential in the console, with daily limits, a per-recipient cap, allowed corridors and an approval threshold. Point an MCP client at POST /mcp with the agent token as a Bearer credential.

tools
onavia_quote · onavia_verify_recipient · onavia_plan_payment · onavia_create_payout · onavia_get_payout

Errors & idempotency

Errors share one shape. Unknown fields are rejected, not ignored. Replaying an Idempotency-Key with the same body returns the original response; with a different body it returns 409. While the first request is still running a replay gets 409 request_in_progress.

error
{ "error": { "code": "insufficient_funds", "message": "Available balance is too low", "request_id": "req_OMg2giI61Kms" } }

Quote the request_id when you contact support. Branch your code on code, never on the message text.

HTTPCodeMeaning and what to do
400invalid_field · missing_field · invalid_inputThe body is malformed, a field is missing, wrong type or unknown. Fix the request.
400invalid_amount · unsupported_currency · currency_mismatchThe amount or currency is not valid for this route.
400invalid_recipientRecipient details failed validation.
401unauthorizedMissing or bad key, signature, timestamp or nonce, or the nonce was reused.
403forbidden · step_up_requiredThe key lacks the scope, the IP is not allowed, or the action needs a fresh confirmation.
404not_foundNo such resource for your business.
409request_in_progress · not_executableIdempotency conflict, or the payout is not in a state that allows this.
422quote_expired · quote_mismatchQuotes last 60 seconds and must match the payout. Request a new quote.
422no_route · provider_unavailableNo eligible provider right now. Retry later or relax routing constraints.
422insufficient_fundsAvailable balance is too low.
422limit_exceeded · daily_limit_exceeded · key_spend_limitA spend limit was hit.
422email_not_verified · documents_missingLive access is not complete yet. Finish verification in the console.
423pausedPayouts for your business are paused. Contact support.
429rate_limitedToo many requests. Back off and retry.