Skip to content

Instantly share code, notes, and snippets.

@SubhamPramanik
Last active October 24, 2020 12:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SubhamPramanik/905ea87b83dd0b6af62af18ca0c0c1ea to your computer and use it in GitHub Desktop.
Save SubhamPramanik/905ea87b83dd0b6af62af18ca0c0c1ea to your computer and use it in GitHub Desktop.
google-summer-of-code

GSMA Mobile Money API Connector for Mifos Payment Hub

Project Abstract | Goals Achieved | Project Contributions | Conclusion | Links


Project Abstract

As part of our DIAL-funded project to integrate Mifos with the open source Mojaloop payments platform the team from DPC consulting built out a middleware component called the payment hub to enable the integration with the Mojaloop APIs. This middleware will also serve as the point of integration for all other external payment systems - the payment hub is extendable by additional payment connectors. This project would focus on adding the connector for the GSMA Mobile Money API. In 2016 GSMA published a first set of harmonized mobile money APIs to "ensure best practice in API design, security design, and more and to "address the complexity and fragmentation that is apparent in the fast-growing industry.

The GSMA Mobile Money APIs are OTT (Over the Top) APIs that have been designed to cater for a core set of mobile money use cases:

  • Interoperability between mobile money and banks, or among mobile money providers
  • Merchant payments, online and offline, including delegated authentication of transactions
  • Bill payments and instant notification of payment
  • Basic account management
  • International transfers, including request for quotation

Mentors: Avik Ganguly, Manoj VM

Goals Achieved

1) Account Management

Account management provides of various functionalities such as:

  • Account Status
  • Account Balance
  • Account Holder Name

Pull Request

2) Peer to Peer Transaction

Peer to Peer Transaction, or payer initiated transaction starts of with party ID lookup on the AMS, moving to payee account status on MobileMoney operator. Once confirmed the funds are blocked on the payer side and the flow proceeds to send transfer request. If the transfer is processed, the amount gets booked on the payer side else the blocked amount is released and the channel is notified for the same.

Peer to Peer Transfer

Pull Request

3) Merchant Pay

In case of merchant pay, payee initiated transfer, the transaction takes place with authorization key. The payee provides with an authorization code which is obtained from the payer. The authorization code is sent along with the transfer request. Upon successful transfer the amount gets debited from the payer's account.

Pull Request

4) Transaction Management

Transaction management consists of getting transaction state of a particular transfer, the state can be failed, pending or success. We can also get the transaction response object in case the object is not returned in callback due to some failure.

Pull Request

5) Link Based Payment, Authorization Codes and Transaction Reversal

  • Link based payment: This will be used majorly for transferring money from bank account to mobile money wallet. The request from channel consists of party details. During the payment flow a link is created between the parties and that link is used for the transaction.
  • Authorization Codes: They are primarily used as a payer transfer authorization in case of payee initiated transfers. The authorization codes are passed in the transfer object during the transaction.
  • Transaction Reversal: This provides a facility to reverse or refund a transaction. The transaction type is passed as reversal.

Link Based Transfer

Pull Request

6) Bill Management and Payment

Bill management provides the facility to get associated bills and bill companies for a particular account. The bill ID is passed into the transfer object for the payment to take place. The flow starts with payer validation, then it moves to bill validation. If it checks out, the amount is blocked on the payer side and transfer call is made. If the transaction is successful the amount gets booked else the amount is released and the channel is notified.

Bill Payment

Pull Request

7) International Remittance

The payer channel initiates the international transfer, the accounts are validated and payer transaction quote is requested. Upon successful acceptance of payer quote, the payee process is started where payee quote is obtained. The amount is booked on the payer account. Upon successful transaction, the amount is booked on the sended side and on the receiver side the amount is credited. If the transaction fails the amount is released on the payer side and channel is notified accordingly.

Payer Transfer Process

Payee Process

Pull Request

Project Contributions

During my GSoC coding period, I worked on various aspects of Payment Hub EE, here is the list of PRs made:

  • #02 Fetch Access Token Route
  • #03 Saving Access Token for reuse
  • #04 Zeebe Connection to Camunda Cloud
  • #05 Account Management Routes
  • #06 Peer to peer transaction
  • #07 Fineract integration with transactions
  • #08 Merchant Payment (Payee initiated transfer)
  • #09 Transaction Management (Transaction State and Responses)
  • #10 Authorization Code, Link Based Transfer and Transaction Reversal
  • #11 Bills Management and Payment
  • #12 Debit Mandate creation
  • #13 International Remittance
  • #14 Zeebe migration to lab env
  • #03 Channel: GSMA Data transformation and channel APIs
  • #02 Common: GSMA standard DTOs
  • #03 AMS: Removed local quote dependency
  • #02 Template: GSMA Connector Helm template

Conclusion

It was an amazing experience working for Google Summer of Code with Mifos Initiative. I would like to thank Ed Cable and my mentors Avik Ganguly and Manoj VM for this opportunity. The people in the organization are friendly and supportive. Weekly check-In meetings are the best as they help us discuss our blockers and get them resolved. I am looking forward to contribute to this organization in the near future and would be happy to help any new developers who would like to contribute and be the part of Mifos Initiative.

Links


subhampramanik@gmail.com | GitHub | LinkedIn | Blog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment