Skip to main content

Gasless Payments with x402

x402 is the payment protocol that powers the Ad Marketplace. It lets you pay for things in crypto without gas fees - just one signature and you’re done.

The Problem with Traditional Crypto Payments

Buying things with crypto is usually painful: Step 1: Approve token spending (costs gas)
Step 2: Wait for confirmation
Step 3: Make payment (costs more gas)
Step 4: Wait again
Step 5: Gas fees that vary wildly
Result: Bad UX, unpredictable costs, multiple steps

The x402 Way

One Signature - Sign once, done
Zero Gas Fees - Pay only the product price
Instant - Settled immediately
Simple - Feels like web2
Result: Amazon-like checkout experience in web3

How It Works (Simple Version)

Instead of sending a transaction, you sign a message authorizing the payment.
  1. You click “Buy”
  2. MetaMask asks you to sign (not send a transaction)
  3. Payment is instantly settled on-chain
  4. You pay zero gas
The signature is a cryptographic authorization that allows the payment to be processed without you paying gas fees.

Real Example: Buying an Ad Slot

Traditional Way

1. Approve USDC spending
   → MetaMask transaction
   → Pay $2-5 in gas
   → Wait 12 seconds
   
2. Make payment
   → Another MetaMask transaction  
   → Pay $3-8 in gas
   → Wait 12 more seconds

Total time: ~30 seconds
Total gas fees: $5-13
Steps: 4 clicks + 2 confirmations

x402 Way

1. Sign payment authorization
   → MetaMask signature request
   → Pay $0 in gas
   → Instant

Total time: ~3 seconds
Total gas fees: $0
Steps: 1 click + 1 signature

Why Zero Gas?

You’re probably wondering: “How can there be no gas fees?” Here’s the secret:
  1. You sign a permit message (not a transaction)
  2. The x402 facilitator submits the transaction for you
  3. The facilitator pays the gas
  4. You just pay the product price
Think of it like a credit card payment - you don’t pay the payment processor’s fees, the merchant does. Same concept here.

Benefits for You

As an Advertiser

  • 💰 Predictable Costs - Always pay exactly the ad price
  • Fast - Book and go live instantly
  • 🎯 Simple - One click to purchase
  • 💸 No Surprises - Never worry about gas spikes

How x402 Compares

Featurex402TraditionalCoinbase Wallet
Gas Fees$0$5-15Varies
Steps13-42-3
TimeInstant30-60s15-30s
UX⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐

What You’re Signing

When MetaMask pops up, you’ll see something like:
Sign message to authorize payment

From: Your address
To: Merchant address
Amount: 9 USDC
Token: USDC on Base
This is NOT a transaction. It’s a cryptographic signature that authorizes the payment.
Always verify the amount and recipient address before signing!

Security

x402 is secure because:
  • You control the signature - No one can make you sign
  • Expiration time - Signatures expire (can’t be replayed)
  • One-time use - Each signature has a unique nonce
  • Amount locked - Can’t charge more than you approve
  • Protected from MEV - Private relay prevents frontrunning

Supported Networks

x402 works on:
  • Base (what Ad Marketplace uses)
  • ✅ Ethereum Mainnet
  • ✅ Polygon
  • ✅ Arbitrum
  • ✅ Optimism

Supported Tokens

Currently, the Ad Marketplace accepts:
  • USDC on Base - Primary payment method
More tokens coming soon! The protocol supports any ERC-20 token with permit functionality.

Common Questions

Yes! You’re signing a message, not giving unlimited access to your tokens. Each signature is for a specific amount, to a specific recipient, and expires quickly.
The x402 facilitator (run by the AnySpend network) pays the gas fees. They make this back through facilitator fees paid by merchants.
Not if you verify what you’re signing! Always check:
  • Amount matches what you expect
  • Recipient is the correct address
  • You’re on the right network (Base)
Signatures expire after a few minutes for security. If yours expires, just sign again - it’s instant and free.
No! x402 works with any Web3 wallet: MetaMask, Coinbase Wallet, WalletConnect, etc.

The Technical Term

The technical term for what you’re signing is an EIP-2612 Permit or EIP-3009 Transfer Authorization. It’s a standard way for tokens to allow approvals via signatures instead of transactions.

Try It Yourself

The best way to understand x402 is to experience it:

Buy an Ad Slot

Experience zero-gas payments firsthand
You’ll immediately see the difference - no gas fees, instant confirmation, seamless UX.

Why This Matters

x402 makes crypto payments feel like normal internet payments.
  • No waiting for confirmations
  • No worrying about gas prices
  • No multi-step approval flows
  • Just click, sign, done
This is how crypto payments should work.