# Countries Mexico

> Create a Payout for Mexico using our API and Dashboard

export const spei = PAYOUT_PAYMENT_METHODS.find(
  (method) => method.id === "spei",
);

export const mercadoPago = PAYOUT_PAYMENT_METHODS.find(
  (method) => method.id === "mercado-pago",
);

# 🇲🇽 Mexico

Learn everything you need to know about making payouts in Mexico.

## Payment Methods

Checkout our SLAs for each payment method:

## Instructions

To create a payout using EBANX Direct API, follow the steps below.

  ### Define request parameters

    Provide the required parameters listed below to create a payout.

    
      | Field                | Description                                                                                              |
      | -------------------- | -------------------------------------------------------------------------------------------------------- |
      | `integration_key`    | Your EBANX integration key.                                                                              |
      | `external_reference` | The unique payout ID provided by you.                                                                    |
      | `country`            | The two-letter country code for the customer country. In this case, we'll show the method to mx (Mexico) |
      | `amount`             | The amount in the specified currency (currency_code).                                                    |
      | `currency_code`      | Three-letter code of the payout currency. In this case, we'll use MXN (Mexican Peso)                     |
      | `payee`              | A JSON object containing the details of the payee of your request.                                       |
    

    
    **Document Types Allowed**

    
      | Document type | Description                                                                            |
      | ------------- | -------------------------------------------------------------------------------------- |
      | RFC           | Federal taxpayer registration (Registro Federal de Contribuyentes).                    |
      | CURP          | Unique Population Registry Code (Clave Única de Registro de Población), 18 characters. |
    

    > **Understanding CLABE**
> In Mexico, bank accounts are identified using the **CLABE** (Clave Bancaria Estandarizada), an 18-digit standard number. The first three digits identify the specific bank (e.g., 012 for BBVA, 002 for Banamex). This three-digit bank code is the same as the last three digits of the bank's official institution key.

  ### Send payout request to EBANX

    To create a new Payout, you will use the [**/ws/payout/create**](/api-reference?api=payout&page=post--ws-payout-create) endpoint.

    Choose the payment method for your payout request:

            {spei?.label}

        }
      >
    For **SPEI** (bank transfer) transactions, the **bank_info** tag only requires the **bank_details** key filled with the CLABE number. The **bank_details** key is mandatory. The API will automatically extract **bank_name**, **bank_branch**, **bank_account** and **account_type** values from the CLABE number.

    The following example demonstrates a payout request to an individual payee using their CLABE number:

    ```bash
curl -X POST \
  --location 'https://sandbox.ebanxpay.com/ws/payout/create' \
  --header 'Content-Type: application/json' \
  --data '{
    "integration_key": "{{integration_key}}",
    "external_reference": "{{unique_external_reference}}",
    "country": "mx",
    "amount": 1000,
    "currency_code": "MXN",
    "payee": {
        "name": "Carlos Martinez Lopez",
        "email": "carlos.martinez@email.com",
        "phone": "+525512345678",
        "document": "{{tax_id}}",
        "document_type": "CURP",
        "bank_info": {
            "bank_details": "{{bank_details}}"
        },
        "address": {
            "zipcode": "06600",
            "state": "CDMX",
            "city": "Ciudad de Mexico",
            "street_address": "Av. Paseo de la Reforma 250",
            "street_complement": "Piso 10"
        }
    }
}'
```

    A successful creation will return a JSON Object with type "success" and a payout object with all the details of the newly created payout.

    ```json
{
  "type": "success",
  "payout": {
    "uid": "{{payout_uid}}",
    "external_reference": "{{unique_external_reference}}",
    "status": "OP",
    "request_date": "2024-01-15 10:30:00",
    "status_date": null,
    "paid_date": null,
    "cancel_date": null,
    "payee": {
      "name": "Carlos Martinez Lopez",
      "email": "carlos.martinez@email.com",
      "phone": "525512345678",
      "document": "{{tax_id}}",
      "document_type": "CURP",
      "birthdate": null,
      "bank_info": {
        "bank_name": "012 BBVA MEXICO",
        "bank_branch": "{{bank_branch}}",
        "bank_account": "{{bank_account}}",
        "account_type": "C",
        "bank_details": "{{bank_details}}"
      }
    },
    "request_amount": 1000,
    "request_currency": "MXN",
    "request_exchange_rate": 1,
    "debit_amount": 1000,
    "debit_fee": 10,
    "debit_amount_total": 1010,
    "debit_currency": "MXN",
    "local_tax_amount": "0.00",
    "local_amount_total": "1000.00",
    "local_currency": "MXN",
    "local_exchange_rate": "1.0000"
  }
}
```

        {mercadoPago?.label}

    }
  >
    For **Mercado Pago** transactions, the `target` parameter must be set to "mercadopago". Additionally, the `target_account` must contain the email address linked to the payee's Mercado Pago account.

    ```bash
curl -X POST \
  --location 'https://sandbox.ebanxpay.com/ws/payout/create' \
  --header 'Content-Type: application/json' \
  --data '{
    "integration_key": "{{integration_key}}",
    "external_reference": "{{unique_external_reference}}",
    "country": "mx",
    "amount": 1000,
    "currency_code": "MXN",
    "target": "mercadopago",
    "target_account": "carlos.martinez@email.com",
    "payee": {
        "name": "Carlos Martinez Lopez",
        "email": "carlos.martinez@email.com",
        "document": "{{tax_id}}",
        "document_type": "CURP"
    }
}'
```

  </TabItem>
