Top Builders

Explore the top contributors showcasing the highest number of app submissions within our community.

x402

x402 is a payment protocol that unlocks HTTP 402 Payment Required, turning it into a working payment system for AI agents and applications. The protocol enables programmatic, autonomous payments without requiring accounts, credit cards, or manual human intervention. Built on EIP-3009 (transferWithAuthorization), x402 allows AI agents to discover services, understand pricing, sign payment authorizations, and pay for API access—all automatically through HTTP requests and responses.

The protocol is designed for machine-to-machine payments, making it ideal for AI agents that need to pay for API access, data services, or computational resources. With x402, payments are as simple as an HTTP request: when an agent requests a paid resource, the server responds with HTTP 402 and payment instructions. The agent then signs a payment payload, retries the request with an X-PAYMENT header, and receives the resource—all without human intervention.

General
Release date2024
AuthorCoinbase
Documentationx402 Documentation
RepositoryGitHub
TypePayment Protocol

Start building with x402

x402 makes payments HTTP-native, enabling AI agents to autonomously discover and pay for services. The protocol supports gasless payments through facilitators, works with any EIP-3009 token (USDC by default), and provides SDKs for popular frameworks like Express and Axios. Whether you're building a paid API service or an AI agent that needs to purchase resources, x402 simplifies the payment flow into standard HTTP requests and responses. Check out the community-built x402 use cases and applications to see what others are building.

x402 Tutorials


x402 Resources

Essential resources to help you get started with x402:


x402 Libraries and SDKs

Official and community libraries for integrating x402 into your applications:

  • @x402/core - Core x402 protocol types and utilities
  • @x402/express - Express middleware for x402 payments
  • @x402/axios - Axios interceptor for automatic payment handling
  • @x402/evm - EVM-specific payment schemes (EIP-3009 support)

x402 Integrations

Connect x402 with your favorite frameworks and tools:

  • Express.js: Use @x402/express middleware to protect API endpoints with payment requirements
  • Axios: Use @x402/axios to automatically handle 402 responses and payment flows in client applications
  • React: Build React applications that automatically pay for API access using x402
  • Node.js: Integrate x402 into any Node.js application for server-side payment processing

x402 Features

Key features that make x402 powerful for AI-to-AI payments:

  • HTTP-Native: Payments work through standard HTTP requests and responses
  • Gasless Payments: Facilitators sponsor gas fees, making payments seamless
  • No Accounts Required: Payments work with crypto wallets, no account creation needed
  • Autonomous: AI agents can discover, understand pricing, and pay without human intervention
  • Universal Compatibility: Works with any EIP-3009 token (USDC by default)
  • Framework Support: SDKs available for Express, Axios, and more

Coinbase x402 AI technology Hackathon projects

Discover innovative solutions crafted with Coinbase x402 AI technology, developed by our community members during our engaging hackathons.

x402 Bazaar Agent

x402 Bazaar Agent

Today's AI agents hit a wall the moment they need data behind a paywall. The x402 Bazaar Agent tears that wall down. The agent takes a plain-English question, searches a catalog of 42 premium endpoints across 17 domains using Gemini semantic embeddings, selects the cheapest APIs that can answer, pays for each call via x402 micropayments on Base Sepolia, and composes a cited final answer — no human in the loop. DISCOVER — Gemini text-embedding-005 indexes the catalog at startup. Queries rank by cosine similarity; entries below a relevance floor return zero results, giving the agent a clean stop signal rather than hallucinated answers. PAY — The x402 HTTP client intercepts the 402 response, signs a USDC micropayment with an EVM wallet, and retries. The LLM never sees the payment handshake. VERIFY — After every paid call, an independent Gemini Flash model judges whether the response served the stated purpose. Off-topic data is flagged before the reasoning model builds on it. COMPOSE — Gemini 2.5 Pro weaves results across endpoints and domains into a cited answer. Demo: "Will container ALPHA-99 arrive at Genoa on time?" triggers three paid calls — container ETA, port congestion, marine weather — producing a synthesized delay forecast. Guardrails prevent runaway behavior: hard budget cap, empty-search streak, no-progress streak, duplicate-call detection, and an iteration backstop. The catalog mirrors the real Coinbase Bazaar's discovery schema exactly — switching to the live Bazaar is one function change. All 42 endpoints have mock fallbacks so the demo works with zero mandatory signups. The browser UI streams every agent action live.

Mai - Agentic commerce for Fashion

Mai - Agentic commerce for Fashion

Have you bought an outfit that looked great in-store but fell flat at the event? Have you scrolled through page after page of product grids, overwhelmed by options and filters that don't actually understand what you're looking for? Online shopping hasn't fundamentally changed in twenty years. Since the early 2000s, the experience has been the same one-sided transaction: browse a grid, filter by size, add to cart, checkout. You still can't bring your closet. Mai is that shift — from e-commerce to a-commerce. You bring your wardrobe, body, and style into the conversation. This makes online more powerful than in-store — you can't carry your closet to a physical shop, but with Mai you can. Visualize how new pieces work with what you already own. How it works: Upload a portrait. Your AI stylist builds your Style DNA: silhouettes, palettes, style eras & fabrics. Every product is scored across five categories against your profile. Only what genuinely fits you is shown, with transparent reasoning. Try before you buy: Generate try-on images and outfit videos via Veo — in any environment you choose. Pin a location (a restaurant, office, or wedding venue) on Maps and Mai pulls real imagery of that place, then shows you wearing the outfit there. Outfits, not items: Your cart is analyzed as a complete outfit across six categories. The agent proactively detects gaps ("jacket and pants but no shoes") and finds what completes it. Built on a multi-agent architecture with open protocols (A2A, UCP): a client agent represents you, a merchant agent the seller. Payments (via AP2): human-present checkout with cryptographic challenge-response, and human-not-present mandates that let the agent autonomously purchase Wishlist items within spending limits you set. Mai is hyper-personalization for fashion. Shifting fashion retail from CRM to CAM — Customer Aura Management: understanding how you feel about what you wear, what makes you confident, and what would actually work for your life.

TrapLedger

TrapLedger

Autonomous AI agents are increasingly capable of initiating real payments on behalf of users and enterprises. TrapLedger exists to answer a critical question no one is asking yet: what governs an agent's payment before the wallet signs? TrapLedger sits between an Agent Client and a Paid Resource. When an agent initiates a Payment Attempt, TrapLedger first fetches a Payment Challenge (x402-shaped 402 response) from the target resource, then applies a deterministic Policy Set, destination allowlist, maximum spend limits, sensitive data blocklist, and prompt injection detection — before any Payment Proof is created. An optional Gemini Classifier produces Intent Signals that provide human-readable reasoning for the Policy Decision. Critically, the LLM never overrides deterministic policy, it explains, not decides. Every Payment Attempt, whether allowed or blocked, creates an Audit Event with the full enforcement trace: challenge, decision, reasons, and signing outcome. Blocked attempts expose the x402-shaped Payment Challenge and all block reasons, but no Payment Proof is ever created. The MVP is intentionally simulated, no real wallet signing, facilitator calls, or testnet transactions. Instead, it draws a clear X402 Payment Adapter boundary showing exactly where signing would happen, with inspectable simulated PAYMENT-SIGNATURE and PaymentPayload evidence for allowed attempts. Built with FastAPI (Python), Gemini API for intent classification, and a Guided Enforcement Replay UI, a step-by-step walkthrough of one approved and one blocked canonical Payment Attempt that advances manually so the enforcement boundary is impossible to miss.