How to Set Up a B2C Operator in the Safaricom M-PESA G2 Portal
If you are working with the Daraja B2C (Business to Customer) API, you've probably realized that having a working Paybill is only half the battle. To actually send money out (Disbursements), you need an "Initiator"—a specific digital identity authorized to move funds.
If you’re seeing errors like "Invalid Access Token" or "Initiator Information," here is the exact process to fix it in the M-PESA G2 Portal.
Access the G2 Portal
First, log into the M-PESA G2 Portal (org.ke.m-pesa.com). You must use your Organization Admin credentials. This is usually the primary account Safaricom sent you when your Paybill or Till was first created.
Create the Operator (The "Initiator")
Go to User Management and select Create Operator.
Username: Choose something distinct (like Devmaster2). This username is what you will put in your code as the InitiatorName.
The Secret Sauce (Role): This is where most people fail.…