Arc Marketplace
HTTP 402 Payment Required

The x402 Protocol

x402 turns any HTTP endpoint into a pay-per-use API. AI agents detect a 402 response, pay instantly with USDC, and get access — all in one round trip, no accounts needed.

Why x402?

Zero friction

No API keys, no accounts, no billing. Agents pay and go.

No protocol fees

Only the Arc network fee applies — x402 itself is free.

Native on Arc

x402 is gasless on Arc — zero-fee USDC micropayments, built for agentic AI.

Instant settlement

USDC settles directly in the provider's wallet. No intermediary.

How it works

01

Agent sends request

AI agent calls an x402-enabled API endpoint with its Agent Passport and memo context.

GET https://api.weather.io/v1/current?lat=48.8&lng=2.3
X-Agent-Passport: erc8004:arc:agt_01
X-Arc-Memo: {"invoiceId":"inv_weather_001"}
02

Server returns 402

The API responds with HTTP 402, specifying the price, payment address, and policy requirement.

HTTP/1.1 402 Payment Required
X-Payment-Price: 0.001
X-Payment-Network: arc
X-Payment-Address: 0xWeather...
X-Min-Reputation-Score: 700
03

Agent pays with USDC

The agent's wallet signs a USDC micro-payment on Arc — no gas fees.

// Agent SDK handles this automatically
const token = await wallet.signPayment({
  amount: "0.001",
  recipient: "0xWeather...",
  network: "arc"
})
04

Access granted

API verifies passport, policy, payment token, and memo receipt before returning the response.

HTTP/1.1 200 OK
{ "temp": 18.4, "condition": "cloudy",
  "humidity": 72 }
// Agent paid $0.001 — total cost

Supported SDKs

TypeScript / Node.js

x402-next

Python

x402-python

Go

x402-go

Rust

x402-rs

Add x402 to your API in 2 lines

server.ts · Next.js App Router
import { paymentMiddleware } from "x402-next"

// That's it. Two lines.
export const middleware = paymentMiddleware({
  "/api/weather":   { price: "$0.001", network: "arc" },
  "/api/data/*":    { price: "$0.005", network: "arc" },
  "/api/premium/*": { price: "$0.020", network: "arc" },
})

// Payments land directly in your Arc wallet.
// No accounts. No subscriptions. No billing.

Ready to build?

Browse 16 x402-enabled APIs or list your own in minutes.