Skip to main content
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 is a flat object discriminated by type:
'inline_route' | 'deposit_config'
required
Which create payload to send. inline_route takes source and destination. deposit_config reuses an existing deposit configuration via deposit_config_id.
object
Required when type is inline_route. Assets the deposit address accepts. Chains must be EVM or Solana.
object
Required when type is inline_route. Asset delivered to the destination wallet. Identifies exactly one asset on exactly one chain.
string
Required when type is deposit_config. ID of an existing deposit configuration to attach.
Use createCryptoDepositAccount from useHeadlessCryptoDeposit. The hook signs the dest-owner request with the authenticated user’s signer.
useHeadlessCryptoDeposit is experimental. Import it from @privy-io/react-auth/internal. The interface may change without a major SDK version bump.
The hook param for an existing configuration is depositConfigId.

Response

A successful response includes the following fields:
object[]
One entry per source route created for the destination wallet.

Get a quote

React and React Native apps can call getQuote on useHeadlessCryptoDeposit. Quotes do not require a wallet ID or authorization signature. This calls POST /v1/deposit_accounts/crypto/quote.
getQuote accepts an object with the following fields:
object
required
Asset the quote prices as input. Unlike create, both chain and asset are required.
object
required
Asset delivered to the destination wallet.
string
Amount as a decimal string in the source token’s standard unit (for example, "1.5" for 1.5 USDC). Not the smallest on-chain unit. Omit to quote approximately $50 of the source asset.
number
Slippage tolerance in basis points.
getQuote returns a Promise with the following fields:
string
Quoted input as a decimal string in the source token’s standard unit.
string
Estimated output as a decimal string in the destination token’s standard unit.
string
ISO 8601 timestamp when the quote was created.

Error handling

On React and React Native, createCryptoDepositAccount rejects on invalid configuration or failed requests. Common error cases include:
  • the user is not authenticated
  • the dest-owner request expires before it is sent
  • swaps or app-pays gas sponsorship are not enabled for the source chain
  • the route is unsupported
getQuote rejects when the route is unsupported or source and destination are not both mainnet or both testnet. Your app should wrap calls in try/catch and show clear UI feedback.

Complete example

Next steps

Deposit modal

useDepositFunds for the prebuilt deposit UI

Setup

Enable swaps and app-pays gas sponsorship