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

# Wallets

> View cryptocurrency wallets in your account. Wallets can belong to either your account or to individual customers.

This API allows you to view cryptocurrency wallets in your account. Wallets can belong to either your account or to individual customers.

## The wallet object

<ResponseField name="id" type="string">
  Unique identifier with `wall_` prefix (e.g., `wall_abc123def456`).
</ResponseField>

<ResponseField name="object" type="string">
  Always `"wallet"`.
</ResponseField>

<ResponseField name="owner_type" type="string">
  Type of owner: `account` or `customer`.
</ResponseField>

<ResponseField name="owner_id" type="string">
  ID of the owning account or customer.
</ResponseField>

<ResponseField name="crypto_addresses" type="array">
  List of crypto addresses in this wallet.

  <Expandable title="crypto address properties">
    <ResponseField name="crypto_addresses[].id" type="string">
      Unique identifier with `addr_` prefix.
    </ResponseField>

    <ResponseField name="crypto_addresses[].address" type="string">
      The cryptocurrency address.
    </ResponseField>

    <ResponseField name="crypto_addresses[].currency" type="string">
      Currency code (e.g., `BTC`, `ETH`).
    </ResponseField>

    <ResponseField name="crypto_addresses[].created_at" type="string">
      When the address was created (ISO 8601).
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="crypto_address_count" type="integer">
  Number of addresses in the wallet.
</ResponseField>

<ResponseField name="created_at" type="string">
  When the wallet was created (ISO 8601).
</ResponseField>

<ResponseField name="updated_at" type="string">
  When the wallet was last updated (ISO 8601).
</ResponseField>

## List wallets

```
GET /v1/wallets
```

Retrieves a paginated list of all wallets in your account, including both account wallets and customer wallets. Wallets are ordered by creation date (newest first).

<ParamField query="page" type="integer" default="1">
  Page number for pagination. Results are returned 25 items per page.
</ParamField>

```bash theme={null}
curl https://api.gettrxn.com/v1/wallets \
  -H "Authorization: Bearer $TRXN_TOKEN"
```

```json Response theme={null}
{
  "wallets": [
    {
      "id": "wall_abc123def456",
      "object": "wallet",
      "owner_type": "account",
      "owner_id": "acct_xyz789",
      "crypto_addresses": [
        {
          "id": "addr_123",
          "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
          "currency": "BTC",
          "created_at": "2025-01-25T12:00:00Z"
        },
        {
          "id": "addr_456",
          "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f...",
          "currency": "ETH",
          "created_at": "2025-01-25T12:30:00Z"
        }
      ],
      "crypto_address_count": 2,
      "created_at": "2025-01-25T10:00:00Z",
      "updated_at": "2025-01-25T12:30:00Z"
    },
    {
      "id": "wall_ghi789jkl012",
      "object": "wallet",
      "owner_type": "customer",
      "owner_id": "cust_abc123",
      "crypto_addresses": [
        {
          "id": "addr_789",
          "address": "bc1q...",
          "currency": "BTC",
          "created_at": "2025-01-25T14:00:00Z"
        }
      ],
      "crypto_address_count": 1,
      "created_at": "2025-01-25T14:00:00Z",
      "updated_at": "2025-01-25T14:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "pages": 1,
    "count": 2
  }
}
```

## Get wallet

```
GET /v1/wallets/:id
```

Retrieves a specific wallet by ID, including all its crypto addresses.

<ParamField path="id" type="string" required>
  The wallet's ID (e.g., `wall_abc123def456`).
</ParamField>

```bash theme={null}
curl https://api.gettrxn.com/v1/wallets/wall_abc123def456 \
  -H "Authorization: Bearer $TRXN_TOKEN"
```

```json Response theme={null}
{
  "id": "wall_abc123def456",
  "object": "wallet",
  "owner_type": "account",
  "owner_id": "acct_xyz789",
  "crypto_addresses": [
    {
      "id": "addr_123",
      "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
      "currency": "BTC",
      "created_at": "2025-01-25T12:00:00Z"
    },
    {
      "id": "addr_456",
      "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f...",
      "currency": "ETH",
      "created_at": "2025-01-25T12:30:00Z"
    }
  ],
  "crypto_address_count": 2,
  "created_at": "2025-01-25T10:00:00Z",
  "updated_at": "2025-01-25T12:30:00Z"
}
```

## Wallet types

### Account wallets

Account wallets belong to your main account and are used for receiving payments directly to your business.

* `owner_type`: `"account"`
* `owner_id`: Your account ID (e.g., `acct_xyz789`)

### Customer wallets

Customer wallets are automatically created for each customer and are used for customer-specific payment tracking.

* `owner_type`: `"customer"`
* `owner_id`: The customer's ID (e.g., `cust_abc123`)

## Automatic wallet creation

<Note>
  Account wallets are created automatically when your account is created. Customer wallets are created automatically when a customer is created. You do not need to create wallets manually.
</Note>

## Adding addresses to wallets

Use the [Crypto Addresses API](/api-reference/crypto-addresses) to add addresses to a wallet:

```bash theme={null}
curl -X POST https://api.gettrxn.com/v1/crypto_addresses \
  -H "Authorization: Bearer $TRXN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "wallet_id": "wall_abc123def456",
    "currency_code": "BTC",
    "address": "bc1q..."
  }'
```

## Sandbox support

<Note>
  The API respects sandbox scoping. If your API token is associated with a sandbox, you can only access wallets in that sandbox. Customer wallets for sandboxed customers are automatically sandboxed. Wallet data is isolated from production data.
</Note>
