Fund a Maya Wallet
Helps your customer to transfer their funds from your application onto their Maya wallet.
By integrating with Maya’s Money Movement and Maya Connect, you can leverage a secure fund transfer from your application to the target Maya wallet.

Maya allows transfers from external wallets to an upgraded (KYC1) Maya account only, otherwise transaction will be rejected with error code M133 (see Know Before You Code for the list of error codes).
Maya recommends handling this error by prompting user to upgrade their Maya account via the Maya app. For more details, contact your Maya Relation Manager.
How to fund a Maya Wallet
This implementation will require you to get an authorization code from the user to acquire their access token which represents their wallet account.
Step 1: Get Authorization
Redirect user to this URI for authentication and authorization. Authorization code will be generated and returned after successful authorization.
Authorization is required when you do not have a valid customer access token.

- Consumer logs in to your application and requested to transfer their funds onto their Maya wallet.
- With the Connect secret keys provisioned for you, your system calls
/authorize
to redirect user to Maya Connect login page get authorization. - Maya Connect shows the login and authorization form to user.
- Consumer supplies the needed credentials and approve the authorization form.
- Maya connects calls your system using the onboarded redirect URL providing the authorization code and set cookies.
To view the Maya Connect API documents, contact your Maya Relations Manager.
Step 2: Get Access Token
Once authorized, exchange the authorization code to customer access token via this endpoint. POST /token
endpoint will generate and return the customer access token, refresh token and token expiry.

- With the Connect secret keys provisioned for you, your system calls
/token
to exchange the authorization code for customer access token. - Maya Connect returns customer access token, refresh token and their expiry details.
Data | Expiry in seconds |
---|---|
Customer Access Token | 3600 |
Refresh Token | 604800 |
ID Token | 600 |
To view the Maya Connect API documents, contact your Maya Relations Manager.
Conditional: Refresh Token
When customer access token expires, you can request new tokens using the refresh token. This endpoint will be enabled depends on your use case and consumer journey. For more information, contact your Maya Relations Manager.

- With the Connect secret keys provisioned for you, your system calls
/token
providing the refresh token. - Maya Connect generates and returns new customer access token, refresh token and their expiry details.
To view the Maya Connect API documents, contact your Maya Relations Manager.
Step 3: Create a Transfer
After obtaining the customer’s access token from the Maya Connect, you can now proceed in creating an intent to transfer using the customer’s access token as the recipient.
When using access tokens to represent the recipient, account type of the recipient on the transfer request must be TOKEN.
No movement of funds will be done yet at this stage and to give you some time to validate the transfer details such as the recipient information, fees that may be incurred, etc.
Idempotency. Creating transfers always result in a new intent even when using the same request reference number. For more details, see

- With the API keys provisioned to you, your system calls the
/transfers
endpoint of Money Movement to create an intent to transfer using the customer access token. - Money Movement returns the initial status of the transfer intent with the
transferId
.
See API specifications for Creating a Transfer.
There is currently no time limit for executing a transfer after creation. Change on this behavior may be imposed in the future.
Step 4: Execute Transfer
When intent to transfer has been created, you may use this endpoint to execute the transfer. This endpoint will require the transferId
acquired during Create a Transfer.
Execution of a particular transfer can only be done ONCE, and any subsequent execution will return an error.
After successful call, state will become APPROVED
or DECLINED
depends on the transaction processing status.

- With the API keys provisioned to you, your system calls the
/transfers/{transferId}/execute
endpoint of Money Movement providing thetransferId
to execute the intent to transfer. - Money Movement returns the updated status of the transfer to your system.
See API specifications for Executing a Transfer.
Retrieving a Transfer
Once a transaction has been Created or Executed, you can retrieve its details or status using the provided transferId.

- With the API keys provisioned to you, your system calls the
/transfers/{transferId}
endpoint of Money Movement providing thetransferId
to retrieve the transfer status and details. - Money Movement returns the transfer details to your system.
See API specifications for Retrieving a Transfer.
Updated 2 months ago