Home

Getting Started


To start testing your integration to M-Pesa, you need the following:

Shortcode

This is a unique organization 6 digit number that serves as your M-Pesa account. 

Network connectivity

When you are integrating to consume B2B or B2C API services, you must have either VPN or P2P network connection between your endpoint and Safaricom. This would require you to download and fill VPN connectivity request form. However, for C2B (Online Checkout or Confirmation and Validation) VPN/P2P connection is not mandatory as you can consume the services over the internet.

Service Provider Information 

These include:

  • SP ID
  • Service ID
  • SP Password (must be encrypted)
  • Timestamp (in the format; yyyyMMddhhmmss)

Not required for C2B Online Checkout integration instead a passkey will be shared to you upon filling and sharing the LNM application form

Initiator Credential

This credential is needed for B2C or B2B API services only. 

  • Initiator username
  • Initiator password (must be encrypted)

Certificates

You will need the following certificates:

  • API encryption certificate; for encrypting initiator password (B2C and B2B services)
  • Broker certificates; both for test and production environment. 
  • Broker chain certificate

Testing


Integration testing starts with HTTP protocol. Thereafter, testing is done over HTTPs protocol. In this regard you’ll have to generate and share CSR for signing. 

Refer to developer guide specific to the service you are consuming for common error codes and their description.

Go Live


After successful testing, fill and share stamped UAT form for you to be taken to production. Upon approval, production credentials will be created and shared to you.

Substitute the testbed credentials with their production counterpart in your web service client and you’ll be live.

 

N/B

After you have identified the API service you need and filled in necessary forms (refer to Download -> Documents) Section,  send an email to M-PESABusiness@Safaricom.co.ke with the forms attached requesting for SR/CRQ number.