In order for MifosX to send webhook payloads, your server needs to be accessible from the Internet.
MifosX will send the response of the event as the request body (in the requested format - json/ x-www-url-formencoded).
For example :-
A successful POST to /clients endpoint will generate the response {"officeId":1,"clientId":1787,"resourceId":1787}
.
An action like pay charge (https://demo.openmf.org/mifosng-provider/api/v1/savingsaccounts/382/charges/241?command=paycharge) will generate the response {"officeId":187,"clientId":7,"savingsId":382,"resourceId":241}
.
See the fields in https://github.com/openMF/mifosx/blob/develop/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/data/CommandProcessingResult.java.
Along with that MifosX will send the following headers.
MifosX will send along a few HTTP headers to differentiate between event types.
Name | Description |
---|---|
X-Mifos-Entity | The entity type that was triggered. |
X-Mifos-Action | The action triggered on the entity type. |
X-Mifos-Platform-TenantId | The tenant which experienced the event. |
The bridge / third-party app is expected to authenticate with the MifosX server first and send the auth token along with each request to fetch additional information such as client's mobile number or account number.
https://demo.openmf.org/api-docs/apiLive.htm#configs_hooks_retrieve
https://demo.openmf.org/api-docs/apiLive.htm#configs_hooks_create
https://demo.openmf.org/api-docs/apiLive.htm#configs_hook_update
https://demo.openmf.org/api-docs/apiLive.htm#configs_hook_delete
https://demo.openmf.org/api-docs/apiLive.htm#hooks_template