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

# Wallet

> Creacion, administracion y consulta de wallets digitales.

El modulo Wallet permite crear wallets, agregar assets por blockchain y consultar balances disponibles para el business autenticado.

## Endpoints

| Nombre                   | Metodo | Ruta                       |
| ------------------------ | ------ | -------------------------- |
| Crear wallet             | `POST` | `/v2/wallets`              |
| Listar wallets           | `GET`  | `/v2/wallets`              |
| Agregar asset a wallet   | `POST` | `/v2/wallets/{id}/assets`  |
| Consultar balance wallet | `GET`  | `/v2/wallets/{id}/balance` |

## Crear wallet

```http theme={null}
POST /v2/wallets
```

El asset inicial depende del ambiente:

| Ambiente   | Asset inicial   |
| ---------- | --------------- |
| Sandbox    | `USDC/Ethereum` |
| Producción | `USDC/Polygon`  |

El siguiente ejemplo corresponde a Sandbox.

```json theme={null}
{
  "walletName": "main_wallet"
}
```

### Response

```json theme={null}
{
  "walletId": "550e8400-e29b-41d4-a716-446655440001",
  "status": "ACTIVE",
  "createdAt": "2026-05-12T12:00:00.000Z",
  "assets": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "walletAddress": "0x0000000000000000000000000000000000000000",
      "legacyAddress": null,
      "symbol": "USDC",
      "blockchain": "Ethereum"
    }
  ]
}
```

Los assets de wallets creadas anteriormente no se modifican. Antes de transferir fondos, utiliza siempre la blockchain informada en la respuesta de la API.

## Listar wallets

```http theme={null}
GET /v2/wallets
```

### Response

El siguiente ejemplo muestra una wallet creada en Sandbox. En Producción, el asset inicial utiliza `Polygon`.

```json theme={null}
{
  "wallets": [
    {
      "walletId": "550e8400-e29b-41d4-a716-446655440001",
      "status": "ACTIVE",
      "createdAt": "2026-05-12T12:00:00.000Z",
      "assets": [
        {
          "id": "550e8400-e29b-41d4-a716-446655440000",
          "walletAddress": "0x0000000000000000000000000000000000000000",
          "legacyAddress": null,
          "symbol": "USDC",
          "blockchain": "Ethereum"
        }
      ]
    }
  ]
}
```

## Agregar asset a wallet

```http theme={null}
POST /v2/wallets/{id}/assets
```

```json theme={null}
{
  "symbol": "USDC",
  "blockchain": "Polygon"
}
```

### Response

```json theme={null}
{
  "walletId": "550e8400-e29b-41d4-a716-446655440001",
  "status": "ACTIVE",
  "createdAt": "2026-05-12T12:00:00.000Z",
  "assets": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "walletAddress": "0x0000000000000000000000000000000000000000",
      "legacyAddress": null,
      "symbol": "USDC",
      "blockchain": "Polygon"
    }
  ]
}
```

## Consultar balance wallet

```http theme={null}
GET /v2/wallets/{id}/balance
```

### Query Params

| Parametro    | Requerido | Descripcion                         |
| ------------ | --------- | ----------------------------------- |
| `symbol`     | No        | Asset para filtrar el balance.      |
| `blockchain` | No        | Blockchain para filtrar el balance. |

### Response

```json theme={null}
{
  "walletId": "550e8400-e29b-41d4-a716-446655440001",
  "balances": [
    {
      "assetId": "550e8400-e29b-41d4-a716-446655440000",
      "symbol": "USDC",
      "blockchain": "Polygon",
      "walletAddress": "0x0000000000000000000000000000000000000000",
      "balance": 100.5
    }
  ]
}
```

## Depósitos cripto

Los depósitos cripto se reciben directamente en `walletAddress`, usando el asset y la blockchain indicados en la wallet.

<Steps>
  <Step title="Crear o consultar una wallet">
    Usa `POST /v2/wallets` o `GET /v2/wallets` y guarda `walletId`,
    `walletAddress`, `symbol` y `blockchain`.
  </Step>

  <Step title="Transferir el asset">
    Envía fondos a `walletAddress` desde una wallet del mismo ambiente y sobre
    la blockchain indicada.
  </Step>

  <Step title="Esperar la confirmación">
    ON RAMP registra automáticamente el depósito después de su confirmación y
    notifica el resultado mediante un webhook `deposit_crypto`.
  </Step>

  <Step title="Consultar el balance">
    Verifica el saldo actualizado con `GET /v2/wallets/{id}/balance`.
  </Step>
</Steps>

<Warning>
  Confirma si estás utilizando testnet o mainnet antes de transferir fondos. No
  envíes fondos reales a una dirección de prueba.
</Warning>

Consulta el contrato de la notificación en [Webhooks de transacciones cripto](/webhooks#payloads-de-transacciones-crypto).
