Skip to content
Log inSign up free
Payments

Connecting PayHero to your shop

Step-by-step guide to linking PayHero so customers can pay you with M-Pesa.

PayHero is the easiest way to accept M-Pesa payments in your shop. You don't need to apply for Daraja API access from Safaricom — PayHero handles all of that for you. You just create a PayHero account, get three credentials, and paste them into your shop settings.

Before you start

If you don't have these yet, see Getting your PayHero API keys first.

Step 1 — Open your shop settings

From your dashboard, go to Dashboard → Shop. Scroll down to the Payments section. You'll see a row labelled PayHero (M-Pesa) with a status of "Easier M-Pesa setup".

Step 2 — Open the PayHero setup

Tap the PayHero (M-Pesa) row. A setup form will slide up from the bottom of the screen. It asks for three things:

Step 3 — Paste your credentials

Copy each value from your PayHero account and paste it into the matching field. Be careful not to include extra spaces — although we automatically trim whitespace, it's a good habit.

Tap Save. If your credentials are correct, the row will change to Connected and a green toggle will appear to enable or disable PayHero at any time.

Step 4 — Test it

Open your shop in another tab, add a product to the cart, and go to checkout. You should see M-Pesa as a payment option. Use your own phone number to test a small payment (e.g. KES 1) — you should receive an STK push prompt within a few seconds.

If you have direct M-Pesa (Daraja) configured too

When both PayHero and direct M-Pesa are set up, your customers will only see one M-Pesa option at checkout — PayHero takes priority because it has fewer points of failure. Your direct setup stays saved but is hidden until PayHero is disabled.

Disconnecting PayHero

Open the PayHero row again and tap Disconnect. This clears your credentials and removes M-Pesa from checkout (unless you have direct M-Pesa enabled).

Common errors and what they mean

Still need help?

Can't find what you're looking for? Reach out and we'll get back to you.

Contact support
WhatsAppsupport@myduka.link+254797 560 650