Accept Payments on Multiple Chains
Configure payment links to accept USDC on Base, Ethereum, Polygon, and Solana.
Accept Payments on Multiple Chains
By default, a payment link targets a single network. But you can let customers choose which chain to pay on — Base, Ethereum, Polygon, or Solana — from the same checkout page.
How it works
When you create a payment link with multiple networks, the checkout page shows a network selector. The customer picks their preferred chain, connects a compatible wallet, and pays. Bag handles the rest.
All payments are in USDC regardless of chain. The amount stays the same — only the network differs.
Create a multi-chain payment link
Pass the networks array and provide a wallet address for each chain:
import { Bag } from "@getbagsapp/sdk";
const bag = new Bag({ apiKey: process.env.BAG_API_KEY! });
const link = await bag.paymentLinks.create({
name: "Pro Plan",
amount: 29.99,
network: "base",
networks: ["base", "ethereum", "polygon", "solana"],
merchantWalletAddresses: {
base: "0xYourBaseWallet",
ethereum: "0xYourEthWallet",
polygon: "0xYourPolygonWallet",
solana: "YourSolanaWalletAddress",
},
});curl -X POST https://justusebag.xyz/api/payment-links \
-H "Authorization: Bearer $BAG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Pro Plan",
"amount": 29.99,
"network": "base",
"networks": ["base", "ethereum", "polygon", "solana"],
"merchantWalletAddresses": {
"base": "0xYourBaseWallet",
"ethereum": "0xYourEthWallet",
"polygon": "0xYourPolygonWallet",
"solana": "YourSolanaWalletAddress"
}
}'Supported networks
| Network | Value | Chain type | USDC contract |
|---|---|---|---|
| Base | base | EVM | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| Ethereum | ethereum | EVM | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
| Polygon | polygon | EVM | 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359 |
| Solana | solana | Solana | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
Testnet equivalents
| Network | Value | USDC contract |
|---|---|---|
| Base Sepolia | base_sepolia | 0x036CbD53842c5426634e7929541eC2318f3dCF7e |
| Ethereum Sepolia | eth_sepolia | 0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238 |
| Solana Devnet | solana_devnet | 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU |
All USDC contracts use 6 decimals.
Per-network wallet addresses
The merchantWalletAddresses field maps each network to a receiving wallet. This lets you:
- Use different wallets for different chains
- Keep EVM funds on one address and Solana funds on another
- Route payments to chain-specific treasury wallets
If you omit merchantWalletAddresses, Bag uses the default wallet from your account settings for all networks.
EVM vs. Solana wallets
EVM chains (Base, Ethereum, Polygon) use the same address format (0x...). You can use the same wallet address for all three, or different ones.
Solana uses a different address format (base58). You'll always need a separate Solana wallet address.
Webhooks and multi-chain
The payment.completed webhook payload includes the network field, so you always know which chain the customer paid on:
{
"event": "payment.completed",
"data": {
"sessionId": "...",
"txHash": "0xabc123...",
"amount": 29.99,
"network": "polygon"
}
}