Build with Mavunta
Accept M-Pesa, Airtel Money, card, PayPal, Mavunta Balance, and on-chain stablecoin payments from one integration. You create a payment intent, send the customer to its hosted checkout, and confirm with a signed webhook. Mavunta handles the rails, quotes, and settlement.
How a payment works
- Create a payment intent server-side with your secret key. You price in fiat (for example KES) and receive a settlement asset (USDT by default).
- Redirect the customer to the intent's
checkout_url. The hosted checkout offers every method valid for the currency. - Fulfil the order when you receive the signed
payment_intent.paidwebhook (or a fresh retrieve), never on the redirect alone.
Your first request
Sandbox keys (cwk_test_…) call https://sandbox-api.mavunta.com/v1 and never move real money; live keys call https://api.mavunta.com/v1. Authenticate with your key as a bearer token.
cURL
Sandbox
curl https://sandbox-api.mavunta.com/v1/payment-intents \
-H "Authorization: Bearer cwk_test_sk_..." \
-H "Idempotency-Key: order-1001" \
-H "Content-Type: application/json" \
-d '{
"amount": "2500",
"currency": "KES",
"settlement_currency": "USDT",
"payment_methods": ["mpesa", "card", "mavunta_balance"]
}'Prefer a typed client? Install the official Node.js / TypeScript SDK or the Mavunta CLI.
What to read next
- Quickstart — take your first payment end to end in sandbox.
- Authentication — key types, scopes, and IP restrictions.
- Sandbox and go-live — test without real money, then request live access.
- Webhooks — verify signatures and handle events safely.