Skip to main content

What is This?

Imagine your AI agent needs to use a paid API. How does it pay automatically without you clicking “Buy Now” every time? That’s X402! It lets AI agents pay for things automatically using crypto.

Simple Analogy

Human World:
  • You want coffee ☕
  • Barista says “$5 please”
  • You pay with card 💳
  • You get coffee ✅
Agent World (X402):
  • Agent wants data 📊
  • API says “100 credits please”
  • Agent pays automatically with crypto 💰
  • Agent gets data ✅

How It Works (Step by Step)

1. Your agent asks API for data

2. API responds: "That costs 100 credits"

3. Agent automatically sends 100 credits (crypto)

4. API confirms payment received

5. API sends the data

6. Done! All automatic, no human needed ✅

Why This is Cool

Without X402:
  • Agent needs data ❌
  • Stops and waits for you ❌
  • You manually pay ❌
  • Agent continues ❌
  • Slow and annoying ❌
With X402:
  • Agent needs data ✅
  • Agent pays automatically ✅
  • Agent gets data ✅
  • All happens in seconds ✅
  • You never even notice ✅

What We’re Using Now

Base Sepolia (Test Network) Think of this as a “practice mode” for crypto payments:
  • It’s free to test (fake money)
  • Works exactly like real payments
  • Safe to experiment with
  • Uses USDC (a stable cryptocurrency)
Why Base Sepolia?
  • Fast transactions (seconds, not minutes)
  • Very cheap fees (pennies, not dollars)
  • Reliable and stable
  • Good for testing before going live

Real-World Examples

Example 1: Paid API
  • Your agent needs weather data
  • Weather API charges $0.01 per request
  • Agent automatically pays and gets data
  • You’re charged at end of month
Example 2: AI Services
  • Your agent needs image recognition
  • Image API charges $0.05 per image
  • Agent pays automatically for each image
  • No subscription needed, pay only for what you use
Example 3: Data Storage
  • Your agent needs to store files
  • Storage costs $0.001 per MB per day
  • Agent pays automatically as it stores
  • Stop storing = stop paying
Example 4: Premium Data
  • Your agent needs stock market data
  • Data feed charges $0.10 per update
  • Agent pays for each update it receives
  • Real-time payments for real-time data

What’s Coming Next

We’re working on supporting more payment options: Lightning Network (Bitcoin):
  • Super fast Bitcoin payments
  • Perfect for tiny amounts (fractions of a cent)
  • Instant confirmation
More Networks:
  • Optimism (another fast, cheap network)
  • Arbitrum (another fast, cheap network)
  • Polygon (popular for low fees)
Real Money (Mainnet):
  • Right now we’re testing with fake money
  • Soon you’ll be able to use real crypto
  • Production-ready for real businesses

Current Status

🚀 In Progress - Testing with fake money, preparing for real money

The Big Picture

Traditional Payments:
Agent needs service → Stops → Asks human → Human pays → Agent continues
⏱️ Minutes to hours
X402 Payments:
Agent needs service → Pays automatically → Gets service → Continues
⚡ Seconds

Simple Summary

What X402 Does: Lets AI agents pay for things automatically using crypto Why It’s Useful:
  • No human intervention needed
  • Pay only for what you use
  • Instant payments (seconds)
  • Works 24/7 automatically
Real Benefit: Your agents can use paid services without bothering you every time

How to Use It (Coming Soon)

from bindu import bindufy

config = {
    "author": "[email protected]",
    "name": "my_agent",
    "payment": {
        "enabled": True,
        "wallet": "your-crypto-wallet-address",
        "max_per_call": 0.10,  # Max $0.10 per API call
        "daily_limit": 10.00    # Max $10 per day
    }
}

def handler(messages):
    # Your agent can now automatically pay for APIs!
    pass

bindufy(config, handler)
Safety Features:
  • Set spending limits
  • Track all payments
  • Approve or block specific APIs
  • Get alerts for large payments

Want to Learn More?

  • Try It - Test X402 on Base Sepolia (free fake money)
  • Ask Questions - Join our Discord
  • Request Features - Need support for another payment network? Tell us!