# X402 Integration

> Add x402 pay-per-call USDC payments to HTTP APIs without requiring user accounts or subscriptions.

X402 Integration is a paid AI agent skill on Agensi by Khristian Kopachelli, in Web3 & Crypto. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $15 (one-time purchase)
- Creator: [Khristian Kopachelli](https://www.agensi.io/creators/khristian-kopachelli)
- Category: [Web3 & Crypto](https://www.agensi.io/skills/web3-crypto)
- Version: 1.0
- Last updated: 2026-11-29
- Security: scan passed (2026-11-29); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/x402-integration
- Tags: api, web3, monetization, usdc, evm

## About this skill

API monetization is often blocked by the friction of accounts, credit cards, and subscription tiers. This skill implements the x402 protocol to enable pay-per-call HTTP payments using USDC on EVM networks.

### What it does
- **Protocol implementation** enables the HTTP 402 Payment Required flow for any REST endpoint.
- **EIP-712 signing** configures secure authorization payloads for client-side payment execution.
- **Multi-network support** structures payment acceptance across Base, Polygon, Arbitrum, and World Chain.
- **Idempotency logic** prevents double-charging by implementing payment hash caching and response replays.
- **Facilitator integration** connects endpoints to Coinbase CDP or self-hosted settlement facilitators.

### How it works
1. **Define assets** by selecting the network, USDC atomic units, and price granularity for your endpoints.
2. **Configure middleware** using `@x402/express`, `@x402/hono`, or `@x402/next` to handle the 402 response body.
3. **Implement storage** for settlement hashes to ensure exactly-once execution.
4. **Deploy client** wrappers using `@x402/fetch` to allow agents and automated callers to pay automatically.

### Frameworks & tools
The skill supports Express, Hono, Next.js, and Cloudflare Workers. It utilizes the `@x402/evm` and `@x402/fetch` libraries for EIP-712 signing and request wrapping.

### Why this beats prompting it yourself
Handling the 402 response body manually often leads to malformed `accepts` entries that clients cannot parse. This skill enforces the exact EIP-712 payload structure and idempotency guards required to prevent payment failures or double-billing.

### Use cases
- **Monetize AI agents** by charging small amounts of USDC per inference or data request.
- **Protect expensive APIs** from scraping by requiring a micro-payment for high-value data.
- **Accountless billing** for services where you want to avoid managing user databases or passwords.
- **Cross-chain payments** allowing clients on different L2s to access a single service.

### Known limitations
Requires an external facilitator like Coinbase CDP for settlement. Only supports EVM-compatible networks and assets.

## Requires

Nothing beyond your AI agent.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the X402 Integration skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill solve the friction of traditional API monetization?

The X402 Integration implements a standardized HTTP 402 "Payment Required" flow, allowing you to charge micro-payments in USDC per API call. This eliminates the need for user accounts, credit cards, or complex subscription tiers, making it ideal for autonomous agents.

### Which AI agents and frameworks are compatible with this integration?

This skill is designed for programmatic callers and supports any AI agent or application using `@x402/fetch` or compatible request wrappers. It integrates seamlessly with popular web frameworks like Express, Hono, Next.js, and Cloudflare Workers.

### What exactly is included in the X402 Integration package?

You will receive the pre-configured middleware logic, EIP-712 signing configurations for secure authorization, and the idempotency handling patterns required to prevent double-charging. It also includes the setup structures for connecting to settlement facilitators like Coinbase CDP.

### Which blockchain networks and currencies are supported for payments?

The integration handles payment acceptance across major EVM-compatible Layer 2 networks, including Base, Polygon, Arbitrum, and World Chain. This allows you to accept USDC from clients regardless of which of these supported networks they are using.

### How does the skill prevent users from being double-charged?

The skill includes specialized idempotency logic that caches payment hashes and handles response replays. This ensures that if a network glitch occurs after a payment is sent, the client isn't charged a second time for the same request.

### Do I need any third-party services to make this work?

You will need an external settlement facilitator, such as Coinbase CDP or a self-hosted alternative, to process the actual on-chain transactions. The skill manages the protocol and communication between your API and the facilitator but does not act as the wallet or liquidator itself.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
