• Latest
  • All
  • How To

The Updated M-PESA Daraja API Integration Guide

December 17, 2024
BURN Secures $5 Million to Bring Clean Cooking to Kenyan Homes

BURN Secures $5 Million to Bring Clean Cooking to Kenyan Homes

May 17, 2025
Safaricom Quickmart partnership

Safaricom 4G and 5G Routers Now Available at Quickmart Stores

May 17, 2025
SEACOM tech student programs

SEACOM Brings Learning to Life for Tech Students

May 17, 2025
Safaricom 5G for Business

How Safaricom 5G is Revolutionizing Enterprise Connectivity

May 17, 2025
DHgate Tablet Cases deals
KEMIS

KEMIS: Kenya’s New Education Data System Set to Replace NEMIS in 2025

May 17, 2025
White Genocide

Grok AI Goes Off the Rails with Bizarre Conspiracy Responses

May 17, 2025
Google One

Google One Hits 150 Million Users, Thanks to AI Premium Plan

May 17, 2025
4K video uploads X

Say Hello to 4K Video Uploads on X

May 17, 2025
openai-chatgpt

ChatGPT Will Soon Be Able to Record, Transcribe & Summarize Meetings

May 17, 2025
Telegram

Telegram Shuts Down $35 Billion Crypto Black Markets

May 17, 2025
Peak Points

AI Will Now Help YouTube Choose the Perfect Moment for Ads

May 17, 2025
Safaricom-IXAfrica-Centres-1

Safaricom Partners with iXAfrica to Build Region’s First AI-Ready Data Centre

May 17, 2025
Techweez | Tech News, Reviews, Deals, Tips and How To
  • News
  • Entertainment
  • Reviews
  • Features
  • Editorial
No Result
View All Result
Techweez | Tech News, Reviews, Deals, Tips and How To
  • News
  • Entertainment
  • Reviews
  • Features
  • Editorial
No Result
View All Result
Techweez | Tech News, Reviews, Deals, Tips and How To
No Result
View All Result

The Updated M-PESA Daraja API Integration Guide

Shadrack Matata by Shadrack Matata
December 17, 2024
in How To, News
Reading Time: 6 mins read
409
0

It is indisputable that M-Pesa is currently the most widely accepted and used mode of payment in Kenya. The service allows its users to store and transfer money through their mobile phones. Launched by Kenya’s largest mobile operator, Safaricom’s M-PESA has gained many subscribers since its inception in 2007. This Safaricom subsidiary is currently the 4th most valuable brand($245.6m) in Kenya according to a recent report by Brand Finance.

In Kenya alone, M-Pesa has over 30 million active users on monthly basis. Across the region, Safaricom’s mobile banking has at least 20 million other customers spread in markets across Tanzania, the Democratic Republic of Congo (DRC), Mozambique, Lesotho, Ghana, and Egypt. This exponential growth can be attributed to its new financial service innovations such as M-Shwari, KCB M-Pesa, Fuliza, and M-pesa global pay among others.

M-PESA products

Lipa Na Mpesa is arguably the most popular M-pesa product. It allows businesses and individuals to collect payments from their clients. With the volume of mobile money transactions surging to 175.8 million in June 2021, virtually every business needs to acquire an LNM Paybill/Till. Depending on the company’s need case, they can either acquire a Paybill or Till number. They almost function in a similar way only that the former allows users to enter the account number they are paying for.

To register a Paybill number, you need to visit a Safaricom shop with company registration documents like a certificate of incorporation, KRA PIN, and a Cancelled bank cheque confirming the company’s bank account details. However, it’s quite simple to acquire M-PESA Till number through the self-onboarding portal. It takes 24-48 working hours to process the request.

M-pesa paybill plate

M-pesa API (Daraja) Integration

With the rapid adoption of technology in Kenya, the payment needs go beyond acquiring an M-Pesa paybill or till number. Some business models require M-Pesa integration with their ERP systems, websites, or mobile apps. For instance, banks use M-Pesa paybills to enable their customers to deposit money from M-pesa to their bank accounts.

Popularly known as Daraja, M-PESA API offers many endpoints to facilitate seamless and secure payment integrations. They include C2B API, B2C API, and B2B API. Other endpoints include Transaction status and Balance API. Below is a step-by-step guide on how to integrate C2B M-Pesa shortcode with ERP, a website, or even a mobile app.

