Transfer Crypto
Last updated
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.
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.
Chooses Transfer Crypto.
Authorizes the smart wallet (one signature/setup step).
Funds it; the deposit and swap execute and the destination token is delivered to depositWalletAddress.
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".
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.
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.
Last updated
openSwapperModal({
integratorId: "your-id",
dstChainId: "8453",
dstTokenAddr: "0x833…913",
depositWalletAddress: "0x…",
supportedDepositOptions: ["transferCrypto"],
});