MavuntaMavunta
Getting started

Sandbox and go-live

Test mode behaves exactly like production — real webhooks, real signatures, real request logs — but no money moves. A cwk_test_… key runs in sandbox; a cwk_live_… key runs live. Objects never cross between the two.

The sandbox tester

From the developer console you can create a test payment and drive it to any outcome, which moves the intent and fires the matching webhook so you can test your real backend:

  • Outcomes: success, failed, underpaid, overpaid, expired, cancelled, review.
  • Send a standalone test webhook, view fake balances, and reset all sandbox data.

M-Pesa test numbers

The customer phone on a test payment selects the outcome automatically:

PhoneOutcome
+254700000001Payment succeeds
+254700000002User cancels
+254700000003Insufficient funds
+254700000004STK timeout
+254700000009Under review

Going live

You do not simply flip a switch. Complete the technical steps in sandbox, then submit your business details (KYB) for review. The console tracks this checklist for you:

  • Sandbox payment created and completed
  • Webhook endpoint added and a delivery received
  • Refund flow tested
  • Business profile submitted and approved
Once approved, create a cwk_live_… key and add a separate live webhook endpoint. The API surface is identical to sandbox; new merchants start with lower limits that increase with a clean payment history. The full production, security, and webhook checklists are in Go live.