Creating an Order
POST /api/v1/auth/orders
offer_id- Required; must reference an existing offer for the chosen vendor.pricing_profile_idandfx_rate_quote_id- Required for commercial enforcement; must matchorder_type, asset (USDT),fiat_currency, and network implied bywallet_address(Tron-styleT...vs Ethereum0x...) for pricing validation.order_type-ON_RAMP_BUY(default) orOFF_RAMP_SELL.- Off-Ramp: provide
payout_phone; escrow and network detection use the customer’s validatedwallet_address.
Off-Ramp vs On-Ramp
| On-Ramp | Off-Ramp | |
|---|---|---|
| order_type | ON_RAMP_BUY | OFF_RAMP_SELL |
| Typical status | pending → pay fiat | awaiting_crypto → customer sends USDT to escrow |
| wallet_address | Delivery wallet | Used to detect TRON vs Ethereum for pricing + escrow |
Payment Screen (In-app Wallet Send)
| Method | Purpose |
|---|---|
POST /api/v1/auth/orders/{order_id}/estimate-fee | Estimate network fee; body includes wallet_id and network (must match order network). |
POST /api/v1/auth/orders/{order_id}/send-payment | Send USDT from the user’s platform wallet to escrow (off-ramp) or destination (on-ramp pattern); requires { "wallet_id", "confirm": true }. |
GET /api/v1/auth/orders/{order_id}/qr-code | QR / URI payload for display. |
Fiat Payment (M-Pesa)
POST /api/v1/auth/orders/payment - STK push with order_id and phone_number.
Pricing on the Order
GET /api/v1/auth/order/id/{id}/pricing returns the stored snapshot (rates, fees, net amounts) when present.
Callbacks (Server-to-Server)
POST /api/v1/payment/callback- M-Pesa; configured for Daraja validation.POST /api/v1/mpesa/b2c/resultand.../queue- B2C payout callbacks.