Skip to main content
An order is the wallet action that sweeps a deposit into the destination wallet after you create a deposit account. Status is the wallet-action status: pending, succeeded, rejected, or failed. pending means the sweep has not finished: there may be no steps yet, or a step may still be running. succeeded means every step completed. rejected failed before any onchain effects. failed may have onchain effects.

Get an order

Fetch a sweep by wallet action ID. The path wallet is the destination from create. This calls GET /v1/wallets/{wallet_id}/deposit_accounts/crypto/orders/{order_id}.
getOrder rejects when the wallet or order cannot be loaded.
useHeadlessCryptoDeposit is experimental. Import it from @privy-io/react-auth. The interface may change without a major SDK version bump.
string
Wallet action ID of the sweep.
'pending' | 'succeeded' | 'rejected' | 'failed'
Wallet-action status.

Get the next order

Fetch the earliest sweep into the destination wallet after after. after is exclusive. Use this to poll when you do not yet have an order ID. This calls GET /v1/wallets/{wallet_id}/deposit_accounts/crypto/next_order.
getNextOrder returns {order: null} when no sweep exists after after, and rejects when the wallet cannot be loaded.
string
required
ISO 8601 timestamp. Returns the earliest sweep strictly after this time.
object | null
Same {(id, status)} object as get order, or null if no sweep exists after after.

Create a deposit account

Provision deposit addresses

Quotes

Indicative route quotes before creating an address

Get order API

GET /v1/wallets/{wallet_id}/deposit_accounts/crypto/orders/{order_id}

Get next order API

GET /v1/wallets/{wallet_id}/deposit_accounts/crypto/next_order