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

# Obtener Wallet

> GET /v1/wallets/:userId

Obtiene la wallet asociada a un usuario.

## Endpoint

```
GET https://api.pan.tech/v1/wallets/:userId
```

## Autenticación

API Key o X402

## Parámetros de URL

| Parámetro | Tipo   | Descripción              |
| --------- | ------ | ------------------------ |
| `userId`  | string | ID del usuario en tu app |

## Response

### 200 OK

```json theme={null}
{
  "id": "pan_wallet_a1b2c3d4e5f6",
  "userId": "usuario_123",
  "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "chainType": "ethereum",
  "chains": [
    "ethereum",
    "ethereum-sepolia",
    "arbitrum",
    "arbitrum-sepolia",
    "base",
    "base-sepolia"
  ],
  "metadata": {
    "nombre": "Juan Perez"
  },
  "createdAt": "2024-01-15T10:30:00Z"
}
```

### Errores

| Código | Error              | Descripción             |
| ------ | ------------------ | ----------------------- |
| 401    | UNAUTHORIZED       | API key inválida        |
| 404    | WALLET\_NOT\_FOUND | Usuario no tiene wallet |

## Ejemplos

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.pan.tech/v1/wallets/usuario_123" \
    -H "Authorization: Bearer $PAN_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.pan.tech/v1/wallets/usuario_123',
    {
      headers: {
        'Authorization': `Bearer ${process.env.PAN_API_KEY}`
      }
    }
  );

  const wallet = await response.json();
  ```

  ```typescript SDK theme={null}
  const wallet = await pan.wallet.get('usuario_123');
  ```
</CodeGroup>
