Overview
Card linking allows users to connect their custodial internal wallets to their payment cards. Once linked, card transactions automatically deduct funds from the connected wallets, enabling seamless cryptocurrency spending for everyday purchases.How It Works
When a card transaction occurs:- Platform checks the highest priority linked wallet
- If balance is sufficient, funds are deducted
- If insufficient, platform moves to next priority wallet
- Process continues until transaction succeeds or all wallets exhausted
Linking Wallets
Link an internal wallet to a user’s card:Getting the addressId
TheaddressId is returned when you retrieve internal wallets:
Each user can link up to 5 wallets to their card. Attempting to link more than 5 wallets returns a validation error.
Viewing Linked Wallets
Get all wallets currently linked to the user’s card:Response Fields
Unlinking Wallets
Remove a wallet from card linking:Priority Management
Priority determines which wallet is charged first for card transactions. Lower priority numbers have higher precedence (priority 1 is charged before priority 2).Viewing Current Priority
Updating Priority
Change the priority order of linked wallets:You must provide ALL linked wallets when updating priority. The API replaces the entire priority configuration with the provided list.
Priority Rules
- Ascending Order: Priority 1 is checked first, then 2, then 3, etc.
- Sequential Processing: Platform checks each wallet in order until transaction succeeds
- Balance-Based: If a wallet has insufficient balance, platform moves to next priority
- No Gaps: Priority numbers should be sequential (1, 2, 3) without gaps
Common Use Cases
Multi-Currency Spending
Multi-Currency Spending
Link wallets with different currencies (USDC, USDT, SOL) and set priority based on which currency you prefer to spend first.Example:
- Priority 1: USDC on Linea (lowest fees)
- Priority 2: USDT on Ethereum (backup)
- Priority 3: SOL on Solana (last resort)
Fee Optimization
Fee Optimization
Prioritize wallets on networks with lower transaction fees. For example, set Linea wallets to priority 1 (lower fees) and Ethereum wallets to priority 2 (higher fees).Example:
- Priority 1: USDC on Linea ($0.01 avg fee)
- Priority 2: USDC on Ethereum ($2-5 avg fee)
Balance Management
Balance Management
Set priority based on wallet balances. Use wallets with smaller balances first to consolidate funds, or use larger balance wallets first to keep smaller amounts as reserves.Example (Spend Small First):
- Priority 1: Wallet with $50 balance
- Priority 2: Wallet with $500 balance
Rewards Optimization
Rewards Optimization
If certain wallets offer cashback or rewards, prioritize those wallets to maximize benefits.Example:
- Priority 1: Wallet with 2% cashback
- Priority 2: Wallet with 1% cashback
- Priority 3: Standard wallet
Implementation Examples
Complete Linking Flow
Priority Management UI
Transaction Flow Example
Here’s what happens when a user makes a $100 purchase with multiple linked wallets: Linked Wallets:- Priority 1: USDC on Linea (balance: $50)
- Priority 2: USDT on Ethereum (balance: $75)
- Priority 3: USDC on Solana (balance: $200)
1
Check Priority 1
Platform checks USDC Linea wallet. Balance: 100 purchase.
2
Check Priority 2
Platform checks USDT Ethereum wallet. Balance: 100 purchase.
3
Check Priority 3
Platform checks USDC Solana wallet. Balance: 100.
4
Complete Transaction
Card transaction approved. User’s Solana wallet balance now $100.
The platform checks wallets sequentially until finding one with sufficient balance. Only one wallet is charged per transaction.
Error Handling
Maximum Linked Wallets Exceeded
Wallet Already Linked
Invalid Address ID
addressId from GET /v1/wallet/internal response and ensure it belongs to the authenticated user.
Insufficient Balance (During Transaction)
Best Practices
Set Logical Priority
Prioritize wallets based on fees, balances, or user preferences. Lower-fee networks should typically have higher priority.
Display Balance Status
Show wallet balances in your UI so users understand which wallet will be charged and whether they have sufficient funds.
Allow Easy Reordering
Provide drag-and-drop or button controls to let users easily adjust wallet priority.
Show Network Fees
Display typical network fees for each wallet to help users make informed priority decisions.
Notify on Insufficient Balance
Alert users when their primary wallet has low balance and suggest funding it or adjusting priority.
Limit Linked Wallets
Consider encouraging users to link only 2-3 wallets to keep the experience simple and manageable.
Next Steps
Internal Wallets
Learn how to create internal wallets for linking
Whitelist Management
Manage withdrawal addresses
Card Operations
Explore card management features
API Reference
View complete API documentation