All guides

Connect M-Pesa Paybill or Till to Sync

Once connected, every customer payment to your shortcode appears in Sync within seconds, posts to your ledger, and matches itself to the right invoice whenever the payer quotes an invoice number.

Before you start
A Safaricom Paybill or Till number registered to your business
Access to the M-Pesa operator (web portal) credentials for that shortcode
Your ID document for the Safaricom Go Live check
An admin login for your Sync company

1. Create a Safaricom Daraja developer account

Go to the Safaricom Developer Portal (developer.safaricom.co.ke) and sign up with the email you use for business.

Verify the email, then sign in. This account is yours — Sync never sees your Daraja password.

2. Create an app and enable C2B

In the portal, open My Apps and create a new app. Give it a name you will recognise, such as "Sync reconciliation".

Tick the Lipa Na M-Pesa / C2B products. The app then shows a Consumer Key and Consumer Secret — these are the two credentials Sync needs.

Start on Sandbox if you want a test run first. Sandbox uses Safaricom's test shortcode, not your real one.

3. Go live with your real shortcode

Still in the portal, use Go Live to move your app to production. Safaricom asks for proof that you own the Paybill or Till: a copy of your ID, the shortcode number, and the operator (web portal) username.

Approval is manual and usually takes a few working days. Nothing in Sync needs to change while you wait.

Once approved, the same app gives you production Consumer Key and Secret values. Those are the ones to use for real payments.

4. Add the shortcode in Sync

In Sync, open Settings → M-Pesa and choose Add connection.

Enter your shortcode, pick Paybill or Till, and choose Sandbox or Production to match the credentials you are pasting.

Paste the Consumer Key and Consumer Secret. Sync encrypts both before storing them, and never shows them again.

Choose the Bank account — the account on your balance sheet that represents the M-Pesa float — and the Clearing account, a holding account where payments wait until you match them.

Save, then click Test connection. A green result means Safaricom accepted your credentials.

5. Register your C2B URLs

Click Register C2B URLs. This tells Safaricom to notify Sync every time a customer pays your shortcode.

If Safaricom rejects the registration, the error appears on the connection card. The usual cause is that the app is still in sandbox, or Go Live has not been approved yet.

You only do this once per shortcode.

6. Tell customers what reference to use

Ask customers to type the invoice number into the M-Pesa account/reference field when they pay.

Sync ignores case, spaces, dashes and prefixes, so "INV-1023", "inv 1023" and "1023" all match invoice INV-1023.

For a Till (Buy Goods), there is no reference field, so those payments always come through for review.

7. Reconcile in the M-Pesa Inbox

Every payment lands in Banking → M-Pesa Inbox. Money is posted into your bank account and held in the clearing account immediately, so your cash position is always right.

Payments matched to an invoice by reference show as Matched — a receipt is created and the invoice moves to partly paid or paid.

Anything else sits under Needs review. Use Match to invoice to apply it, split it across several invoices, leave it on the customer's account, or mark it as not business income.

Clear the Needs review tab daily and your clearing account should return to zero.

Common questions

Credentials ready?

Add your shortcode in Sync and register your C2B URLs.

Open Sync