Production Base URL
All paths below are rooted at:Authorization: Bearer <access_token> unless noted as public (Safaricom callbacks).
Run migration 000044_otc_desk_controls before using desk reports, C2B tables, or deposit pricing snapshot columns.
Mobile Money C2B — Register with Safaricom (Public)
Register these ConfirmationURL and ValidationURL values in the Daraja portal for your pay bill/till:BillRefNumber must match an active row in merchant_c2b_accounts (create via admin API below).
Validation Callback (Safaricom → You)
POSThttps://crypto.westminister.tech/api/v1/mpesa/c2b/validationAuth: none Request body (example):
Confirmation Callback (Safaricom → You)
POSThttps://crypto.westminister.tech/api/v1/mpesa/c2b/confirmationAuth: none Same request body shape as validation. On success the platform stores
c2b_payments and, when BillRefNumber matches a merchant account, records merchant settlement (webhook c2b.payment.settled if OTC_EVENTS_WEBHOOK_URL is set).
Response:
C2B Admin Configuration
Create Merchant Account Reference
POSThttps://crypto.westminister.tech/api/v1/auth/otc/c2b/accountsRoles: admin or treasury
List C2B Payments
GEThttps://crypto.westminister.tech/api/v1/auth/otc/c2b/payments?merchant_id=<uuid>&from=2026-06-01T00:00:00Z&to=2026-06-02T00:00:00Z
OTC Deposit Credit — Quote Enforcement
POSThttps://crypto.westminister.tech/api/v1/auth/otc/deposits/{id}/creditRoles: admin, otc_officer, or treasury (with limits below)
crypto_amount must match requested_crypto_amount within OTC_CREDIT_QUOTE_TOLERANCE_BPS (default 10). Otherwise 422 with requires_second_approval: true. admin or treasury may pass override_reason to credit a different amount.
Maker-Checker Limits (Env)
admin and treasury have no USD cap. treasury may confirm fiat and initiate credit.
Revenue Reports
GEThttps://crypto.westminister.tech/api/v1/auth/otc/reports/deposits?status=credited&limit=50&offset=0&from=2026-06-01T00:00:00Z&to=2026-06-30T23:59:59Z
GET https://crypto.westminister.tech/api/v1/auth/otc/reports/deposits/rollup?from=2026-06-01T00:00:00Z&to=2026-06-30T23:59:59Z
Response (rollup example):
Treasury Desk Liquidity
GEThttps://crypto.westminister.tech/api/v1/auth/treasury/desk-liquidity?network=tron&refresh=true
Hedge Notes (Manual Register)
POSThttps://crypto.westminister.tech/api/v1/auth/otc/hedge-notes
Bank Withdrawal Payout Tracking
POSThttps://crypto.westminister.tech/api/v1/auth/otc/withdrawals/{id}/record-bank-payout