</Tabs>

  </IntegrationStepsItem>
  ### Send commit request to EBANX

    Once the new payout record is created it'll be committed automatically after 6 hours. Or you can use the [**/ws/payout/commit**](/api-reference?api=payout&page=post--ws-payout-commit) endpoint to start the payment process.

    Here's an example of a commit operation using the payout we've just created:

    ```bash
curl -X POST \
  --location 'https://sandbox.ebanxpay.com/ws/payout/commit' \
  --header 'Content-Type: application/json' \
  --data '{
    "integration_key": "{{integration_key}}",
    "uid": "{{payout_uid}}"
}'
```

    Once the new payout is committed, a JSON Object with type "success" will be returned.

    ```json
{
  "type": "success",
  "message": "Payout has already been committed"
}
```

  ### Congratulations!

    You have successfully **Created a Payout** in Mexico.

## Creating a Payout using the Dashboard

You can also create a payout through our Dashboard in the Overview section of the Payout tab. Click on Create Payout, fill in the payee information, payout amount and click on Create. Additionally, you can create a Mass Payout by sending a spreadsheet to be processed in bulks.

## Available Banks

Below is the list of banks supported for payout operations in Mexico. The **Bank Code** corresponds to the first three digits of the CLABE number.

  | Institution Key | Bank Code (from CLABE) | Institution Name |
  | --------------- | ---------------------- | ---------------- |
  | 40133           | 133                    | ACTINVER         |
  | 40062           | 062                    | AFIRME           |
  | 90721           | 721                    | albo             |
  | 90706           | 706                    | ARCUS FI         |
  | 90659           | 659                    | ASP INTEGRA OPC  |
  | 40127           | 127                    | AZTECA           |
  | 37166           | 166                    | BaBien           |
  | 40030           | 030                    | BAJIO            |
  | 40002           | 002                    | BANAMEX          |
  | 40154           | 154                    | BANCO COVALTO    |
  | 37006           | 006                    | BANCOMEXT        |
  | 40137           | 137                    | BANCOPPEL        |
  | 40160           | 160                    | BANCO S3         |
  | 40152           | 152                    | BANCREA          |
  | 37019           | 019                    | BANJERCITO       |
  | 40147           | 147                    | BANKAOOL         |
  | 40106           | 106                    | BANK OF AMERICA  |
  | 40159           | 159                    | BANK OF CHINA    |
  | 37009           | 009                    | BANOBRAS         |
  | 40072           | 072                    | BANORTE          |
  | 40058           | 058                    | BANREGIO         |
  | 40060           | 060                    | BANSI            |
  | 2001            | 001                    | BANXICO          |
  | 40129           | 129                    | BARCLAYS         |
  | 40145           | 145                    | BBASE            |
  | 40012           | 012                    | BBVA MEXICO      |
  | 40112           | 112                    | BMONEX           |
  | 90677           | 677                    | CAJA POP MEXICA  |
  | 90683           | 683                    | CAJA TELEFONIST  |
  | 90715           | 715                    | CASHI CUENTA     |
  | 90630           | 630                    | CB INTERCAM      |
  | 90631           | 631                    | CI BOLSA         |
  | 40124           | 124                    | CITI MEXICO      |
  | 90901           | 901                    | CLS              |
  | 90903           | 903                    | CoDi Valida      |
  | 40130           | 130                    | COMPARTAMOS      |
  | 40140           | 140                    | CONSUBANCO       |
  | 90725           | 725                    | COOPDESARROLLO   |
  | 90652           | 652                    | CREDICAPITAL     |
  | 90688           | 688                    | CREDICLUB        |
  | 90680           | 680                    | CRISTOBAL COLON  |
  | 90723           | 723                    | Cuenca           |
  | 90729           | 729                    | Dep y Pag Dig    |
  | 40151           | 151                    | DONDE            |
  | 90616           | 616                    | FINAMEX          |
  | 90634           | 634                    | FINCOMUN         |
  | 90734           | 734                    | FINCO PAY        |
  | 90699           | 699                    | FONDEADORA       |
  | 90685           | 685                    | FONDO (FIRA)     |
  | 90601           | 601                    | GBM              |
  | 40167           | 167                    | HEY BANCO        |
  | 37168           | 168                    | HIPOTECARIA FED  |
  | 40021           | 021                    | HSBC             |
  | 40155           | 155                    | ICBC             |
  | 40036           | 036                    | INBURSA          |
  | 90902           | 902                    | INDEVAL          |
  | 40150           | 150                    | INMOBILIARIO     |
  | 40136           | 136                    | INTERCAM BANCO   |
  | 40059           | 059                    | INVEX            |
  | 40110           | 110                    | JP MORGAN        |
  | 40128           | 128                    | KAPITAL          |
  | 90661           | 661                    | KLAR             |
  | 90653           | 653                    | KUSPIT           |
  | 90670           | 670                    | LIBERTAD         |
  | 90602           | 602                    | MASARI           |
  | 90722           | 722                    | Mercado Pago W   |
  | 90720           | 720                    | MexPago          |
  | 40042           | 042                    | MIFEL            |
  | 40158           | 158                    | MIZUHO BANK      |
  | 90600           | 600                    | MONEXCB          |
  | 40108           | 108                    | MUFG             |
  | 40132           | 132                    | MULTIVA BANCO    |
  | 37135           | 135                    | NAFIN            |
  | 90638           | 638                    | NU MEXICO        |
  | 90710           | 710                    | NVIO             |
  | 40148           | 148                    | PAGATODO         |
  | 90732           | 732                    | Peibo            |
  | 90620           | 620                    | PROFUTURO        |
  | 40156           | 156                    | SABADELL         |
  | 40014           | 014                    | SANTANDER        |
  | 40044           | 044                    | SCOTIABANK       |
  | 40157           | 157                    | SHINHAN          |
  | 90728           | 728                    | SPIN BY OXXO     |
  | 90646           | 646                    | STP              |
  | 90703           | 703                    | TESORED          |
  | 90684           | 684                    | TRANSFER         |
  | 40138           | 138                    | UALA             |
  | 90656           | 656                    | UNAGRA           |
  | 90617           | 617                    | VALMEX           |
  | 90605           | 605                    | VALUE            |
  | 90608           | 608                    | VECTOR           |
  | 40113           | 113                    | VE POR MAS       |
  | 40141           | 141                    | VOLKSWAGEN       |

## Possible Errors

See the [Payout Error Code page](/docs/payout/create-payout/errors/payout-error-codes) to learn more about the possible errors.
## Still need help?

If you still have questions, you can explore the following options:

- **Merchant support:** Contact our support team at [sales.engineering@ebanx.com](mailto:sales.engineering@ebanx.com) for assistance.
- **Not a partner yet?** Complete the [Merchant Signup Form](https://business.ebanx.com/en/request-contact), and our commercial team will reach out to you.
