x402-agent-payments-guide

Enable HTTP-native micropayments for AI agents via 402-challenge and EIP-712 signed headers.

5|Updated May 2, 2026
One-click install
npx skills add https://github.com/nirholas/three-ui --skill x402-agent-payments-guide
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: x402-agent-payments-guide
Source: https://github.com/nirholas/three-ui/tree/main/data/skills/protocol/x402-agent-payments-guide
Command: npx skills add https://github.com/nirholas/three-ui --skill x402-agent-payments-guide

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

x402 solves the problem of how AI agents reliably pay for HTTP-accessible services without requiring API keys or subscription setups.

Core Features & Use Cases

  • HTTP-native micropayments: Agents pay for endpoints using an HTTP 402 Payment Required challenge/response flow.
  • Signed payment authorizations (EIP-712): Each request includes an X-402-Payment header carrying an EIP-712 signature to prove intent and prevent tampering.
  • Server-side verification & conditional serving: Servers verify signatures and only serve premium content when payments are valid.
  • On-chain settlement, batched for efficiency: Payments settle on-chain after validation, improving trust and auditability.

Use case: An agent requests market data from a paid endpoint; the server replies with pricing, the agent signs and retries with X-402-Payment, and the server serves the result only after verifying the authorization.

Quick Start

Use the x402 protocol flow by having your paid server respond with 402 and validate the incoming EIP-712 signed X-402-Payment header before serving the requested resource.

Frequently Asked Questions about x402-agent-payments-guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do AI agents pay for HTTP endpoints without API keys?

AI agents pay for HTTP endpoints without API keys using a 402 Payment Required challenge flow, responding with an X-402-Payment header containing an EIP-712 signed authorization for stablecoin settlement.

What is the HTTP 402 challenge and response flow for micropayments?

The HTTP 402 flow involves a paid server rejecting initial requests with a 402 Payment Required status and pricing, prompting the agent to sign an EIP-712 authorization and retry with an X-402-Payment header for server verification.

How do I verify EIP-712 signed payment headers for agent-to-server transactions?

Servers verify EIP-712 signed payment headers by validating the X-402-Payment header fields including sender, amount, token, chain, nonce, and expiry before serving premium content or enabling paid tool invocations.

Can I batch on-chain settlements for stablecoin micropayments?

Yes, stablecoin micropayments support on-chain settlement batching after server-side EIP-712 signature verification, improving transaction trust, auditability, and efficiency for multiple agent-to-server payments.

Does the X-402-Payment protocol work for premium data access and paywalled content?

Yes, the X-402-Payment protocol supports agent-to-server scenarios including premium data access, paid tool invocations, and paywalled content retrieval across supported stablecoins and blockchain networks.