Agentic payments · x402 · HTTP 402 · Base USDC

Agentic payments, checked before your agent pays

x402 Preflight is ScriptMasterLabs' read-only gateway for agentic payments: it discovers x402 paid APIs and inspects payment requirements through the MCP tools sml_discover, sml_status and x402_contract. It never signs, spends or settles — that read-only boundary is verified in the page's claim receipts as of 2026-09-30.

Agentic payments are payments an AI agent makes itself, usually one small payment per API request, inside limits a person set. x402 turns the HTTP 402 Payment Required status code into a machine-readable price tag, so any API can charge per request. x402 Preflight (runtime name: x402 Gateway) finds x402 paid APIs and reads their live payment terms so your agent can decide before it pays. It is read-only: it never signs, spends or settles.

What are the five states of an agentic payment?

The five states are Discovered, Challenged, Authorized, Settled and Accepted — from the agent finding a paid API to the paid-for output arriving and meeting the job’s rule.

StateWhat happensWhat it does not prove
1. DiscoveredThe agent finds a paid API that can do the job.A listing is not proof the API works.
2. ChallengedThe API answers HTTP 402 with a PAYMENT-REQUIRED header: amount, network, asset, receiver.An offer, not a payment.
3. AuthorizedThe agent's wallet signs a payment for exactly those terms and retries with PAYMENT-SIGNATURE.A signature is not settlement.
4. SettledUSDC moves on-chain; the response carries PAYMENT-RESPONSE with the transaction.Verify it on the chain, not from the seller's word.
5. AcceptedThe output that was paid for arrived and meets the job's rule.This is when the agent got what it paid for.

x402 Preflight works in states 1 and 2, before any money moves. Everything after that stays under the caller's control.

What HTTP 402 looks like in practice

This is the real challenge returned on 2026-09-30 by the SCRIPTMASTERLABS URL to Markdown API, decoded from its PAYMENT-REQUIRED header:

curl -i 'https://squeezeos-api.onrender.com/api/web/read-markdown?url=https%3A%2F%2Fexample.com'
HTTP/2 402
PAYMENT-REQUIRED: (base64, decoded below)

{
  "x402Version": 2,
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "1000",
      "payTo": "0x5bbd32e0478e49a7540ef2d760e0b0f9aa6328b2",
      "maxTimeoutSeconds": 120,
      "extra": {
        "name": "USD Coin",
        "version": "2"
      }
    }
  ]
}

Read it as: pay 1000 atomic units = 0.001 USDC on Base mainnet to 0xc291…dc46 using the exact scheme, within 120 seconds.

What your agent should check before it pays

Your agent should check the amount, network, asset, receiver and resource against its own per-call and per-session limits before it pays.

CheckQuestion
AmountIs it within the per-call and per-session limits you set?
NetworkIs it the chain your wallet actually pays on?
AssetIs it the real USDC contract on that chain, not a look-alike token?
ReceiverIs the payTo address the provider you meant to pay?
ResourceIs the challenge for the exact request you are making?
ProviderIs there evidence the provider delivers? Use TrustBeforePay.

How do you connect x402 Preflight to your agent?

Connect through the remote MCP endpoint, the npm package @scriptmasterlabs/mcp-x402@2.1.11, the published source, the API directory, or the discovery endpoint.

Remote MCP: https://mcp-x402.onrender.com/mcp
npm:        @scriptmasterlabs/mcp-x402@2.1.11
Source:     https://gitlab.com/timothy.walton45/sml-portfolio/-/tree/main/mcp-x402
Directory:  https://scriptmasterlabs.com/x402-usdc-api-directory
Discovery:  https://squeezeos-api.onrender.com/.well-known/x402
ToolWhat it does
sml_discoverDiscover x402 paid APIs and current SCRIPTMASTERLABS capabilities. No payment is executed.
sml_statusCheck gateway health and the canonical Base/USDC identity.
x402_contractExplain how to resolve fresh payment requirements from the target before a caller-authorized call.

Call tools/list for the live inventory; the running server is the authority, not this page.

What x402 Preflight will not do

It will not sign with a wallet, pick a budget for you, turn a search result into permission to spend, or treat a cached price as final. Finding an endpoint does not prove the provider is trustworthy; use TrustBeforePay for provider evidence before spending.

Already know the job?

Go straight to the product: URL to Markdown API, Web Scraping API, Stock Quote API, Market Data Verification API or Web Research API. Use x402 Preflight when the job is finding and inspecting paid services.

What questions come up most often?

The FAQs answer what agentic payments are and what x402 is.

What are agentic payments?

Agentic payments are payments an AI agent makes itself, usually one small payment per API request, inside spending limits a person or business has set.

What is x402?

x402 is an open protocol that uses the HTTP 402 Payment Required status code so an API can charge per request. The API answers with its payment terms, the client signs a stablecoin payment, and retries the request with that payment attached.

What does HTTP 402 Payment Required mean?

HTTP 402 is the status code a server returns when a request needs payment. In x402 it carries a PAYMENT-REQUIRED header listing the amount, network, asset and receiver. A 402 response is an offer, not a payment.

Does x402 Preflight spend money?

No. x402 Preflight is read-only. It discovers x402 paid APIs and inspects their payment requirements. It never signs, spends or settles; the caller keeps its wallet and spending policy.

Which network and asset do SCRIPTMASTERLABS paid APIs use?

SCRIPTMASTERLABS paid APIs use x402 v2 on Base mainnet (eip155:8453) with USDC. Each target's fresh PAYMENT-REQUIRED challenge is the final authority on exact terms.

How does an agent know a payment actually worked?

A 402 challenge is not payment and a signature is not settlement. The payment is complete when settlement is verifiable on-chain and the requested output was delivered and accepted.

Go deeper: How to monetize MCP tools with x402 · Agentic Payments Field Guide (PDF) · Agent API Evidence hub · SCRIPTMASTERLABS stack

Claim receipts

Each factual claim on this page, where its evidence lives, and when it was checked.

ClaimEvidenceVerified
x402 Preflight is read-only: it discovers x402 paid APIs and inspects payment requirements; it never signs, spends or settles.Evidence2026-09-30
x402 Preflight exposes the MCP tools sml_discover, sml_status and x402_contract.Evidence2026-09-30
The published npm package is @scriptmasterlabs/mcp-x402 version 2.1.11.Evidence2026-09-30
The SCRIPTMASTERLABS URL to Markdown endpoint returned HTTP 402 with scheme exact, Base mainnet, USDC, amount 1000 (0.001 USDC).Evidence2026-09-30

SCRIPTMASTERLABS · READ · EXPLORE · VERIFY · EARN

Books, free tools, sources & affiliate opportunities