Back to Blog
Guides 5 min read

How to Get Your M-Pesa Daraja API Credentials

DS

Deluxe Sande

March 24, 2026

To accept M-Pesa payments through Salesense, you need two credentials from Safaricom's developer portal: a **Consumer Key** and a **Consumer Secret**. This guide walks you through generating them on the Daraja portal.

Step 1: Sign up on Daraja

Go to developer.safaricom.co.ke and sign in with your business account. If you do not have an account yet, register — the process takes a few minutes and requires a valid business email.

Step 2: Create a new app

Click **'My Apps'** in the top navigation, then **'Create New App'**. Give it a recognisable name such as 'Salesense Integration'.

Name your app something descriptive — you may create multiple apps, so clarity helps later.

Check the box for **Lipa na M-Pesa Sandbox** if you are still testing, or select the relevant production products for a live setup.

Note:You must select at least one product before saving. If no product is checked, the portal will not allow the app to be created.

Step 3: Copy your credentials

Open the app from your list and select the **Keys** tab. You will see:

  • Consumer Key — a long alphanumeric string that identifies your app.
  • Consumer Secret — a second string used alongside the key to authenticate requests.

Copy both values and paste them into Salesense under **Settings → Integrations → M-Pesa**. Once saved, Salesense will begin reconciling incoming M-Pesa payments automatically.

Ready to grow your business?

Join thousands of Kenyan businesses using SaleSense to streamline operations, track M-Pesa payments, and stay KRA compliant.