Finally, MPesa API is Out

Safaricom has finally officially opened up the M-Pesa API. It has been a long time coming and it’ll be interesting to see the innovations that are likely to spring up.

Here’s a summary of the what you can do:

  • Automated Payment Receipt Processing: This is a Customer To Business feature/C2B where a payment transaction can be initiated by the customer or via the API. The customer simply opens up M-Pesa via the Sim ToolKit(STK) and proceeds to Lipa na M-PESA. Option 2 involves the customer receiving a USSD push asking them to authorize the transaction.
    • One of the interesting new features is the ability of the Business to vet the payment and only accept if the transaction meets their criteria or business rules, such as, is the money being paid to the right account? and so on. This reduces the overhead of having to refund erroneously sent transactions.
    • The Business entity will also receive confirmation that payment has been made/cancelled/failed and these can be forwarded in real time to a 3rd party.
  • Automated Payment Disbursements: This is essentially a Business To Customer B2C feature that was previously tedious and involved creating a file that had to be in a specific format, then uploading it onto a website and then having another user authorize the payment among other teething complexities.
    • What’s new is that, this has now been automated and such payments can now be pushed from the Business to the API (programmatically) and subsequently to the recipient.
  • Automated Payments Reversal: Finally, as the name suggests, say you pay for something that’s been discontinued and yes ofcourse, you need your money back. The API provides an option for automating such reversals and this can be tailored to suit the business’ internal processes.

For more check out.