Create Mock Deposits in MXN

The POST spei/test/deposits method enables you to simulate deposits in Mexican pesos (MXN) into your Bitso testing account. This endpoint is accessible exclusively in Bitso's testing environments.

The endpoint supports all accounts (personal and business) with a CLABE and does not require Multi-CLABE API access, making it useful for testing other MXN-related API functionalities if needed.

For Multi-CLABE API users, the mock deposits endpoint enables simulating MXN deposits into the CLABEs linked to their Bitso account, allowing complete testing of the API features.

Another use case of this endpoint is to simulate refund deposits to test your reconciliation flow. For all the details, refer to the article, Create Mock Refund Deposits in MXN.

The requirements for using this RESTful endpoint are as follows:

  • Have a Bitso account with a level above zero. Account levels determine monthly transaction limits. For more details on account levels, visit our Business Help Center.
  • Have a Bitso user CLABE. When you open a Bitso account or enable International Payments in MXN, the system assigns a CLABE to your account by default. Only CLABEs using the PRAXIS integration are supported; those from the old STP integration are incompatible. Your API credentials enable the system to verify if you have a valid CLABE.

To simulate a deposit and increase your MXN balance, send the following HTTP request with the specified body parameters:

POST https://stage.bitso.com/spei/test/deposits

Body Parameters

  • amount: The amount to be deposited in MXN. This value should be a positive number representing the monetary amount to be deposited into the given CLABE.
  • receiver_clabe: The 18-digit Bitso CLABE that receives the funds. The CLABE must belong to the user calling the endpoint, and it can be one of the following types:
    • The default CLABE of the receiving account.
    • The one assigned when enabling MXN in an international account.
    • A CLABE created via the Multi-CLABE API and linked to your account.
  • receiver_name: The name of the user assigned to the CLABE.
  • payment_type: The type of refund; this parameter finds use when creating a mock refund deposit.
  • tracking_key: The deposit's clave de rastreo; this parameter finds use when creating a mock refund deposit.

This body-parameter list includes only the required ones. You can also have optional parameters that store sender and recipient information in your request. Contact our Developer’s Support Desk at [email protected] to request information about the optional parameters.

The following object exemplifies the required body parameters to include in the HTTP request for simulating a deposit to a Bitso CLABE.

{
   "amount": "2000",
   "receiver_clabe": "710969000000135872",
   "receiver_name": "Jane Doe"
}

A successful mock deposit returns the object shown below:

{
    "success": true,
    "payload": {
        "amount": "2000",
        "tracking_code": "TESTSPEI015032061692291393",
        "receiver_clabe": "710969000000135872",
        "receiver_name": "Jane Doe",
        "created_at": "2023-08-17T16:56:33"
    }
}

To verify your simulated deposit, retrieve your account balance in MXN, explained below. Or, if configured in your testing environment, verify your webhook notifications.

To retrieve your account balance in MXN, send the following HTTP request with the indicated query parameter:

GET https://stage.bitso.com/api/v3/balance?currency=mxn

It returns the following JSON object:

{
    "payload": {
        "balances": [
            {
                "available": "1003837.21137127",
                "currency": "mxn",
                "locked": "0.00000000",
                "total": "1003837.21137127"
            }
        ]
    },
    "success": true
}

For further details about the payload returned, see the section, Get Account Balance.


Did this page help you?