Step 1: Acquiring M-Pesa Till/Paybill Number

This is the first step. If you already have one, you can skip to the next step. To get a paybill or till number, assemble your KYC documents and visit the Safaricom shop or the self-onboarding portal.

Step 2: Get Head Office Number

Implementation of C2B requires a shortcode known as the head office number. For a paybill, the paybill number acts as the head office number. However, this does not apply to Till numbers.

A till can have two or three different shortcodes depending on how and where it settles funds. If a till settles funds to a bank account, it comes with two shortcodes namely: Till number and store number. In this case, the store number acts as the head office number.

In the unfortunate event that the Till settles funds to the Owner’s nominated M-pesa number, the till requires an upgrade to be eligible for integration. An upgrade simply means changing funds settlement from an M-Pesa number to a bank account. To upgrade, send a request to [email protected] or [email protected]. You must attach a canceled bank cheque or bank letter confirming bank account details. After a successful upgrade, the till gets a head office number, different from till and store numbers. This results in such a till having three different shortcodes.

NB: Getting the head office number for shortcodes(especially a till) acquired through a third party like banks and other middlemen is usually chaotic. It is advisable to apply the till/paybill number directly from Safaricom if you wish to use it for payment integrations.

Step 3: Creation in M-Pesa G2 portal

Once you have the head office number you are set to go. You are supposed to create a business administrator username that will later be used to go live in the Daraja portal. Fill administrator creation form available on-demand from the Safaricom M-Pesa business team. This form has to be duly filled, stamped, and signed by two directors. If you are a sole proprietor, you need to indicate the same. In that form, fill the head office number as the shortcode.

You need to attach documents like an admin national ID(both sides) and a letter from the company’s board. The Board’s resolution letter should clearly show that someone has been nominated to be their m-pesa business admin. Send a creation request to [email protected] or [email protected].

Tracking the admin creation request

You will immediately receive a tracking number for your request. In case of delay, you can contact M-Pesa Business support by email at [email protected] or call 2222 on your Safaricom line. Unfortunately, one has to be whitelisted first in order to be able to call the 2222 extension. They only whitelist M-Pesa nominated numbers.

Step 4: Creating Assistant roles

After getting G2 portal credentials, you need to log in here, change your password and create an assistant role user whose credentials will be used to go live in the Daraja portal.

M-pesa G2 portal login page

If you are not familiar with assistant roles, you can select default roles for a business manager. The account is always in pending active status until the assistant role user logs in. For a till you will need to create a child of the store number because the head office number does not receive callbacks.

Step 5: Create a Developer account on the Daraja portal

This is the second last step. Sign up on daraja portal . Click go live and select verification by shortcode. Enter the assistant user username, select desired API products, and go live. You will receive production URLs in your developer’s email address immediately.

After approval, a passkey is sent(to the developer’s email address) which is used to initiate payment requests automatically from the backend via STK PUSH.

Daraja portal screenshot

Step 6: Register callback URLs and code your logic

This is the final step. You can register callback URLs and code the logic for processing payment notifications in the language of your choice.

SendShare242Tweet151
Shadrack Matata

Shadrack Matata

Shadrack Matata is a Kenyan electrical engineer and senior software developer. He has vast knowledge in backend technologies, machine learning, artificial intelligence, Internet of Things, and cyber security.

Related Posts

BURN Secures $5 Million to Bring Clean Cooking to Kenyan Homes

BURN Secures $5 Million to Bring Clean Cooking to Kenyan Homes

May 17, 2025
Safaricom Quickmart partnership

Safaricom 4G and 5G Routers Now Available at Quickmart Stores

May 17, 2025
SEACOM tech student programs

SEACOM Brings Learning to Life for Tech Students

May 17, 2025
Safaricom 5G for Business

How Safaricom 5G is Revolutionizing Enterprise Connectivity

May 17, 2025
KEMIS

KEMIS: Kenya’s New Education Data System Set to Replace NEMIS in 2025

May 17, 2025
White Genocide

Grok AI Goes Off the Rails with Bizarre Conspiracy Responses

May 17, 2025

Latest

BURN Secures $5 Million to Bring Clean Cooking to Kenyan Homes

BURN Secures $5 Million to Bring Clean Cooking to Kenyan Homes

May 17, 2025
Safaricom Quickmart partnership

