Build with Mavunta
Accept M-Pesa, 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
Every endpoint lives under https://api.mavunta.com/v1. Authenticate with your key as a bearer token. A cwk_test_… key runs in sandbox and never moves real money.
curl https://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 an official SDK for Node.js, PHP, or Python.
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.