Payments API for Kenya

M-PESA payments for businesses that keep their own paybill

Bring your paybill, till or KopoKopo account. Prompt customers with STK Push, take direct paybill payments, and receive each one on your server as a signed webhook, without writing Daraja code.

Confirmed with Safaricom before it counts as paid.

Transactions · INV-2041

Prompt sent

STK Push to 07•• ••• 678 · KES 1,500 · INV-2041

Customer entered PIN

Safaricom callback received: claims success

Verified with Safaricom

STK Query: paid · receipt TL3A9K2XQ7 · amount matches

Webhook delivered

POST https://shop.example/payments · 200 OK · signed

X-MyPayments-Event: payment.settled

X-MyPayments-Signature: t=1796313600,v1=9f2c…e41a

{ "event": "payment.settled",

"transaction": { "reference": "INV-2041",

"amount": "1500.00", "status": "settled",

"verified": true, "provider_receipt": "TL3A9K2XQ7", … }

}

What runs on your paybill

Collections today, payouts next, all behind one API key and one webhook format.

Every payment takes the verified path

A callback from the provider is a claim. We check it with the provider, compare the amount with what you asked for, and only then tell your server. Money we cannot confirm waits for a person, not for luck.

Customer pays

STK Push prompt, or straight to your paybill or till

verify with provider ↓

  • Signed webhook to your server
  • Verified ledger and lookup API
  • Unverifiable money parked for review

One POST to take a payment

  1. 1Add your accountPaste your Daraja or KopoKopo credentials, test them, and we register your callback URLs with Safaricom.
  2. 2Mint an API keyScoped to what your server needs, hashed at rest, revocable on its own.
  3. 3Handle one webhookVerify the signature, mark the order paid. Or poll the transaction by your reference.
Prompt a customer for KES 1,500
curl -X POST https://api.mypayments.co.ke/api/v1/stk \
  -H "Authorization: Bearer $MYPAYMENTS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"account":"<paybill uuid>","phone":"0712345678",
       "amount":"1500","reference":"INV-2041"}'

Security your auditors can read

Built and run in Nairobi by Bitwise Digital Solutions Limited: compliant as a data controller and processor under the Kenya Data Protection Act, 2019, and ICT certified.

Credentials sealed

AES-256-GCM at rest, decrypted only at the moment we call the provider, never shown back.

Scoped API keys

Each key carries only the scopes you give it and can be revoked on its own.

Activity log

Every change to accounts, keys and webhooks is recorded with who and when.

Kenya DPA and ICT

Controller for your account data, processor for payer data, and ICT certified.

Read how we protect payments

Questions businesses ask first

Does the money pass through Mypayments?

No. Customers pay your own paybill, till or KopoKopo account and the money settles to you. We hold the credentials, run the integration and tell your system what happened.

Do I have to give you full access to my shortcode?

No. STK Push credentials are enough to start. Add C2B or payout credentials later, only if you use them.

How do I know a payment is real?

We confirm every payment with M-PESA or KopoKopo server to server before marking it paid, and sign every webhook we send you.

Who runs Mypayments?

Bitwise Digital Solutions Limited, a Nairobi software company building since 2015, compliant as a data controller and processor under the Kenya Data Protection Act and ICT certified.

Connect your paybill this afternoon

Start in the Safaricom sandbox and switch to production when your shortcode is ready.