mNo edit summary |
mNo edit summary |
||
Line 54: | Line 54: | ||
=== Transaction Status Inquiry - GET === | === Transaction Status Inquiry - GET === | ||
This operation is used to get the status of the payment that has been made as in the above request-to-pay execution. The X-Reference-Id that was passed in the post is used as reference to the request as shown below. | |||
Note: It is convenient to generate a new JWT token as in the authentication before executing any of the services in a production setting to avoid cases of failed execution due to token getting expired. | |||
[[File:Documentation Rest API 1733091988156.png|thumb|300x300px]] | |||
=== Account Balance Inquiry - GET === | === Account Balance Inquiry - GET === |
Revision as of 22:31, 1 December 2024
MDriven Turnkey can easily expose services via REST: Exposing Ourselves as a REST Service
You can also consume REST services from other systems: Rest Services In MDriven
The case below is about integrations with MOMO (Mobile Money) open APIs, show case show MDriven consuming RESTful APIs from an external system.
Here we see a UI of all the major services from the collections end points for MOMO API endpoints.
- Authentication
- Request-To-Pay
- Transaction Status Inquiry
- Account Balance Inquiry
- User Information Query (KYC - Know-Your-Customer) Details
Authentication - POST
There are two credentials used in the open API
- Subscription Key
- API User and API Key for Oauth 2.0
The subscription key is used to give access to APIs in the API Manager portal. A user is assigned a subscription Key as and when the user subscribes to products in the API Manager Portal.
The API User and API Key are used to grant access to the wallet system in a specific country. API user and Key are wholly managed by the user through Partner Portal.
Users are allowed to generate/revoke API Keys through the Partner Portal.
However, on Sandbox Environment a Provisioning API is exposed to enable users to generate their own API User and API Key for testing purposes only.
The HEADERMINUS_Ocp_Apim_Subscription_Key: Ensures when the header parameter in this case is Ocp-Apim-Subscription-Key is formatted correctly using the HEADERMINUS prefix and introducing underscores(_) where there should have been (-).
Request-To-Pay - POST
Request to Pay service is used for requesting a payment from a customer (Payer). This can be used by e.g. an online web shop to request a payment from a customer. The customer is requested to approve the transaction on the customer client.
Below is the expected postman and MDriven implementation.
Transaction Status Inquiry - GET
This operation is used to get the status of the payment that has been made as in the above request-to-pay execution. The X-Reference-Id that was passed in the post is used as reference to the request as shown below.
Note: It is convenient to generate a new JWT token as in the authentication before executing any of the services in a production setting to avoid cases of failed execution due to token getting expired.