Base URLs
| Environment | Base URL |
|---|---|
| Sandbox | https://sandbox.kulmipay.com |
| Live | https://app.kulmipay.com |
Setting up sandbox credentials
Create a sandbox account
Go to sandbox.kulmipay.com and sign up. Sandbox accounts are separate from live accounts — you need a distinct registration for each environment.
Create an API application
From your sandbox dashboard, navigate to API Applications and create a new application. You’ll receive a set of test credentials:
- Client ID — identifies your sandbox application
- Client Secret — authenticates your sandbox application
- Public Key — in the format
ISPubKey_test_... - API Secret Key — in the format
ISSecretKey_test_...
Sandbox test data
Use the values below to simulate common payment scenarios. These identifiers only work in the sandbox environment.M-Pesa test phone numbers
| Phone number | Simulated behavior |
|---|---|
254723890353 | Payment succeeds |
254700000000 | Payment fails (insufficient funds) |
254711111111 | Payment times out |
Test cards
| Card number | Expiry | CVV | Simulated behavior |
|---|---|---|---|
4111111111111111 | Any future date | Any 3 digits | Payment succeeds (Visa) |
5500005555555559 | Any future date | Any 3 digits | Payment succeeds (Mastercard) |
4000000000000002 | Any future date | Any 3 digits | Payment declined |
Test amounts
There are no restrictions on amounts in the sandbox. You can use small values like1 or 5 to keep test data clean.
Webhook notifications in the sandbox behave identically to production. Configure your webhook endpoint to a publicly accessible URL (or use a tunneling tool like ngrok during local development) to receive sandbox events.
Switching from sandbox to live
When you’re ready to process real transactions:- Replace the sandbox base URL (
https://sandbox.kulmipay.com) with the live URL (https://app.kulmipay.com) in your configuration. - Replace your sandbox credentials (Client ID, Client Secret, Public Key, API Secret Key) with the corresponding live credentials from your live dashboard.
- Ensure your webhook endpoint URL is pointing to your production server.
- Complete any required business verification in your live account before processing payments.
