Cash-in from a Mini App

As a Maya Mini App partner, you can leverage Maya's Cash-in to offer your customers a seamless way to transfer funds directly into their Maya wallet.

This solution requires complete implementation of the Maya Mini App , for more details refer to the Maya Mini App guide.

API Sequence



This solution requires customer accessToken, which you will obtain during session initiation as part of the full implementation of the Maya Mini App. For more details, please refer to the Maya Mini App guide.


  1. The customer initiates a Cash-in to their Maya wallet through the API Consumer using a web view within the Maya App.
  2. The API Consumer prepares the valid token. Refer to the Maya Mini App for more details.
  3. The API Consumer calls the Initiate a Transfer endpoint of Maya Cash-in using the customer's accessToken in Maya.
  4. Maya Cash-in creates the transfer intent in Maya, uniquely identified by a transferId.
  5. Maya Cash-in responds to the API Consumer with the generated transferId in Maya.
  6. The API Consumer saves the transferId acquired from Maya.
  7. The API Consumer calls the Execute Transfer endpoint of Maya, providing the transferId associated with the transfer intent in Maya.
  8. Maya Cash-in processes the transfer intent in Maya.
  9. If successful or failed, Maya Cash-in responds with the result.
  10. If the API Consumer receives an ambiguous error or no response from Maya Cash-in:
    • API Consumer calls the Retrieve a Transfer endpoint of Maya providing the transferId in Maya.
    • Maya Cash-in returns the details of the transfer intent associated with the transferId in Maya.
  11. The API Consumer notifies the customer of the status.

Build your Integration

This solution uses Basic Authentication, which requires API keys to authenticate incoming requests. To obtain your API key, please refer to the Acquire Keys from Relationship Manager guide.

Create the required pages

Design and host your mini app or webview pages.


Based on your envisioned customer journey, design and create a button within your page for your customers to initiate the Cash-in transaction.

Initiate and execute a Cash-in transaction

Use customer accessToken from the Maya Mini App to initiate and execute a Cash-in to Maya wallet.


Acquire and secure customer accessToken by completing the session initiation in the Maya Mini App. Once your application has acquired the accessToken from Maya, you may proceed with the following steps.

Step 1: Initiate Transfer

Initiate the Cash-in by calling the Initiate a Transfer endpoint of Maya. Each transfer attempt creates a new intent and is assigned a unique transferId in Maya, even with the same request reference number. transferId will be used to ensure idempotency during execution. On the other hand, Maya still recommends generating a unique request reference number for each transfer, even though Maya does not validate it.

At present, there is no time restriction for executing a transfer intent after it has been created. However, if you choose not to proceed, you can discard the transferId and handle the customer management on your end.

NOTE: Change in this behavior may be imposed in the future.


At this stage, no funds are moved within Maya. This provides you ample time to validate transfer details, including recipient information, potential fees, and other relevant factors.


Step 2: Execute Transfer

After creating the intent to transfer in Maya, proceed by calling the Execute Transfer endpoint of Maya with the provided transferId. Triggering the Execute Transfer of Maya finalizes the request and authorizes the balance movement in Maya.

Execution of a particular transfer in Maya can only be done ONCE. Whether APPROVED or DECLINED, succeeding execution in Maya will return an error.


At this stage, funds are moved from your account in Maya to the customer’s Maya wallet.

Monitor the Cash-in transaction

Monitoring the Cash-in transaction in Maya.


As a Cash-in partner

Maya’s Cash-in endpoint processes requests synchronously, returning the final state in the response.

If a timeout or ambiguous error occurs, you can use the Retrieve a Transfer endpoint of Maya with the transferId to check the status.


As a Maya Wallet user

Customers will be notified via SMS from Maya or the Maya mobile app notification. They can view the Cash-in transaction in the Transaction List within the Maya App.


Endpoints

The following are the endpoints relevant for Cash-in using Maya Mini App Token.

NameHTTP MethodKey TypeEndpointDescription
Initiate TransferPOSTSECRET/transfersCreates a transfer intent in Maya. Generates a transferId
Execute TransferPUTSECRET/transfers/{transferId}/executeProcesses a transfer intent on Maya associated with the transferId
Retrieve a TransferGETSECRET/transfers/{transferId}Get the transfer intent in Maya associated with the transferId

Business Rules to Code

To supplement your knowledge of the integration, it is essential to know the Business Rules to Code for Cash-in . This ensures that technology requirements and other development considerations are met.




At this point, you have understood the following:

  • The necessary APIs and their endpoints
  • The sequence and purpose of each API
  • The prerequisites for building your integration


Frequently Asked

Is there an expiry on for transfer intent?

Answer: No expiry is implemented to the transfer intent in Maya. However, please note that a change in this behavior may be imposed in the future.

What to do when customer's accessToken expires?

Answer: Your platform must request to generate new accessToken from the Maya endpoints. See the Maya Mini App Technical Guide for more details.