x402 Paywall

    by Temka

    1

    Add per-call USDC paywalls (x402 v2) to any HTTP API or MCP tool: correct 402 challenges, facilitator routing, price checks, and where to list the paid endpoint.

    Free

    6 usesSecurity scanned

    Works with the AI Agents you already use

    x402 Paywall

    Example session with this skill installed

    Add a $0.002 per-call paywall to my existing FastAPI route GET /v1/dns, paid in USDC on Base mainnet.

    • Read your context and instructions
    • Compiled the x402 paywall

    A correct x402 v2 402 challenge (base64 PAYMENT-REQUIRED + JSON mirror), a verify -> serve -> settle handler, the facilitator choice with the mainnet trap called out, and listing copy for CDP Bazaar / PayAI.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Add per-call USDC payment to any HTTP API

    This skill turns a plain endpoint into an agent-payable one: the first call returns 402 Payment Required with an x402 v2 challenge, the caller signs a USDC authorization, retries with a PAYMENT-SIGNATURE header, and your server settles through a facilitator and serves the response. No accounts, no API keys, no signup on the buyer side.

    Why it is different

    Most published x402 material still describes v1 (X-PAYMENT, maxAmountRequired, network base). 98% of live registry resources already speak v2 (measured across 1000 listings on 17 Sep 2026), so paywalls copied from tutorials fail on the first call. This skill is written against the v2 specification, validated against a live Base-mainnet seller endpoint, and ships a checker that tells you exactly why a challenge is rejected.

    What you get

    • SKILL.md - the seller-side workflow: unit pricing, receiving address, the 402 challenge, verify then serve then settle ordering, receipts, replay protection.
    • references/x402-protocol-notes.md - v2 field semantics, CAIP-2 networks, facilitator routing, and the trap that breaks first deployments: x402.org/facilitator settles testnets only for EVM, so a Base-mainnet paywall pointed at it can never settle.
    • references/catalog-listing.md - where to list the paid endpoint (CDP Bazaar, PayAI, Circle Gateway) and what listing copy to use.
    • scripts/check_paywall.py - validates a live endpoint's 402 challenge: header vs body, network, USDC contract, atomic-unit price, facilitator support. Distinguishes hard failures from warnings.
    • tests/self_test.py - 8 mock cases (v2 in header, v2 body-only, v1 network label, wrong USDC contract, legacy v1, free route, POST-only route, price mismatch).

    Field-level details it carries

    Atomic-unit prices as strings, the EIP-712 extra domain, exact resource.url matching, maxTimeoutSeconds, PAYMENT-RESPONSE settlement receipts with success/errorReason, and facilitator /supported kind checks.

    Requirements

    Python 3.9+ for the checker. No packages to install, no credentials, no private keys - the skill only needs the receiving address you already control.

    Seller side only - it does not implement the buyer's wallet. Legacy v1 clients are covered by a compatibility table, not by new v1 code.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    6 uses

    Times used to date

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 2 months ago

    • Free with an Agensi account

    Accounts
    PayaiCoinbaseCircleX402

    Permissions

    Terminal / Shell
    Read Files
    Network Access

    Allowed Hosts

    facilitator.payai.network
    api.cdp.coinbase.com
    gateway-api.circle.com
    x402.org

    File Scopes

    project
    directory

    Reads project files and makes outbound HTTPS requests to the user's own API and to public x402 facilitator discovery endpoints. No writes outside the project, no credentials, no package installs.

    Listed2 months ago

    What's inside

    Frequently Asked Questions

    This skill provides the complete implementation logic and validation scripts to add x402 v2 paywalls to your APIs, allowing AI agents to pay you in USDC per request without requiring API keys or user accounts.

    Unlike v1 tutorials that often fail on modern registries, this skill is built for the v2 specification used by 98% of live resources, including updated EIP-712 domain handling and facilitator routing for Base-mainnet.

    You receive a seller-side workflow guide, protocol notes for v2 field semantics, a catalog listing guide for top AI marketplaces, and a Python-based validation script to test your live endpoint's challenges.

    The included check_paywall.py script validates your endpoint's 402 challenge, ensuring headers, network IDs, USDC contracts, and facilitator support are correctly configured before you go live.

    Yes, it is designed to work with any HTTP-based API or Model Context Protocol (MCP) tool, making your existing technical tools instantly monetizable for autonomous AI agents.

    The checker requires Python 3.9+, but no external packages, private keys, or complex credentials are needed; you only need the public receiving address where you want to collect USDC.

    New in APIs & Backend

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.

    Free