Skip to content
Drizzentic edited this page Mar 16, 2016 · 3 revisions

Welcome to the Mpesa-API-Library wiki!

This library has been created solely for php users but the same logic can be replicated in other languages.

Pre-requisites

Before you can use the online checkout functionality please make sure you have the following.

  • Mpesa paybill account.(paybill number)
  • Passkey from safaricom.
  • PHP.
  • Curl.

Configuring.

Under the config folder edit the config.php. Replace the values with the ones supplied by safaricom

  • define("MERCHANT_ID",''); //Put the unique merchant ID provided by the client.
  • define("PASSKEY", ''); //Put the passkey provided for SAG access

Testing.

To test the library replace the variables in the example.php with the correct variables.

$mpesaclient->processCheckOutRequest($Password,MERCHANT_ID,TRANSACTIONID,REFERENCEID, AMOUNT,MSISDN,CALLBACK_URL);

Clone this wiki locally