Mypayments
FeaturesSecurityContact
Log inRegister your business
FeaturesSecurityContact

Features

STK PushPaybill and till collectionsVerified settlementSigned webhooksCallback forwardingKopoKopoB2C and B2B payouts
Log inRegister your business
HomeFeaturesSigned webhooks

Signed webhooks

Signed payment webhooks with a delivery ledger

When money settles we POST it to your server, signed with your own secret. If your server is down we keep trying, and you can see every attempt and resend any payment from the dashboard.

Every webhook carries an X-MyPayments-Signature: a timestamp and an HMAC-SHA256 of the raw body.

Register your businessTalk to our team
Verify a webhook (Node)
// X-MyPayments-Signature: t=<unix seconds>,v1=<hex>
const { t, v1 = "" } = Object.fromEntries(
  String(req.headers["x-mypayments-signature"] ?? "").split(",").map((p) => p.split("=")));
const expected = crypto.createHmac("sha256", process.env.MYPAYMENTS_SECRET)
  .update(`${t}.${rawBody}`).digest("hex");
const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300;
if (!fresh || v1.length !== expected.length ||
    !crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(v1)))
  return res.status(401).end();

How signed webhooks works

Verify in five lines

Compute HMAC-SHA256 of the timestamp and raw body with your secret and compare. A replayed request fails the timestamp check; a forged one fails the signature.

Rotate without downtime

Rotate the signing secret from the dashboard. The new one is shown once; update your server and carry on.

Only real endpoints

We deliver over verified TLS and refuse private and cloud-metadata addresses, so a webhook URL cannot be turned against a network.

Questions about signed webhooks

What if my server misses a webhook?+

We retry with backoff, and you can resend from the transaction page or poll the transaction by reference.

More on your paybill

STK PushPrompt the customer's phone for their M-PESA PIN with one API call to your own paybill or till.Read more about STK Push Paybill and till collectionsCustomers pay your paybill or till directly. We register the URLs with Safaricom and match every payment.Read more about Paybill and till collections Verified settlementNothing is marked paid until the provider confirms it server to server. Amount mismatches are flagged, never hidden.Read more about Verified settlement
Mypayments

A product of Bitwise Digital Solutions Limited, building software in Nairobi since 2015.

  • Data controller and processor, Kenya DPA 2019
  • ICT certified

Features

STK PushPaybill and till collectionsVerified settlementSigned webhooksCallback forwardingKopoKopoB2C and B2B payouts

Company

Security and complianceContact usBitwise Digital SolutionsTerms and conditionsPrivacy policy

Talk to us

+254 796 002 630 [email protected]

Unit 5 & 6 IPS Building, Kimathi Street, Nairobi

© 2026 Bitwise Digital Solutions Limited. M-PESA and KopoKopo are trademarks of their owners. Mypayments is an independent integration service.