Fetching latest headlines…
Title: Mastering Safaricom B2C: How to Configure G2 Portal Operators for Automated Payouts Tags: #mpesa, #php, #fintech, #api
NORTH AMERICA
🇺🇸 United StatesMay 8, 2026

Title: Mastering Safaricom B2C: How to Configure G2 Portal Operators for Automated Payouts Tags: #mpesa, #php, #fintech, #api

4 views0 likes0 comments
Originally published byDev.to

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.

  1. 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.

  2. Create the Operator (The "Initiator")
    Go to User Management and select Create Operator.

  3. Username: Choose something distinct (like Devmaster2). This username is what you will put in your code as the InitiatorName.

  4. The Secret Sauce (Role): This is where most people fail. You must assign the role of Business Manager or Business Contributor.

  5. Why? Business Manager is best because it allows the API to both "Initiate" and "View" transaction status.

  6. Set and Encrypt the Password
    Once the operator is created, log in as that new user to set a permanent password.
    Note: You don't put this plain password in your code. You must encrypt it using Safaricom’s Public Key Certificate to create your Security Credential.

  7. The Shortcut
    Setting up these handshakes manually is time-consuming and prone to hardcoded errors. If you want to skip the manual encryption and complex Daraja authentication logic, you can use a unified gateway.

OptimaPay Bridge handles the token generation and security credentials automatically, allowing you to focus on your business while we handle the "pipes."

Check it out here: https://optimapaybridge.co.ke/

Comments (0)

Sign in to join the discussion

Be the first to comment!