X402 Preflight
Inspect whether a public HTTP endpoint requires x402 payment and normalize the advertised PaymentRequired terms before a buyer decides to call it. Reports payment requirement metadata only; it never signs, pays or executes the protected operation.
Forest exposes this capability as a deterministic machine-readable API for software agents. Discovery is free; execution uses the canonical paid endpoint below. The live x402 challenge is the source of truth for payment terms.
$0.002 / callPOST /x402/preflightx402 · Base
Typical agent tasks
This capability is intended for bounded machine decisions such as:
- inspect x402 payment requirements for an API endpoint before calling it
- check whether an HTTP resource is protected by x402 payment
- read network asset amount and receiver terms from an x402 challenge
- preflight a machine-payable endpoint without signing or paying
What Forest guarantees
- bounded normalized public-source lookup
Boundaries
- provider-specific guarantees
- unpublished facts
Machine contract
The request and response schemas are published in the canonical OpenAPI document. This page shows a representative input from the same production manifest.
Input example
{
"url": "https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/fixtures/x402"
}
Canonical paid endpoint
https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/x402/preflight
Related capabilities
- X402 Discover — Discover machine-payable x402 services for a task by searching Bazaar resource metadata and returning normalized candidate endpoints, capabilities and payment-discovery facts. This is service/resource discovery only; it does not invoke or pay the discovered endpoint.
- Automation Preflight — Preflight one public Apify Actor before a paid automation run using only public Store and default-build OpenAPI metadata. Forest checks agentic-payment eligibility, pricing/budget signals and top-level input compatibility without starting an Actor, buying credit, authenticating or making an external payment.
- Chain Gas-snapshot — Return one bounded current EVM fee-history snapshot for a fixed supported chain using SolidRPC public JSON-RPC. Forest reports recent base-fee and latest sampled-block priority-fee percentile evidence only; it does not estimate a caller transaction gas limit, simulate, sign or broadcast a transaction, access a wallet, choose a transaction fee for the caller or guarantee an optimal fee.
- Commerce Purchase-preflight — Combine public product resolution, one fresh isolated anonymous cart, optional delivery lookup and checkout handoff evidence into one bounded purchase preflight. Shopify Ajax and WooCommerce Store API are supported; Forest never logs in, touches a customer session, creates an order or attempts payment.
- Container Pull-preflight — Preflight one anonymously readable OCI image for a requested target platform before pull or deploy. Forest resolves the supplied tag once, selects one exact multi-arch child manifest when possible, reports that immutable manifest declared config/layer size, and checks bounded OCI referrer presence. No layers are downloaded and referrer presence is never treated as signature, SBOM, attestation or vulnerability verification.
- Cors Preflight — Send exactly one bounded non-credentialed browser-style CORS OPTIONS preflight to the supplied public URL and normalize the observed Access-Control-Allow-* response into origin, method and header decisions. Redirects are not followed, so the result describes the exact resource URL. Forest does not send cookies or Authorization, invoke the requested resource afterward, run JavaScript, or guarantee browser/runtime success beyond the observed response.