For all API integrations, Safaricom recommends you have a Paybill or Till Number issued by Safaricom and you must settle (withdraw monies from the Till or Paybill number) to bank.


Assumption for this guide – You already have a Paybill or Till number from Safaricom.


STEP 1 – Access MPESA Portal and Create Two Operators

a) Request Admin Access to MPESA Portal –

b) Getting and Installing MPESA Certificate

Once you get the above admin login details to MPESA portal, you need to login to the MPESA portal and create two operators (API and Web). Before we can access the MPESA Portal, we need to install an MPESA Certificate. Please note that the certificate only works for Windows OS systems

  • Send a blank email to

You will receive an email from Safaricom with Subject M-PESA Certificate Password [Automatic Response], which has the username and password you need to apply for the MPESA Certificate

  • Click on the Settings icon, then select Compatibility View Settings

Next click on Settings Icon, Go to Internet Options, choose Advanced and scroll down to ensure your settings are shown as below

Next Click on Settings Icon, select Internet Options, then Select the Advanced tab, scroll down and ensure your settings are as shown below

  • Click on *Apply* and then OK.
  • Close and then open internet explorer to proceed smoothly without a hitch. Open the URL again and this time you will be prompted with the below dialog box, select on Yes
  • Fill in the details exactly as they appear on your ID card, and on the Paybill or Till number forms that you sent to Safaricom. Your certificate application shall be denied if you fill incorrect or invalid details e.g. a single name, invalid email or incorrect organization name.
  • After submitting, you’ll get a response saying your certificate is pending. You are supposed to return to the site – – after about 2 – 24 hours and check whether your certificate has been approved
  • Click on Client Authentication Certificate to proceed

If the Certificate is issue, you will see a screen like below, click on Install this Certificate to proceed

  • A Web Access confirmation warning will appear asking you to confirm the operation. Click on ‘yes’
  • Click on “install this CA certificate’
  • It will prompt you to open or save the file. Click on open.
  • Once open, select ‘install certificate’
  • A window will open as below. Click next.
  • Click on ‘place all certificates in the following store‟ then select ‘Trusted Root Certification Authorities
  • Click on ‘next’
  • Then finish the process
  • You will then get a prompt asking you if you are sure you want to install the certificate. Click in “yes”

The certificate is now imported. Next Final Step is to install it…
Go back to the certificate request website and click on install the certificate as below

You will be directed to the page below.

You will be able to login to the M-PESA Portal site via the below URL;


  • Visit the MPESA Portal url and login with the username and password you received from Safaricom after sending them the letter on Step 1 above. Note that Shortocode refers to either Paybill Number or Store number (use Store number if you have a Till Number