Up and running in an hour
No Safaricom developer account needed on your end. Sign up, grab an API key, and accept your first M-Pesa payment.
Create a free account
Sign up with your business email. No Safaricom developer account on your end, no paperwork, no waiting list. Your merchant dashboard is ready in 30 seconds.
Generate an API key
From Settings → API Keys, create a key starting with sp_. Store it once — you'll use it to authenticate every request. Optional: configure a webhook URL to receive payment notifications.
Make your first charge
POST to /api/v1/payments/stk-push with the customer's phone and amount. Safaricom prompts them on their phone. When they enter their PIN, you get a signed webhook with the M-Pesa receipt.
Get paid
Successful transactions land in your SunPay wallet. Request a withdrawal anytime and the net is sent to your M-Pesa Paybill, till, or phone via B2C. Or enable auto-withdraw for instant settlement.
curl -X POST https://api.sunpay.co.ke/api/v1/payments/stk-push \
-H "Authorization: Bearer sp_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phoneNumber": "254712345678",
"amount": 100,
"callbackUrl": "https://your-app.com/webhook"
}'Frequently asked
Do I need a Safaricom Daraja account?
No. SunPay holds the Daraja integration. You sign up with us, we handle the Safaricom side.
How long does integration take?
Most teams ship STK Push in under an hour. Our docs include copy-paste modules for Node.js, Python, and PHP.
What if the customer doesn't complete the payment?
You receive a payment.failed webhook with the reason. Your app can show a clear error and prompt the customer to try again.
Can I accept Paybill payments?
Yes — pass an account number on your customer's till receipt, and we'll route the matching payment to you automatically.