X402

Implement HTTP 402 payment requirements for API access with crypto payments.

Updated May 1, 2026
One-click install
npx skills add https://github.com/wmb81321/p2pai --skill x402-wmb81321
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: X402
Source: https://github.com/wmb81321/p2pai/tree/main/.agents/skills/x402
Command: npx skills add https://github.com/wmb81321/p2pai --skill x402-wmb81321

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Building paid APIs and AI-assisted services that require users to pay for access, without cumbersome onboarding or accounts, by integrating HTTP 402 payment requirements into service endpoints.

Core Features & Use Cases

  • Enables HTTP 402 Payment Required flows to gate API access and services.
  • Supports crypto-native payments on Base and Solana networks with cross-network identifiers.
  • Enables discovery and integration via Bazaar for dynamic paid-service endpoints and MCP tool usage.

Quick Start

Configure your API to return a 402 Payment Required response for unpaid requests and test with a signed payment workflow.

Frequently Asked Questions about X402

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

FAQPage Schema
How do I implement HTTP 402 Payment Required flows for crypto-native API access?

You can gate API access by configuring endpoints to return a 402 Payment Required response for unpaid requests. This enables instant crypto payments on Base and Solana without requiring user accounts.

What is the HTTP 402 protocol and how does it handle crypto payments?

The HTTP 402 protocol gates API access by requiring payment via HTTP headers. It supports crypto-native payments on Base and Solana, utilizing facilitators or local verification to process secure transactions.

How do I integrate Solana and Base network payments into my paid API?

You can integrate Solana and Base network payments by utilizing the defined payment headers and schemes. The skill supports cross-network identifiers to facilitate secure, crypto-native API access.

Can I use Bazaar for dynamic discovery of paid API endpoints?

Yes, Bazaar enables discovery and integration for dynamic paid-service endpoints. It allows clients to find your HTTP 402 gated APIs and facilitates MCP tool usage for accessing paid services.

Do I need user accounts to monetize my API endpoints with crypto?

No, you do not need user accounts to monetize your API endpoints. The HTTP 402 mechanism enables secure, zero-account API payments by returning a 402 response for unpaid requests.