Integration with KopoKopo M-PESA integration interface
Description
Environment
Attachments
Activity

Lukasz Chudy June 15, 2012 at 8:45 AM
Verified on 15.06.2012
Mifos Kopo Kopo integration URL works properly in REST api client and also by using "curl" program.
Build Date: Tue Jun 12 02:13:03 PDT 2012
Build Number: hudson-head-i-release-archive-3

Michał Dudziński May 24, 2012 at 1:20 PM
Mifos integration URL is "/basic/k2/processTransaction.json" and it use basic http authentication, so You must provide login credentials.
Example of full URL:
http://mifos:testmifos@localhost:8080/mifos/basic/k2/processTransaction.json
(standard credentials works for both basic and form authentication)
For now, only important parameters are: k2_transaction_id, ac_no, currency, amount, mm_system_id, transaction_date.
Based on guides provided by KopoKopo (HTTP POST Notification ticket attachment) I've decided to match operations by "ac_no" parameter. Ac_no is matched as global account number, so if ac_no contains global account number of loan account then mifos process loan payment transaction, if savings account then savings deposit transaction.
Other parameters:
mm_system_id (mobile money system id) stands for payment type name, for example "M-PESA"
transaction_date pattern is DD/M/YY.
k2_transaction_id is used as receiptId for mifos transaction processing
amount is just the transaction amount
currency should be valid account currency 3 letter Alphabetical code (example 'INR' or 'USD')
Mifos KopoKopo integration URL can be easily tested with "curl" program (example in ticket attachments from KopoKopo) or with browser with any REST plugin installed.

Michał Dudziński May 11, 2012 at 1:28 PMEdited
I've configured basic authentication to use with K2 HTTP(S) POST Notification API. But I think it would be good idea to choose generic pattern for stateless restful URLs using basic http authentication. For example /restful/*/.json or /service/*/.json. Current URL looks like /account/k2/processTransaction.json. Any suggestions?

Jakub Sławiński February 27, 2012 at 1:41 PM
Since there is no functional specification available, we will not work on this ticket within Release H.

Ed Cable January 6, 2012 at 4:37 PM
Comments from Jakub on mailing list:
I think that KopoKopo integration is a great idea. I have assigned this
ticket to Release H.
As far as I understand we should only provide a simple REST method,
right? The POST request from the KopoKopo will contain the following fields:
k2_account_id
k2_transaction_id
mm_system_id
mp_transaction_id
biller_number
transaction_date
transaction_time
transaction_type
ac_no
sender
first_name
last_name
middle_name
amount
currency
Rebecca, Ed, do you have any vision/specification how to map these
requests to the Mifos operations? What types of operation do you like to
have available for the KopoKopo? How to match these operations with
active accounts in Mifos? Using sender's mobile phone number (field:
sender), or maybe the account number directly (field: ac_no). If you
provide such functional specification, then the implementation shouldn't
be a big problem.
Kopo Kopo offers a secure, web-based service that enables organizations to process M-Pesa Pay Bill payments in real-time as well as engage and track customers via a suite of value-added services.
KopoKopo is led by the previous founder of FrontlineSMSCredit. Integrating with KopoKopo would present MFIs another alternative to m-Pesa integration outside of our current manual upload integration.
I wanted us to explore how difficult integration with their APIs would be in case this might be another value-added feature that could benefit Mifos in the Kenyan market.
KopoKopo is aggressively growing and will soon be adding support for the other 3 leading mobile money platforms in Kenya with plans to extend to the leading mobile money platforms in Tanzania, Uganda, and Rwanda. Since KopoKopo is aiming to be a multi-platform integration interface - this could help us move faster towards supporting more mobile money payment systems than our current approach.
Attached are the API documentation for XML over HTTP and HTTP POST.