Add Money using Cash In Code

Enables consumers to do a secure cash in transaction using a cash in code.

Cash In Code may be represented as a one-time 7-digit code or a bar code generated by the Maya app. It can be used as basis of the customer’s add money request. This will help keep the transaction secure by ensuring that the customer has authorized the transaction to their own wallet account.

ℹ️ Discuss your preferred cash in code, if 7-digit code or bar code, with your Maya Relationship Manager.

How to generate and use Cash In Code

Getting started

Prior to initiating the integration process, it is essential to familiarize yourself with critical information about the solution and have accomplished the onboarding process.

Please refer to the Know Before you Code page to access relevant and important details regarding Money Movement.

For the onboarding requirements and checklists, consult the Quickstart guide.

Fund user's Maya Wallet using Cash In Code

This implementation will require user to generate the Cash In Code via their Maya app. This particular code will play a crucial role in identifying the target wallet account during the transfer transaction.

Once the user has provided the Cash In Code (generated via their Maya app) to your application, you may proceed with the following steps:

Step 1: Create Transfer

Once you have accepted the Cash in Code, you can proceed with creating an intent to transfer, using the particular code.

🧠 Keep in mind

When using cash in codes to represent the recipient, the account type of the recipient (recipient.type) in the transfer request must be set as CODE.

At this stage, no actual movement of funds will occur. This allows you sufficient time to validate the transfer details, including recipient information, potential fees, and other relevant factors.

⚠️ Creating transfers always result in a new intent even when using the same request reference number. See also Know Before you Code for the information related to idempotency.

What happens during create transfer:

  1. With the API keys provisioned to you and following the API contract, send the API request to POST /transfers providing the cash in code.
  1. Maya will respond with the transferId and its transfer details.

ℹ️ There is currently no time limit for executing a transfer after creation. Change on this behavior may be imposed in the future.

Step 2: Execute the Transfer

Once the intent to transfer has been created, utilize this endpoint to execute the transfer. To do so, you will need to provide the transferId obtained during the Step 1: Create a Transfer.

⚠️ Execution of a particular transfer can only be done ONCE. Whether it’s Approved or Declined, succeeding execution will return an error.

After successful call, state will become APPROVED or DECLINED depends on the transaction processing status.

What happens during execute transfer:

  1. With the API keys provisioned to you and following the API contract, send the API request to PUT /transfers/{transferId}/execute.
  2. Maya will return the status of the transfer after processing.
Conditional: Retrieve a Transfer

Maya made this endpoint available for you to obtain the transfer details or check the status of a transfer by using the transferId obtained during Step 1: Create a Transfer.

What happens during execute transfer:

  1. With the API keys provisioned to you and following the API contract, send the API request to GET /transfers/{transferId}.
  2. Maya will return the transfer details and its state.

🧩 When to use Retrieve a Transfer

Maya recommends using Retrieve a Transfer when you have encountered the following scenarios during Execute transfer and Retrieve a transfer, to validate the transaction before you proceed to the next steps (For example: Execute a transfer):

  1. When you did not receive response from Maya.
  2. When the response from Maya is ambiguous (gateway errors, time outs, anything unparsable). See Money Movement errors for more details.