Safaricom 4G and 5G Routers Now Available at Quickmart Stores

May 17, 2025
SEACOM tech student programs

SEACOM Brings Learning to Life for Tech Students

May 17, 2025
Safaricom 5G for Business

How Safaricom 5G is Revolutionizing Enterprise Connectivity

May 17, 2025
KEMIS

KEMIS: Kenya’s New Education Data System Set to Replace NEMIS in 2025

May 17, 2025
White Genocide

Grok AI Goes Off the Rails with Bizarre Conspiracy Responses

May 17, 2025

Best devices

budget smartwatches 2025

Best Budget Smartwatches To Buy in Kenya 2025

February 13, 2025

Best Infinix Smartphones To Buy in Kenya 2024

February 13, 2025

Best Laptops for Battery Life in 2024

August 21, 2024

Best “Battery Warrior” Smartphones To Buy in 2024

August 22, 2024

BURN Secures $5 Million to Bring Clean Cooking to Kenyan Homes

May 17, 2025

Safaricom 4G and 5G Routers Now Available at Quickmart Stores

May 17, 2025

Techweez is a fast growing influential source of technology news, reviews and analysis by leading tech geeks in the industry.

Follow Us

Editorials

Samsung QLED TVs Now Officially Certified for Real Quantum Dot Technology

Trump’s Tariffs Will Be the End of Affordable Tech

5 Ways to Prep Your Tech for Resale

The Weaponization of PDFs: How Cybercriminals Are Exploiting a Trusted Format

Introducing A Brainbox Quiz: Techweez’s Monthly Trivia Night!

5 Most Reliable Virtual Dollar Card Providers in Nigeria

More News

Google One Hits 150 Million Users, Thanks to AI Premium Plan

Say Hello to 4K Video Uploads on X

ChatGPT Will Soon Be Able to Record, Transcribe & Summarize Meetings

Telegram Shuts Down $35 Billion Crypto Black Markets

AI Will Now Help YouTube Choose the Perfect Moment for Ads

Safaricom Partners with iXAfrica to Build Region’s First AI-Ready Data Centre

  • Terms Of Use
  • Techweez Brand
  • Privacy & Policy
  • Contact Us

© 2024 Techweez - Palahala Media Group may earn a commission when you buy through links on our sites.
A Palahala Media Group Brand. All rights reserved.
.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In

Add New Playlist

Techweez | Tech News, Reviews, Deals, Tips and How To
Crunchy Cookies 🍪 Ahead!

Hey there! Just a heads-up: we're big fans of cookies - both the digital and edible kind! 🍪 We use our cookies and some from third parties to ensure your browsing experience on our site is smooth sailing and secure.

 

But wait, there's more! We also use cookies to gather stats and insights on how you navigate our site. It's like getting a behind-the-scenes peek at your digital adventures!

 

Don't worry, you're in control. You can adjust your cookie settings anytime to suit your preferences. Feeling curious? Dive into our Privacy Policy for all the juicy details. Happy browsing! 🚀

Functional Always active
Listen, this legal stuff is about as exciting as watching paint dry. But it basically says we only use your stuff for what you asked us to do, and nobody else gets to peek!
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
It's those sneaky cookie crumbs websites leave behind to count visitors, like counting ants at a picnic! Totally harmless, just for fun facts. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
Hey there! Just letting you know we use some fancy gizmos to remember your preferences. This way, we can show you ads that are, well, not completely bananas.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
Make cookies
{title} {title} {title}
Techweez | Tech News, Reviews, Deals, Tips and How To
Crunchy Cookies 🍪 Ahead!
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
Listen, this legal stuff is about as exciting as watching paint dry. But it basically says we only use your stuff for what you asked us to do, and nobody else gets to peek!
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
It's those sneaky cookie crumbs websites leave behind to count visitors, like counting ants at a picnic! Totally harmless, just for fun facts. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
Hey there! Just letting you know we use some fancy gizmos to remember your preferences. This way, we can show you ads that are, well, not completely bananas.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
Make cookies
{title} {title} {title}
No Result
View All Result
  • News
  • Reviews
  • Features
  • Editorial
  • Automotive
  • Entertainment

© 2024 Techweez - Palahala Media Group may earn a commission when you buy through links on our sites.
A Palahala Media Group Brand. All rights reserved.
.