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

# 👛 User Wallets

> Manage wallet addresses for users to receive crypto during on-ramp transactions.

***

## Overview

Wallets are destination blockchain addresses where cryptocurrency is sent during on-ramp transactions. Each wallet is tied to a virtual machine (VM) type that determines which blockchains are compatible with that address. You can save wallets ahead of time or pass the address directly when creating a transaction.

## VM Types

The `vmType` determines the address format and which blockchains are compatible:

| VM Type | Compatible Blockchains | Address Format              |
| ------- | ---------------------- | --------------------------- |
| `EVM`   | POL, ETH, BSC          | Ethereum-style (`0x...`)    |
| `SVM`   | SOL                    | Solana-style base58 address |

The wallet address is validated against the selected `vmType` when created. Duplicate combinations of `walletAddress` + `vmType` for the same user are rejected.

## Creating a Wallet

Use the [Create Wallet](/reference/walletaddresspartnerv2controller_createuserwallet) endpoint to register a new wallet for a user.

```
POST /api/partner/v2/users/{userId}/wallets
```

### Required Fields

* `vmType`: The virtual machine type (`EVM` or `SVM`)
* `walletAddress`: The blockchain address
* `alias`: A friendly name for the wallet (e.g., "My Polygon Wallet")

### Example

```json theme={null}
{
  "vmType": "EVM",
  "walletAddress": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
  "alias": "My Polygon Wallet"
}
```

### Response

```json theme={null}
{
  "success": true,
  "data": {
    "id": "8374f327-38bd-4b0b-b8a7-2524599eb903",
    "userId": "550e8400-e29b-41d4-a716-446655440000",
    "walletAddress": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
    "alias": "My Polygon Wallet",
    "vmType": "EVM",
    "enabled": true,
    "createdAt": "2025-05-08T18:00:00Z"
  }
}
```

## Listing Wallets

Use the [List Wallets](/reference/walletaddresspartnerv2controller_listuserwallets) endpoint to retrieve all enabled wallets for a user.

```
GET /api/partner/v2/users/{userId}/wallets
```

### Query Parameters

| Parameter | Required | Description                            |
| --------- | -------- | -------------------------------------- |
| `vmType`  | No       | Filter by VM type (`EVM`, `SVM`)       |
| `id`      | No       | Filter by wallet ID                    |
| `skip`    | No       | Number of results to skip (pagination) |
| `limit`   | No       | Maximum number of results to return    |
| `sortBy`  | No       | Sort field (supported: `createdAt`)    |

The response includes `count` (matching results) and `total` (all wallets for the user) fields for pagination.

## Deleting a Wallet

Use the [Delete Wallet](/reference/walletaddresspartnerv2controller_deleteuserwallet) endpoint to soft-delete (disable) a wallet. Disabled wallets will no longer appear in list results.

```
DELETE /api/partner/v2/users/{userId}/wallets/{walletId}
```

## Using Wallets in Transactions

When creating an on-ramp transaction, the `destinationWalletAddress` field specifies where crypto will be sent. You can either:

* **Use a saved wallet**: Save the wallet first with the Create Wallet endpoint, then reference the address in the transaction.
* **Pass the address directly**: Provide the `destinationWalletAddress` in the [Create On-Ramp](/reference/onramppartnerv2controller_createpartneronramp) request without saving it beforehand.

In both cases, the address must be valid for the blockchain used in the transaction.

***

What's Next

* [Create Wallet](/reference/walletaddresspartnerv2controller_createuserwallet)
* [List Wallets](/reference/walletaddresspartnerv2controller_listuserwallets)
* [💎 On-Ramp](/docs/on-ramp)
