> ## Documentation Index
> Fetch the complete documentation index at: https://bkey.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Mexico — MXN on/offramp

> Move money between MXN bank accounts (SPEI/CLABE) and the MXN wallet, powered by Etherfuse. Onramps are deposit-driven; offramps are a quote plus on-device signatures.

<div className="bmoni-spine">
  <span>Lifecycle</span>
  <a data-stage="1" href="/lifecycle#1-create-the-user">User</a>
  <a data-stage="2" href="/lifecycle#2-provision-the-smart-wallet">Wallet</a>
  <a data-stage="3" href="/lifecycle#3-verify-identity-kyc">KYC</a>
  <a data-stage="4" href="/lifecycle#4-activate-the-rail">Rail</a>
  <a data-stage="5" href="/lifecycle#5-fund-the-wallet">Fund</a>
  <a data-stage="6" href="/lifecycle#6-move-money">Move money</a>
</div>

Once a Mexican user has [completed Etherfuse KYC](/api-reference/kyc-mex-requirements) (their CLABE is provisioned automatically during activation), money moves in two directions:

* **Onramp:** the user sends MXN by SPEI transfer to their own CLABE → `MEXe` arrives in the smart wallet automatically. **No quote or order call is needed.**
* **Offramp:** `MEXe` → MXN paid out to the user's registered bank account, via a quote and on-device signatures.

***

## Onramp — just deposit

There is no onramp quote. Read the user's deposit CLABE and show it to them:

```http theme={null}
GET /v1/users/{userId}/bank-accounts/deposit-accounts/MXN
```

```json theme={null}
{
  "accounts": [
    {
      "id": "ba_mx_123",
      "accountName": "Ana García López",
      "bankName": "Fintoc",
      "currency": "MXN",
      "clabe": "646180111812345678",
      "targetCurrency": "MEXe",
      "status": "active"
    }
  ]
}
```

The account appears only once Mexico KYC is approved, and only `status: "active"` accounts can receive deposits. The unfiltered `GET …/bank-accounts/deposit-accounts` returns the same account under its `mexicanAccounts` group.

When the user sends a SPEI transfer to that CLABE from any bank, an onramp order is created automatically and `MEXe` is credited to their smart wallet — no further API calls. Track it via [order tracking](#track-an-order) or the wallet balance.

***

## Offramp

### 1. Create a quote

```http theme={null}
POST /v1/users/{userId}/latam/mx/quote
{
  "type": "offramp",
  "sourceAmount": "1000.00",
  "note": "Payout"
}
```

| Field          |                                                                            |
| -------------- | -------------------------------------------------------------------------- |
| `type`         | required — only `"offramp"` (onramps are deposit-driven and take no quote) |
| `sourceAmount` | required — decimal string, e.g. `"1000.00"`                                |
| `note`         | optional free text                                                         |

The response locks in pricing until `expiresAt` and already carries the `orderId`:

```json theme={null}
{
  "quoteId": "b9fa08b5-46ae-4d85-9ac2-6ca2f4d91234",
  "orderId": "7c21e6d0-1f3a-4b6e-9d2c-5f8a3b7c1234",
  "blockchain": "base",
  "quoteAssets": { "type": "offramp", "sourceAsset": "MEXe", "targetAsset": "MXN" },
  "sourceAmount": "1000.00",
  "destinationAmount": "998.50",
  "feeBps": "15",
  "feeAmount": "1.50",
  "exchangeRate": "1.00",
  "expiresAt": "2026-06-02T12:00:30.000Z",
  "signatureRequest": { "…": "…" }
}
```

### 2. Sign the approve request (when present)

`signatureRequest` is the first (approve) operation, granting Etherfuse allowance to burn the user's `MEXe`. Sign and submit it on-device via `bmoni_embedded_sdk`, the same pattern as other smart-wallet mutations. It is **absent when the wallet already has sufficient allowance** — skip straight to polling the order.

### 3. Poll the order for the burn request

```http theme={null}
GET /v1/users/{userId}/latam/mx/orders/{orderId}
```

Once the burn calldata is ready the order carries `burnSignatureRequest` — the second on-device signature authorizing the token burn. Sign and submit it the same way. This step is required **whether or not** an approve `signatureRequest` was returned in step 1.

After the burn settles, the MXN payout goes to the user's registered bank account.

***

## Track an order

```http theme={null}
GET /v1/users/{userId}/latam/mx/orders/{orderId}
```

| Field                              | Notes                                                                                     |
| ---------------------------------- | ----------------------------------------------------------------------------------------- |
| `status`                           | `created` → `funded` → `completed`, or `failed` / `refunded` / `canceled`                 |
| `orderType`                        | `onramp` or `offramp`                                                                     |
| `depositClabe`, `depositClabeName` | For onramp: the CLABE the deposit was received on (with a `memo` reference where present) |
| `statusPage`                       | Provider-hosted page showing live order status                                            |
| `amountInFiat`, `amountInTokens`   | Settled amounts once known                                                                |
| `burnSignatureRequest`             | Offramp only — present when the burn signature is needed                                  |
