MavuntaMavunta
Building

Test data

Everything below works only in sandbox (a cwk_test_… key). No real money moves, but webhooks, signatures, and request logs behave exactly like production.

M-Pesa test numbers

Set one of these as the customer phone on a test payment and the sandbox tester drives that outcome automatically:

PhoneOutcomeEvent
+254700000001Payment succeedspayment_intent.paid
+254700000002User cancelspayment_intent.cancelled
+254700000003Insufficient fundspayment_intent.failed
+254700000004STK timeoutpayment_intent.expired
+254700000009Under reviewpayment_intent.requires_review

Triggerable outcomes

From the console's Sandbox tester you can create a test payment and drive it to any outcome regardless of the method, which moves the intent and fires the matching webhook:

success     -> payment_intent.paid
failed      -> payment_intent.failed
underpaid   -> payment_intent.underpaid
overpaid    -> payment_intent.overpaid
expired     -> payment_intent.expired
cancelled   -> payment_intent.cancelled
review      -> payment_intent.requires_review

You can also send a standalone test webhook of any type, and refund a sandbox payment to fire payment_intent.refunded.

Sandbox balances

Each sandbox merchant has fake, non-withdrawable balances that grow as test payments complete: USDT 10000, USDC 10000, BTC 1, ETH 10, SOL 100. Use Reset sandbox data to clear all test payments, refunds, webhook deliveries, and logs and return to the seed balances. Live data is never touched.

Build and verify your whole integration in sandbox first. The go-live checklist requires a completed sandbox payment and a received webhook before you can request live access. See Sandbox and go-live.