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

# Create a deposit account

export const ChainIdentifier = () => <>
    Chain alias or CAIP-2 identifier, such as <code>base</code> or <code>eip155:8453</code>.
  </>;

export const AssetIdentifier = () => <>
    Asset alias or token contract address, such as <code>usdc</code> or{' '}
    <code>0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913</code>.
  </>;

A crypto deposit account gives a wallet persistent deposit addresses.

When receiving deposits on the same chain type as the wallet, the deposit address is the wallet itself. When receiving deposits on a different chain type as the wallet, the deposit address is a newly provisioned wallet assigned to the same `owner`.

The request body includes:

<ParamField body="source" type="object" required>
  Assets the deposit address accepts. Chains must be EVM or Solana.

  <Expandable title="properties" defaultOpen>
    <ParamField body="source.mode" type="'all' | 'include' | 'exclude'" required>
      `include` accepts only the listed assets. `exclude` accepts all except the listed assets.
      `all` accepts every supported source.
    </ParamField>

    <ParamField body="source.values" type="object[]">
      Asset specs for `include` and `exclude`. Omit when `mode` is `all`.

      <Expandable title="properties" defaultOpen>
        <ParamField body="source.values.asset" type="string">
          <AssetIdentifier />
        </ParamField>

        <ParamField body="source.values.chain" type="string">
          <ChainIdentifier /> Omit to match every supported chain for that asset.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="destination" type="object" required>
  Asset delivered to the destination wallet. Identifies exactly one asset on exactly one chain.

  <Expandable title="properties" defaultOpen>
    <ParamField body="destination.asset" type="string" required>
      <AssetIdentifier />
    </ParamField>

    <ParamField body="destination.chain" type="string" required>
      <ChainIdentifier /> Must match the destination wallet's `chain_type`.
    </ParamField>
  </Expandable>
</ParamField>

<View title="NodeJS" icon="node-js">
  ```ts {skip-check} theme={"system"}
  import {PrivyClient} from '@privy-io/node';

  const userJwt = 'insert-user-jwt';
  const walletId = 'insert-wallet-id';

  const privy = new PrivyClient({
    appId: 'insert-your-app-id',
    appSecret: 'insert-your-app-secret'
  });

  const {deposit_addresses} = await privy.wallets().depositAccounts.crypto.create(walletId, {
    source: {
      mode: 'include',
      values: [{asset: 'usdc', chain: 'base'}]
    },
    destination: {asset: 'pathusd', chain: 'tempo'},
    authorization_context: {user_jwts: [userJwt]}
  });
  ```
</View>

<View title="REST API" icon="terminal">
  To create a crypto deposit account for a wallet, make a `POST` request to:

  ```bash theme={"system"}
  https://api.privy.io/v1/wallets/{wallet_id}/deposit_accounts/crypto
  ```

  Below is a sample cURL command for this request:

  ```bash theme={"system"}
  curl --request POST https://api.privy.io/v1/wallets/{wallet_id}/deposit_accounts/crypto \
    -u "<your-privy-app-id>:<your-privy-app-secret>" \
    -H "privy-app-id: <your-privy-app-id>" \
    -H "privy-authorization-signature: <dest-owner-signature>" \
    -H "Content-Type: application/json" \
    -d '{
      "source": {
        "mode": "include",
        "values": [{"asset": "usdc", "chain": "base"}]
      },
      "destination": {
        "asset": "pathusd",
        "chain": "tempo"
      }
    }'
  ```
</View>

## Response

A successful response includes the following fields:

<ResponseField name="deposit_addresses" type="object[]">
  One entry per source route created for the destination wallet.

  <Expandable title="properties" defaultOpen>
    <ResponseField name="deposit_address" type="string">
      Address to sends funds to. If the source assets are on the same chain type as the wallet, this
      should be same as the wallet address.
    </ResponseField>

    <ResponseField name="wallet_id" type="string">
      ID of the source wallet behind this deposit address.
    </ResponseField>

    <ResponseField name="source" type="object">
      Assets this address accepts, using aliases when known.

      <Expandable title="properties" defaultOpen>
        <ResponseField name="source.mode" type="'all' | 'include' | 'exclude'">
          Filter applied to this deposit address.
        </ResponseField>

        <ResponseField name="source.values" type="object[]">
          Accepted assets.

          <Expandable title="properties" defaultOpen>
            <ResponseField name="source.values.asset" type="string">
              <AssetIdentifier />
            </ResponseField>

            <ResponseField name="source.values.chain" type="string">
              <ChainIdentifier />
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="destination" type="object">
      Asset and chain delivered to the destination wallet, using aliases when known.

      <Expandable title="properties" defaultOpen>
        <ResponseField name="destination.asset" type="string">
          <AssetIdentifier />
        </ResponseField>

        <ResponseField name="destination.chain" type="string">
          <ChainIdentifier />
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

```json theme={"system"}
{
  "deposit_addresses": [
    {
      "wallet_id": "insert-source-wallet-id",
      "deposit_address": "0x1234...abcd",
      "source": {
        "mode": "include",
        "values": [{"asset": "usdc", "chain": "base"}]
      },
      "destination": {"asset": "pathusd", "chain": "tempo"}
    }
  ]
}
```

## Next steps

<CardGroup cols={2}>
  <Card title="Funding overview" icon="wallet" href="/wallets/funding/overview">
    All available methods for funding wallets.
  </Card>

  <Card title="Fiat deposits" icon="building-columns" href="/wallets/funding/fiat-deposits/overview">
    Dedicated bank accounts that convert incoming fiat to crypto.
  </Card>
</CardGroup>
