Getting Started6 min read

    Connect M-Pesa payments

    Connect your Safaricom Daraja credentials to Jasiyo to automate M-Pesa payment collection, subscription renewal, and customer reactivation.

    Payment provider options

    Own Daraja credentials (recommended)

    Most common

    You have a Safaricom Paybill registered on the Daraja portal. Direct integration โ€” no middleman, funds go straight to your Paybill.

    PayHero (bank Paybill)

    Your Paybill is from a bank (Equity, KCB, Co-op, etc.). PayHero handles the bank-side integration and forwards payments to Jasiyo.

    Paystack

    No Paybill yet? Paystack provides STK Push via their own numbers. Good for getting started immediately.

    Daraja setup (own Paybill)

    1

    Get your Daraja credentials

    Log in to developer.safaricom.co.ke, open your app, and copy your Consumer Key and Consumer Secret.

    You'll also need your Paybill number (Shortcode) and Passkey from your Safaricom business account manager.

    2

    Enter credentials in Jasiyo

    Go to Payments in your ISP dashboard and click Connect M-Pesa (Daraja). Fill in all four fields and make sure Sandbox mode is off for live payments.

    3

    Register the callback URL

    Click Register Callback. Jasiyo calls Safaricom's API to register its webhook URL against your Paybill. This tells Safaricom where to send payment notifications.

    This step is mandatory. Without a registered callback, M-Pesa payments will go through to Safaricom but Jasiyo will never be notified โ€” customers won't be renewed automatically.

    How payments flow end-to-end

    1. 1Customer sends M-Pesa to your Paybill using their unique account number (e.g. JSY-A1B2C3)
    2. 2Safaricom sends a real-time callback to Jasiyo's webhook
    3. 3Jasiyo matches the account number to the correct customer
    4. 4The payment is recorded in your Transactions log
    5. 5The customer's subscription is renewed for the appropriate plan period
    6. 6If the customer was suspended, Jasiyo queues a re-enable command on MikroTik โ€” they're back online within 30 seconds
    7. 7An SMS receipt is sent to the customer (if SMS is configured)

    Test a payment

    After connecting, send a small M-Pesa payment to your Paybill using a test customer's account number. Within a few seconds the transaction should appear in Transactions and the customer's subscription should renew.

    You can also use the STK Push button on any customer's profile page to send a payment prompt directly to their phone โ€” useful for testing and for customers who forget to pay.

    PayHero & Paystack

    PayHero โ€” If your Paybill is from a bank (Equity, KCB, Co-op), use PayHero. Go to Payments โ†’ Connect PayHero, enter your API credentials and select your bank channel. See the PayHero guide.

    Paystack โ€” If you don't have a Paybill yet, Paystack lets you accept M-Pesa STK Push without a dedicated Paybill. See the Paystack guide.