Skip to main content

Overview

0xmeta is an x402-compliant payment facilitator that enables gasless payments on Base networks using EIP-3009 with pre-settlement fee collection.
Pre-Settlement Fees: The facilitator collects a $0.01 fee from your pre-approved USDC balance BEFORE executing the settlement. Customer payments then go directly to your address. No fee collection = no settlement.

What You Need

1

Your Merchant Address

An Ethereum address where you’ll receive customer payments
2

USDC for Fees

~100 USDC for facilitator fees (covers ~10,000 settlements)
3

ETH for Gas

~0.001 ETH for one-time approval transaction

Three-Step Setup

Step 1: Approve Facilitator

The facilitator collects fees from your USDC balance via transferFrom before executing settlements. This requires one-time approval:
What this does:
Script: See approve-facilitator.mjs
Expected: Approval of 100 USDC = 10,000 settlements

Step 2: Setup Server

Install x402 middleware and configure with YOUR merchant address:
Critical: Use YOUR merchant address in payTo, not the facilitator treasury. Customer payments must go directly to you.

Step 3: Start Server

Your server is now accepting x402 payments! 🎉

Payment Flow

Key Points:
  • ✅ Facilitator collects $0.01 fee from merchant’s approved balance FIRST
  • Then executes customer → merchant payment ($0.02)
  • ✅ Client authorizes payment to YOUR address
  • ✅ You receive 100% of customer payment
  • ✅ No facilitator custody of customer funds
  • ⚠️ If fee collection fails, settlement is blocked (no free rides)

Network Configuration

Base Sepolia (Testnet)

Base Mainnet (Production)


Testing

Get Testnet Assets

Base Sepolia ETH

Free testnet ETH

Base Sepolia USDC

Free testnet USDC

Test Payment Flow

Expected flow:

Monitoring

Check Remaining Settlements

Script: See check-allowance.mjs

Top Up When Low


Production Deployment

Switch to Base Mainnet

Run Approval on Mainnet

Production checklist:
  • ✅ Tested on Sepolia thoroughly
  • ✅ Approved USDC on mainnet
  • ✅ Verified merchant address receives payments
  • ✅ Monitoring setup for allowance
  • ✅ Private keys secured

Common Issues

Cause: You haven’t approved facilitatorSolution:
Cause: Wrong address in payToSolution: Verify you’re using YOUR merchant address (not treasury):
Causes:
  • Insufficient USDC balance for fees
  • Insufficient allowance
  • Authorization expired
  • Nonce already used
Solution: Check facilitator error response for specific reason

Next Steps

Complete Guide

Full setup documentation

Architecture

Understand pre-settlement fee collection

x402 Integration

Both v1 and v2 examples

API Reference

Explore endpoints
You’re ready! Approve facilitator, configure your server with YOUR address, and start accepting payments.