Payment Layer to Mifos X
Contents
Introduction
Mifos X is a system that supports as organization/ entity as it moves beyond basic collections of payments. It enables a fluid mix of collections and payments benefits that gives the entity freedom to manage different revenue and cost streams.
It has a number of unique capabilities that it can offer in the management of the OpenIMIS project and other entities that work with it.
From the initial architecture that has been shared by the openIMIS developer committee, the Mifos X system offers the following capabilities;
Premium Collection & Accounting Capabilities
Notification management capabilities
Claims Payment Management Capabilities
Cash disbursement capabilities
Pool funds Management capabilities.
The most important measure of success for an Insurance company/payer is successful collection of premiums and payments to suppliers for services rendered. The flexible architecture of Mifos X allows various ways of measuring this progress.
Mifos Architecture in the openIMIS deployment
Process Flows - Account Management / Crediting Accounts with Money
Process flows - Payments to Providers
Development
Mifos has no inbuilt payment capability. All current solutions involve building an interface or system that sits between it and banks/merchants/mobile network operators.
The de-facto payment gateway for Mifos is Mojaloop, (Mifos and Mojaloop – an End to End Open Source Architecture for Digital Financial Services – Mifos Initiative.)
Others are built by individuals and are only supported by the developer themselves and are
https://github.com/vladimirfomene/mifos-payment-gateway/tree/development
https://groups.google.com/g/mifosdeveloper/c/jwoXi5I3hb8?pli=1
Given the high level of support and development, it is both efficient effective to implement Mifos Architecture when compared to Mifos Architecture 2 (Fig 1 as opposed to Fig 2 above).
Account Rules
Rules and policies that can be customized based on the products
1. Account Management
Newly created account will remain in-active until its approved
All Approved accounts are considered active Accounts
Active accounts can be attached to multiple products (Products are Savings, Fixed deposit, loan, current)
Active accounts can be debited or Credited (However rules can be customised based on the account type)
Single account can be attached to Multiple dependents
Disabled accounts cannot transact. Need to be enabled 1st
2. Collections & Payments
All accounts within the same office can be treated as a pool account
All accounts within a group can also be treated as a pool account
You cannot debit or credit a pool account. Only individual accounts can be debited or credited
Account number must be provided for all transactions
Overdraws are allowed based on some set of rules which are pre-defined
3. Account Query
for account status
For account details
For account balance
statement of account
last transaction/activity
last activity
Example
Use Case
The following scenario and subsequent entries shows the accounting treatment for an insurance company:
In January 2020, the Kinoti family takes a medical insurance cover for a total KShs 1 million, shared by the five family members.
Maternity is capped at KShs 100,000, while optical capped at KShs 5,000 per instance but no dental.
The cover costs the family KShs 30,000
On 15 March 2020, their first born is admitted to hospital and discharged 5 days later, for an approved cost of KShs 79,650.
On July 4, they are blessed with a new baby, they are discharged on July 10 at a cost of KShs 125,753.
On October 23, Mr. Kinoti gets prescription glasses at a total cost of KShs 7,500. He paid the excess immediately
In November, the second born gets dental work and braces at a cost of KShs 12,380.
They cancel the cover on 1 December 2020.
Insurance Accounting Entries
The following shows the accounting treatments for an insurance company:
On inception of the cover
|
| Account | Location | Amount | Amount |
Dr |
| Insurance premium receivables | BS | 30,000 |
|
| Cr | Insurance premium income | P&L |
| 30,000 |
On payment of the insurance premium
|
| Account | Location | Amount | Amount |
Dr |
| Bank | BS | 30,000 |
|
| Cr | Insurance premium receivables |
|
| 30,000 |
On receipt of the first born's claim
|
| Account | Location | Amount | Amount |
Dr |
| Kinoti Family Shared Account | BS | 79,650 |
|
| Cr | Gertrude Children's Hospital | BS |
| 79,650 |
On approval of the first born's claim
|
| Account | Location | Amount | Amount |
Dr |
| Medical claim | P&L | 79,650 |
|
| Dr | Kinoti Family Shared Account | BS |
| 79,650 |
On payment of the first born's claim
|
| Account | Location | Amount | Amount |
Dr |
| Gertrude Children's Hospital | BS | 79,650 |
|
| Cr | Bank | BS |
| 79,650 |
On receipt of the fourth born's birth claim
|
| Account | Location | Amount | Amount |
Dr |
| Kinoti Family Shared Account | BS | 123,753 |
|
| Cr | The Nairobi Hospital | BS |
| 123,753 |
On approval of the fourth born's claim
|
| Account | Location | Amount | Amount |
Dr |
| Medical claim | P&L | 100,000 |
|
| Cr | Kinoti Family Shared Account | BS |
| 100,000 |
On receipt of the excess claim on fourth born
|
| Account | Location | Amount | Amount |
Dr |
| Bank | BS | 23,753 |
|
| Cr | Kinoti Family Shared Account | BS |
| 23,753 |
On payment of the fourth born's claim
|
| Account | Location | Amount | Amount |
Dr |
| Gertrude Children's Hospital | BS | 123,753 |
|
| Cr | Bank | BS |
| 123,753 |
On receipt of Mr. Kinoti's claim
|
| Account | Location | Amount | Amount |
Dr |
| Kinoti Family Shared Account | BS | 5,000 |
|
| Cr | Kikuyu Eye Hospital | BS |
| 5,000 |
On approval of Mr Kinoti's claim
|
| Account | Location | Amount | Amount |
Dr |
| Medical claim | P&L | 5,000 |
|
| Cr | Kinoti Family Shared Account | BS |
| 5,000 |
On approval of Mr Kinoti's claim (No entries for the dental work done on the second born)
|
| Account | Location | Amount | Amount |
Dr |
| Kikuyu Eye Hospital | BS | 5,000 |
|
| Cr | Bank | BS |
| 5,000 |
Depending of the terms and conditions of the insurance cover, if the cover is time dependent, a refund for a month is due
|
| Account | Location | Amount | Amount |
Dr |
| Insurance premium income | P&L | 2,500 |
|
| Cr | Insurance premium refundable | BS |
| 2,500 |
On payment of refund
|
| Account | Location | Amount | Amount |
Dr |
| Insurance premium refundable | BS | 2,500 |
|
| Cr | Bank | BS |
| 2,500 |
If the cover is not shared but everyone has their own limits or cover, then an individual’s accounts are created. But the entries are largely the same.
Screenshots for the Mifos X Product Demo
Figure 7: Account entries
Challenges with Mifos
Mifos X is a system that was created with a deposit taking financial institutions in mind. As such, one of the challenges encountered is creating the grouping for the different consumers of medical covers. There are some limitations with the current implementation, as any client/group is set up to either be making deposits for either a savings or loan product. We shall only map the Scheme accounts and Payer accounts.
A second challenge is how the products exist in Mifos X. Normal insurance products usually expire annually without any carry over (other than refunds that or excesses that should be made good, but in either case, these can be handled off the within the actual accounting system). The medical insurance cover will be managed by OpenIMIS.
Mifos X is also not able to maintain information on the extent that beneficiaries have used their cover. This could cut across benefits limits for the various treatments offered ([Outpatient which can be split into general, dental, optical] and inpatient which can include maternity, surgeries]). OpenIMIS to manage this information and also the controls.
Integration with Mojaloop
https://github.com/openMF/payment-hub
Mifos vs MojaLoop – OpenIMIS Platform.
https://docs.mifos.org/user-manual/for-administrators-mifos-x-platform/initial-system-set-up
https://docs.mifos.org/user-manual/for-administrators-mifos-x-platform/accounting/accounts-linked-to-financial-activities
https://docs.mifos.org/user-manual/for-operational-users-mifos-x-web-app/accounts-and-transactions
Mifos API Links
# | Category | Api Name | Description | Link |
1 | Account Management | Create Client | Creates an individual Account | |
Activate Client | Activates and account | |||
Close Client | De-activate an account | |||
Reactivate Client | Re-activates a disabled account | https://demo.mifos.io/api-docs/apiLive.htm#clients_reactivate | ||
Client retrieve | Query account details | |||
2 | Account Transaction | Create a Savings | Create a account type (savings) | https://demo.mifos.io/api-docs/apiLive.htm#savingsaccounts_create |
Create a Fixed deposit | Create a account type (Fixed Deposit) | |||
Retrieve savings | Query for account type | https://demo.mifos.io/api-docs/apiLive.htm#savingsaccounts_retrieve | ||
Withdrawal | Withdraw money from account | https://demo.mifos.io/api-docs/apiLive.htm#savingsaccounts_withdrawal | ||
Deposit | deposit money into an account | https://demo.mifos.io/api-docs/apiLive.htm#savingsaccounts_deposit |
Ressources
Dockerised version
GitHub - mobidevke/mifos-docker: Mifos X docker stack
Deployed version
https://openimis.atlassian.net/wiki/spaces/OP/pages/3221422105
The End Points
Client Management API
https://mifos.s1.openimis.org/fineract-provider/api/v1/clients
Funds Deposit & Withdrawal
https://mifos.s1.openimis.org/fineract-provider/api/v1/savingsaccounts
General Ledger Management
https://mifos.s1.openimis.org/fineract-provider/api/v1/glaccounts
OpenIMIS FHIR4 Mapping
FHIR R4 - Patient | |
FHIR | Mifos |
Patient Details | Client Details |
Identifier | externalId |
active | active |
name | firstname |
telecom | Mobile number |
gender | Gender |
birthDate | Date of Birth |
deceased |
|
address | Address Line |
maritalStatus | Client Classification |
photo | Picture |
language | Language |
generalPractitioner |
|
managingOrganization | Office Details |
link | Group ID |
other |
|
type | Group Name |
contact | Family Details |
relationship | Relationship |
name | First name |
telecom | Mobile Number |
gender | Gender |
organization | Profession |
period | Date of Birth |
| is Dependent |
| Marital Status |
| Number of members |
| Number of dependents |
| No of Children |
|
|
Account Details | Account Details |
| savingsProductId |
| activationDate |
FHIR R4 - Organization | |
FHIR | Mifos |
Organization | Group Details |
identifier | externalId |
active | active |
type |
|
name | Name |
alias |
|
telecom | Group Activation Data |
address | Address Details |
part of |
|
contact | staff |
purpose |
|
name | Staff Name |
alias |
|
telecom | Mobile number |
address | Address Line |
| Group Members |
| clientMembers |
| activationDate |
| submittedOnDate |
FHIR R4 - Claim-Payment | |
FHIR | Mifos |
identifier | paymentTypeId |
status | transactionStatus |
request | ClientAccount |
response |
|
created | transactionDate |
provider | GroupID |
payment |
|
paymentDate | transactionDate |
payee | accountNumber |
recipient | Office ID |
amount | transactionAmount |
paymentStatus | paymentStatus |
FHIR R4-Contribution | |
FHIR | Mifos |
identifier | paymentTypeId |
status | transactionStatus |
request |
|
response |
|
created | transactionDate |
provider | savingsProductId |
payment | transactionAmount |
paymentDate | transactionDate |
payee | accountNumber |
recipient | accountNumber |
amount | transactionAmount |
paymentStatus |
|
Did you encounter a problem or do you have a suggestion?
Please contact our Service Desk
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/