x402 Protocol
Browser-based direct payment method for instant card creation
8 min read
x402 Protocol
x402 is ALIAS's primary payment method, offering one-click payments directly from your browser wallet. It's designed for desktop users who want the fastest possible checkout experience.
What is x402?
x402 is a payment protocol built on Solana that enables direct, browser-based cryptocurrency transactions without QR codes or external devices.
Simple explanation: Think of x402 like clicking "Pay with PayPal" on a website—your wallet opens, you approve, and the payment is complete. No copying addresses, no QR codes, no switching devices.
Technical explanation (still simple): x402 creates a payment request in your browser. Your Solana wallet extension detects it and pops up asking for approval. Once you approve, the transaction is signed and submitted to Solana. The website verifies the transaction and completes your purchase.
How x402 Works (Step-by-Step)
Understanding the flow helps you know what to expect when using x402.
Step 1: Select amount and payment method You choose how much you want to load on your card and select "x402 Protocol" as your payment method.
Step 2: Click "Create Card" ALIAS generates a payment request with the amount, recipient address, and transaction details.
Step 3: Wallet popup appears Your browser wallet extension (Phantom, Solflare, Backpack, etc.) automatically detects the payment request and opens.
Step 4: Review transaction The wallet shows you exactly what you're paying: amount, token, and recipient. Verify these details match what you selected.
Step 5: Approve payment Click "Approve" or "Confirm" in your wallet. Your wallet signs the transaction and sends it to the Solana blockchain.
Step 6: Blockchain confirmation Solana confirms your transaction (typically under 1 second). ALIAS watches the blockchain for your payment.
Step 7: Card creation Once confirmed, ALIAS creates your virtual card and displays the details in your dashboard.
Total time: Under 2 seconds from approval to card delivery.
One-Click Experience
For desktop users with browser wallet extensions, x402 feels like one click—press "Create Card," approve in your wallet, and you're done. No QR codes, no typing, no switching devices.
Benefits of x402
Speed: Fastest payment method available. Desktop users complete checkout in under 2 seconds.
Simplicity: One popup, one click, one confirmation. Minimal steps between decision and card.
Security: Your wallet never shares private keys. You approve every transaction explicitly.
No Device Switching: Everything happens in your browser. No need to grab your phone to scan QR codes.
Desktop Optimized: Designed for users browsing on desktop computers with wallet extensions installed.
Wide Wallet Support: Works with Phantom, Solflare, Backpack, Ledger, and all major Solana wallet extensions.
Best For Desktop Users
x402 shines when you're using a desktop or laptop computer.
Ideal setup:
- Desktop or laptop computer
- Browser wallet extension installed (Phantom, Solflare, etc.)
- Browsing and paying from the same device
- Fast internet connection
Why desktop is better for x402: Browser extensions only work on desktop browsers (not mobile). Mobile users should use Solana Pay instead.
Larger screens make it easier to review transaction details in the wallet popup.
Desktop users typically have fewer interruptions during checkout.
Can you use x402 on mobile? Not really. Mobile browsers don't support wallet extensions like desktop browsers do. Mobile users should use Solana Pay with QR codes.
Supported Wallets
x402 works with any Solana wallet that supports browser extensions.
Most popular wallets:
- Phantom: Most widely used Solana wallet, excellent x402 support
- Solflare: Powerful wallet with advanced features
- Backpack: Modern wallet with clean interface
- Glow: Privacy-focused wallet option
- Ledger: Hardware wallet with browser extension support
How to set up:
- Install your preferred wallet extension from their official website
- Create a new wallet or import existing one
- Fund it with SOL (for gas fees) and USDC/other tokens (for cards)
- Visit ALIAS and connect your wallet
All wallets work the same: The x402 experience is identical regardless of which wallet you use. Choose based on your personal preferences for security, features, and interface design.
Transaction Verification
x402 transactions are verified on the Solana blockchain before cards are created.
What gets verified:
Transaction exists: Payment was actually submitted to Solana blockchain
Transaction confirmed: Not just pending—must have blockchain confirmation
Correct amount: You sent exactly what the card costs
Correct recipient: Payment went to ALIAS treasury address
Correct token: Paid in the token you selected (USDC, SOL, etc.)
Not reused: Transaction signature hasn't been used for another card
Why blockchain verification matters: Prevents fraud and ensures you actually paid before receiving card details. Everything is transparent and verifiable on-chain.
How long verification takes: Solana confirmation is typically 400-800 milliseconds (under 1 second). ALIAS verification adds another 200-500 milliseconds.
Common Issues & Solutions
Wallet popup doesn't appear
Possible causes:
- Wallet extension not installed
- Wallet extension locked or disconnected
- Browser blocking popups
- JavaScript disabled
Solutions:
- Install a Solana wallet extension from official website
- Unlock your wallet by clicking the extension icon
- Allow popups for ALIAS website in browser settings
- Enable JavaScript in browser settings
Transaction fails after approval
Possible causes:
- Not enough SOL for gas fees
- Network congestion (rare on Solana)
- Wallet timed out during signing
- Transaction was rejected by wallet internally
Solutions:
- Ensure you have at least 0.01 SOL for transaction fees
- Try again—usually works on second attempt
- Check wallet logs for specific error messages
- Reconnect wallet and retry
Card not created after payment
Possible causes:
- Payment confirmed but card creation failed
- Network delay between payment and card provider API
- Transaction verification error
Solutions:
- Wait 10 seconds and refresh the page
- Check your dashboard for the new card
- Verify transaction on Solana explorer (solscan.io or explorer.solana.com)
- Contact support with transaction signature if card doesn't appear after 1 minute
Wrong amount charged
Possible causes:
- Price display error (rare)
- Selected wrong amount before approving
- Token price conversion shown incorrectly
Solutions:
- Always review the amount in your wallet popup before approving
- Contact support immediately with transaction signature
- Check your wallet history to see exact amount sent
Always Verify in Wallet
Before clicking "Approve" in your wallet, verify the amount, recipient, and token match what you selected in ALIAS. Your wallet shows the actual transaction details.
Troubleshooting Tips
Before starting:
- Install and unlock your wallet extension
- Fund with SOL for gas (at least 0.01 SOL)
- Fund with payment token (USDC, SOL, etc.)
- Disable ad blockers that might interfere
- Use updated browser and wallet versions
During checkout:
- Review transaction carefully in wallet popup
- Don't close wallet popup while transaction is processing
- Wait for full confirmation before closing browser
- Save card details immediately after creation
If something goes wrong:
- Check wallet transaction history
- Look up transaction on Solana blockchain explorer
- Refresh ALIAS dashboard to check for card
- Contact support with specific error messages and transaction signatures
Security Best Practices
x402 is secure, but you should still follow best practices.
Wallet security:
- Never share your seed phrase or private keys
- Always verify recipient address in wallet popup
- Use hardware wallets (Ledger) for large amounts
- Keep wallet extension updated
Transaction security:
- Only approve transactions you initiated
- Verify amount and token before approving
- Don't approve transactions if recipient address looks suspicious
- Close wallet after each session
General security:
- Use strong passwords for wallet
- Enable two-factor authentication if available
- Don't install unknown wallet extensions
- Download wallets only from official websites
Comparison with Solana Pay
Both payment methods work well—choose based on your situation.
Use x402 when:
- You're on desktop with wallet extension
- You want the fastest checkout
- You prefer one-click payments
- You don't want to use QR codes
Use Solana Pay when:
- You're browsing on desktop but wallet is on mobile
- You prefer mobile wallets
- You want to pay from a different device
- Your wallet doesn't have browser extension support
Try Both
Both methods are free and work equally well. Try x402 first on desktop, and use Solana Pay when you're on mobile or away from your desktop wallet.
Next Steps
Learn more about ALIAS payment options:
- Solana Pay - QR code payment method
- Payment Methods Overview - Compare both options
- Creating Cards - Step-by-step card creation guide
- Quick Start - Get your first card in 5 minutes
Ready to Pay?
Head to the dashboard, connect your wallet, and create your first card using x402. The whole process takes under 2 seconds.