Element Pay API
Element Pay lets you on-ramp (fiat → crypto) and off-ramp (crypto → fiat) with a simple API.Quick Links
How it works (at a glance)
- On-ramp (order_type = 0): customer pays via M-Pesa → tokens sent to
user_address
. - Off-ramp (order_type = 1): customer spends tokens → fiat paid to PHONE / TILL / PAYBILL.
- You get webhooks for status updates (
order.submitted
,order.settled
,order.failed
,order.refunded
).
Environments & base URLs
Environment | Base URL |
---|---|
Sandbox | https://sandbox.elementpay.net/api/v1 |
Production | https://api.elementpay.net/api/v1 |
Tokens & rates (at a glance)
- Fetch supported tokens/networks from GET
/meta/tokens
(use the correct environment). - Amounts in responses (
amount_sent
) are human units (e.g.,12.34
USDC). - Off-ramp needs ERC-20 allowance first; otherwise you’ll get
400 insufficient_allowance
. rate_used
is locked at order creation (see the guide below for fees/markups & examples).
First call (on-ramp)
- Poll:
GET /orders/tx/{tx_hash}
- Prefer: webhooks (set URL + secret on your API key)
Errors (shape)
- 401 Missing/invalid API key
- 400
insufficient_allowance
/insufficient_balance
- 422 Validation errors (
data.errors[]
)
Try in Postman
Need help?
- Email: elementpay.info@gmail.com
- Community: WhatsApp (see header)