Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    x402 Paywall on Base: get paid per API call

    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

    30-day refund 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
    • Generated the document

    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.

    x402-paywall-on-base-get-paid-per-api-ca.pdf

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

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

    What you get

    Monetize API endpoints for autonomous AI agent access.Implement micro-payments for high-compute backend tasks.Eliminate subscription overhead for infrequent API users.Automate payment verification via on-chain settlement facilitators.

    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.

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 8 days ago

    • Passed all security checks, Safe to install

    Listed8 days ago

    What's inside

    Frequently Asked Questions