<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Denis 254</title>
    <description>The latest articles on DEV Community by Denis 254 (@denis_254_965ff29c643d5f4).</description>
    <link>https://dev.to/denis_254_965ff29c643d5f4</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3920768%2F2126b1e1-2f39-40b8-96da-2192e0ea7bad.png</url>
      <title>DEV Community: Denis 254</title>
      <link>https://dev.to/denis_254_965ff29c643d5f4</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/denis_254_965ff29c643d5f4"/>
    <language>en</language>
    <item>
      <title>Title: Mastering Safaricom B2C: How to Configure G2 Portal Operators for Automated Payouts Tags: #mpesa, #php, #fintech, #api</title>
      <dc:creator>Denis 254</dc:creator>
      <pubDate>Fri, 08 May 2026 21:35:33 +0000</pubDate>
      <link>https://dev.to/denis_254_965ff29c643d5f4/title-mastering-safaricom-b2c-how-to-configure-g2-portal-operators-for-automated-payouts-tags-9i9</link>
      <guid>https://dev.to/denis_254_965ff29c643d5f4/title-mastering-safaricom-b2c-how-to-configure-g2-portal-operators-for-automated-payouts-tags-9i9</guid>
      <description>&lt;p&gt;How to Set Up a B2C Operator in the Safaricom M-PESA G2 Portal&lt;/p&gt;

&lt;p&gt;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. &lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Access the G2 Portal&lt;br&gt;
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.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create the Operator (The "Initiator")&lt;br&gt;
Go to User Management and select Create Operator.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Username: Choose something distinct (like Devmaster2). This username is what you will put in your code as the InitiatorName.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Secret Sauce (Role): This is where most people fail. You must assign the role of Business Manager or Business Contributor. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Why? Business Manager is best because it allows the API to both "Initiate" and "View" transaction status.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set and Encrypt the Password&lt;br&gt;
Once the operator is created, log in as that new user to set a permanent password. &lt;br&gt;
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.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Shortcut&lt;br&gt;
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.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;Check it out here: &lt;a href="https://optimapaybridge.co.ke/" rel="noopener noreferrer"&gt;https://optimapaybridge.co.ke/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>apigateway</category>
      <category>kenya</category>
    </item>
  </channel>
</rss>
