Skip to content

Withdrawals

Initiates a USDC → KES withdrawal, paying out to the user's M-Pesa.

The payout goes to the phone number stored on the account.


Step 1 — Get a rate quote

GET /accounts/{account_id}/withdrawal-quote?amount_usdc=38

{
  "rate_id": "def456-...",
  "amount_usdc": 38.0,
  "fiat_amount_kes": 4970.0,
  "fee_usdc": 0.38,
  "fee_kes": 50.0,
  "exchange_rate": 130.79,
  "spread_bps": 20,
  "expires_in_seconds": 600
}

Step 2 — Confirm the withdrawal

POST /accounts/{account_id}/withdrawals

{
  "amount_usdc": 38,
  "rate_id": "def456-..."
}

Idempotency-Key header required.

Response:

{
  "status": "success",
  "message": "Withdrawal initiated",
  "transaction_id": "tx-uuid-..."
}

Regini sends the KES payout to the user's M-Pesa. Once confirmed, a withdrawal.completed webhook fires.


Option B: Auto-confirm at live rate

{
  "amount_usdc": 38,
  "auto_confirm_rate": true,
  "max_spread_bps": 50
}

One withdrawal at a time

Only one withdrawal can be in-flight per account at a time. A second request while one is pending returns CONCURRENT_WITHDRAWAL.