Facilitating businesses to integrate with M-Pesa seamlessly for online payments

briskpesa infographic

Quick Demo

This demo shows how customers can pay for goods online without opening sim toolkit on their handsets and entering paybill numbers.

Enter your phone number and amount then click pay.

To complete the transaction, you will enter your Service PIN on your handset. If you don't have a PIN, press 0 and follow the instructions.

Would you like to have this feature on your website? Contact Us

To try out on Android, use this link Briskpesa Android demo App

Our Services

We offer your customers a seamless user experience when making online payments through Mobile Money. There is no need for entering paybill numbers. Customers simply click pay, enter their pin on a USSD push on their handset and pay instantly.

E-commerce Checkout

E-Commerce Customers can now checkout and pay through our integrated solution directly to their Mobile Money Wallet.

Donations

Donations can now be made seamlessly online by benefactors directly to their phones.

Bill Payments

Utility and Service bills such as internet can now be paid through this integrated tool.

Till Payment

You can now pay for your till payments in a resturant,fuel station or a supermarket.

E-ticketing

Event organisers can now receive payments for tickets instantly with this integrated solution.

Simple Integration

Easy to set up for Online and Mobile Businesses to ensure seamless payments from Mobile Money.

Our Clients

We have integrated our solution for various online businesses that are now eanjoying fast,easy and secure payments from online customers.

Latest Integrations

Mobilesasa

A mobile services company.They offer bulk sms,alphanumeric and ussd services.
View Site

Extraqa Revision

Download Free revision pastpapers from Kenya's Top Schools.
View Site

Tech Garage(E-Warranty)

Tech Garage is a premier repair company based in Kenya. We have set ourselves apart when it comes to value addition within the hand held device industry.
View Site

Tutorials

BriskPesa can be integrated on both web and mobile applications.This integration will enable your online users to make online payments through mobile money seamlessly.
Web Integration

BriskPesaGateway.php - A php library for briskpesa gateway. Use this to create checkout and poll endpoints.
briskpesa.js - A javascript library. Use this on your html to create payment form.
checkout.php - A php file for requesting payment. Modify as needed
poll.php - A php file for checking status of payment. Modify as needed
sample-page.php - A sample of how javascript library has been used.
README.txt - Please read instructions.
Download Files

  1. Ensure that you have jQuery
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  2. Create an empty div(where you wnat the payment form to appear).An example below:
    <div class="briskpesa"></div>
  3. Add the Briskpesa javascript library
    <script src="briskpesa.min.js"></script>
  4. Instantiate the Briskpesa Library as follows:
    <script>
        $(".briskpesa").briskPesa({
            checkoutUrl: "checkout.php",
            pollUrl: "poll.php",
            showPayButton: true,
            payButtonText: "Pay",
            success: function(data) {
               console.log(data);
            },
            error: function(data) {
               console.log(data);
            }
        });
    
        /*
         *checkoutUrl - checkout url. Default is checkout.php. Needs to be on your server
         *pollUrl - poll url. Default is poll.php. Needs to be on your server
         *showPayButton - Either true or false
         *payButtonText - Text to appear on pay button
         *success - function called when payment is successful
         *error - function called when payment fails
        */
    </script>
    
  1. Setup the file checkout.php to request for payment from a mobile number.
    <?php>
    //Sample checkout. Modify as needed. Leave the template as it is, however.
    require_once('BriskPesaGateway.php');
    
    $apikey = "YourBriskPesaGatewayKey";
    
    $phone  = $_POST["phone"];
    $amount  = $_POST["amount"];
    
    $gateway = new BriskPesaGateway($apikey);
    
    try 
    {
        $results = $gateway->checkout($phone, $amount);
        # DO: update db if necessary
        # Sample success response: {"status": true, "trans_id": 23, "desc": "Ok"}
        # Sample failure response: {"status": false, "desc": "Invalid API key"}
        # How to pass json: $obj = json_decode($results);
        # Then: $obj->trans_id etc
        
        echo $results;
    }
    
    catch ( BriskPesaGatewayException $e )
    {
      echo "Encountered an error while checking out: ".$e->getMessage();
    }
    
    ?>
    
  2. Setup the file poll.php to check the status of a payment from a mobile number.
    <?php>
    //Sample poll. Modify as needed. Leave the template as it is, however.
    require_once('BriskPesaGateway.php');
    
    $apikey = "YourBriskPesaGatewayKey";
    $trans_id  = $_POST["trans_id"];
    
    $gateway = new BriskPesaGateway($apikey);
    
    try 
    {
        $results = $gateway->poll($trans_id);
        # DO: update db if necessary
        # Sample failure response: {"status": -1, "desc": "Pending"}
        # Sample success response: {"status": 0, "mpesa_code": "KDU1MWUGPB"}
        # Sample failure response: {"status": 1, "desc": "Transaction expired"}
        # How to pass json: $obj = json_decode($results);
        # Then: $obj->status etc
        echo $results;
    }
    
    catch ( BriskPesaGatewayException $e )
    {
      echo "Encountered an error while checking out: ".$e->getMessage();
    }
    ?>
    

Contact Us