Skip to main content

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:
  1. Platform checks the highest priority linked wallet
  2. If balance is sufficient, funds are deducted
  3. If insufficient, platform moves to next priority wallet
  4. Process continues until transaction succeeds or all wallets exhausted

Linking Wallets

Link an internal wallet to a user’s card:

Getting the addressId

The addressId 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:
Unlinking a wallet does not affect the wallet itself or its balance. The wallet remains accessible for deposits and withdrawals.

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

  1. Ascending Order: Priority 1 is checked first, then 2, then 3, etc.
  2. Sequential Processing: Platform checks each wallet in order until transaction succeeds
  3. Balance-Based: If a wallet has insufficient balance, platform moves to next priority
  4. No Gaps: Priority numbers should be sequential (1, 2, 3) without gaps

Common Use Cases

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)
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)
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
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)
Transaction Flow:
1

Check Priority 1

Platform checks USDC Linea wallet. Balance: 50.Insufficientfor50. Insufficient for 100 purchase.
2

Check Priority 2

Platform checks USDT Ethereum wallet. Balance: 75.Insufficientfor75. Insufficient for 100 purchase.
3

Check Priority 3

Platform checks USDC Solana wallet. Balance: 200.Sufficient!Deduct200. Sufficient! Deduct 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

Solution: Unlink an existing wallet before linking a new one.

Wallet Already Linked

Solution: No action needed. Wallet is already available for card payments.

Invalid Address ID

Solution: Verify the addressId from GET /v1/wallet/internal response and ensure it belongs to the authenticated user.

Insufficient Balance (During Transaction)

Solution: Prompt user to fund one of their linked wallets or add a new wallet with sufficient balance.

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