For the complete documentation index, see llms.txt. This page is also available as Markdown.

Transfer Crypto

Key: transferCrypto · Deposit method: smart_wallet

The transfer-crypto flow uses a per-user smart wallet (account abstraction) to make funding a low-friction, near-one-tap experience — and to enable powerful patterns like automatically sweeping an on-ramp payment onward into a swap.

What it is

Each user gets a smart contract wallet (deployed via ZeroDev / EIP-7702) that Swapper can operate on their behalf under tightly scoped permissions (session keys, spending limits). This lets the widget:

  • deposit and swap in a single authorized action, rather than a manual approve-then-swap dance;

  • accept funds that arrive at the smart wallet (e.g. from a card on-ramp) and sweep them onward into your destination token automatically.

The authorization is scoped and bounded — it lets Swapper execute the swap the user asked for, not move funds anywhere else.

What the user experiences

  1. Chooses Transfer Crypto.

  2. Authorizes the smart wallet (one signature/setup step).

  3. Funds it; the deposit and swap execute and the destination token is delivered to depositWalletAddress.

What your app receives

A transaction.completed webhook whose deposit.method is smart_wallet, with providerData.type = "smart_wallet":

{
  "type": "smart_wallet",
  "authorizationId": "0x…-1-1782205341782",
  "executionId": "1782652045143-0x…",
  "smartWalletAddress": "0xbf6…ac0"
}

The smart-wallet deposit carries fundingTxs — every on-chain tx that funded the swap. When the funds came from a card on-ramp, one of those funding txs equals the on-ramp deposit's depositTxHash; that's how the two deposits are linked. It may also carry deposited (what the user originally put in) alongside source (what actually entered the swap).

In the browser you also get a transaction_success widget event with depositOption: "transferCrypto".

On-ramp → smart-wallet sweep

The headline pattern: a user pays by card, the crypto lands in their smart wallet, and Swapper sweeps it into your destination token — a fully cash-to-your-token path with no manual crypto steps. Operationally this produces two linked deposits (onramp + smart_wallet); make sure your accounting counts the flow once. See Webhooks → Linking.

Debugging a stuck deposit

If a smart-wallet deposit never executes, the usual suspects are a stuck delegation job, a sponsorship failure, an EIP-7702 authorization problem, or a userOp that reverts in simulation. Gather the authorizationId, executionId, smartWalletAddress, and funding tx hash and open a ticket in Discord.

Enabling it

Last updated