Live source of truth: always call GET /meta/tokens for the supported tokens/addresses in your current environment (Sandbox vs Production). The list below is a snapshot for reference.
Supported tokens (snapshot)
Note: addresses can differ by environment. Always use /meta/tokens in the target environment to get the canonical list (and decimals).
Environment & token mismatch
- Testnet tokens will not work in Production. Use testnet tokens strictly in Sandbox.
- If a token isn’t configured for the current environment, the server should return a 400 explaining the mismatch instead of failing later.
No Web3 instance found for token) to a 400 with a clear message.
Preview a quote (no auth)
UseGET /quote to preview pricing without creating an order.
Parameters
amount_fiat(KES): positive numbertoken:USDC | USDT | WXMorder_type:OnRamp|OffRampor0|1(defaults toOnRamp)
rate: KES per token after markuptoken_amount: tokens the user would receive (OnRamp) or must send (OffRamp)fiat_paid: echo of inputsymbol,decimals: metadata
400 bad_order_type→order_type must be 0|1 or OnRamp|OffRamp400 unknown_token/token_env_mismatch429rate limited; respectRetry-After502upstream price provider error
Units & decimals
- Fields like
token_amountandamount_sentare human units (e.g.,12.34USDC). - ERC-20 approvals must be in base units (integers), using the token’s decimals.
Off-ramp approvals (ERC-20)
Before creating an OffRamp order, approve the Element Pay spender/contract for the token. If allowance is too low,POST /orders/create responds with:
- Approve just-enough (or a reasonable buffer), not unlimited.
- Reuse allowance across multiple off-ramp orders until depleted.
- Handle
insufficient_balancesimilarly (you’ll getrequiredvscurrentindata).
Putting it together
- Call
/meta/tokensto get supported tokens, addresses, and decimals (for your environment). - Call
/quoteto previewrateandtoken_amountbefore creating an order. - For OffRamp, ensure allowance ≥ required amount (approve if needed).
- Create the order via
POST /orders/createand track via webhooks orGET /orders/tx/{tx_hash}.
- API Reference → Quote
- API Reference → Create Order
- API Reference → Webhooks

