Works with the AI Agents you already use

    x402 Paywall on Base: get paid per API call

    by Chelsea Hermes

    2

    Add a USDC paywall to any API on Base with x402 - and skip the six traps that cost us hours.

    $15

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    x402 Paywall on Base: get paid per API call

    x402 Paywall on Base: get paid per API call

    Example session with this skill installed

    I have a small HTTP API and I want to charge 2 cents per call in USDC on Base with x402.
    Set it up and warn me about the traps before I waste hours.

    • Read your context and instructions
    • Compiled the x402 paywall on

    Summary

    A working x402 v2 paywall on Base: unauthenticated callers get a 402 with the payment
    requirements, paid callers get their data. Cost: zero platform fees beyond the network, and
    you keep the whole 2 cents.

    CheckBeforeAfter
    Unpaid call200 (everyone)402 with accepts[]
    Paid calln/a200 + data
    Price defined innowhere1 config file, read by the router
    Price actually charged-verified: 20 000 atomic USDC = $0.02

    The traps, in the order they bite

    1. Self-payment is refused. The facilitator rejects a payment where from == to with
      self_send_not_allowed. If your test call returns 502, your service is fine - your test
      wallet is trying to pay itself. Use a separate funded wallet for tests.
    2. The price lives in four places: the route table, the config file, the pricing function
      and the status report. Forget one and the route is silently free - it still answers 200,
      which is exactly why nobody notices.
    3. v2 wants resource as an object (ResourceInfo), not a string. Send a string and the
      facilitator answers "paymentPayload is invalid" without saying which field is wrong.
    4. The 402 must carry the discovery extension with a schema that validates against its own
      info block, or the public catalog will not index you.
    5. EIP-3009: sign TransferWithAuthorization with the USDC domain (name: "USD Coin",
      version: "2", chainId 8453), a validAfter/validBefore window and a random 32-byte
      nonce. Get the domain wrong and the signature simply never validates.
    6. Confirm the settlement. Poll the transaction receipt; a 200 from your own router is not
      proof that USDC moved.

    Verification checklist (run all five before selling)

    1. curl the endpoint with no payment header → expect 402 and a readable accepts[].
    2. Read the price back from your own code (not from memory) → expect it in atomic USDC.
    3. Confirm payTo is the wallet you think it is.
    4. Pay once with a separate funded wallet → expect 200 and the data.
    5. Check the receipt on-chain: status 1, right block, right amount.

    Scope, honestly: x402 gives you per-call payment, not refunds, not subscriptions and no
    chargeback protection. Prices below the network cost per call are not worth it, and the
    catalog only lists you after a payment settles through the public facilitator.

    Next steps

    • Wire the price table to one source so a new route cannot be born free.
    • Log every settled payment with its transaction hash from day one: that log is your sales
      history, and it is the only proof you will have.

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

    About this skill

    Your API answers 200 for everyone. This skill turns it into a paid endpoint.

    x402 is the payment standard that lets an agent pay per HTTP call in USDC - no accounts, no invoices, no subscriptions. This skill takes you from a plain endpoint to a working paywall on Base: the 402 response, the payment requirements, the facilitator that verifies and settles, and the verification checklist that proves it actually charges.

    What makes it worth $15: the traps. We shipped this ourselves and paid for every one of them in hours:

    • The facilitator that refuses a self-payment ("self_send_not_allowed") - and why your test payment fails with a 502 while your service is perfectly fine.
    • The price table that lives in four places, not one: any route you forget serves free forever while looking healthy.
    • The v2 payload where resource must be an object, not a string (the error message does not tell you this).
    • The exact-response rule your schema has to satisfy for the discovery catalog to index you.
    • The EIP-3009 signature details (domain, validity window, nonce) that make the difference between "invalid payment" and a settled transaction.

    What you get: a step-by-step build, a five-point verification checklist (price, pay-to address, network, live 402, settled test transaction) and the honest scope of what x402 does not do (no refunds, no subscriptions, no chargeback protection).

    Who it is for: anyone selling data, checks or computations to AI agents, and any developer who wants to charge for an API without a Stripe account.

    Requires a separate payer wallet for testing. Does not cover infrastructure hosting or domain setup. Focuses on Base mainnet (EIP-155:8453) logic.

    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

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 2 months ago

    Permissions

    No special permissions declared or detected

    Listed2 months ago

    What's inside

    Frequently Asked Questions

    This skill provides a comprehensive implementation guide and a 5-point verification checklist to add a USDC paywall to any API on the Base network, specifically bypassing common technical errors like 'self-payment' blocks and EIP-3009 signature failures.

    This implementation uses the x402 standard, which is designed for AI agents to pay per HTTP call autonomously; it works with any agent or software capable of making standard web requests and handling blockchain transactions.

    No, this skill is specifically designed to eliminate the need for traditional payment processors like Stripe, allowing you to accept direct USDC payments on the Base network without subscriptions or accounts.

    The skill covers the setup of the 402 payment response, the settlement facilitator configuration, and the specific schema requirements needed for your API to be indexed in discovery catalogs.

    While x402 enables seamless per-call payments, it does not natively support automated refunds, recurring subscriptions, or chargeback protection, all of which are noted in the provided scope documentation.

    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.