80trust / 100

Commerce Purchase Preflight

by Forest Commerce in Weather & location

x402 APIPassing, checked 1 h ago

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. Base mainnet USDC

POST https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/commerce/purchase-preflight

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
84 ms typical, 119 ms slowest 5%
Last check
1 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/commerce/purchase-preflight" \
  -H "content-type: application/json" \
  -d '{"destination":{"country":"CZ","postal_code":"75701"},"quantity":1,"url":"https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/products/forest-demo-widget","variant_id":"424242"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fhttp--forest-gas-station-mainnet--lcjl27p8lmjs.code.run%2Fcommerce%2Fpurchase-preflight
const res = await pay("https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/commerce/purchase-preflight", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"destination":{"country":"CZ","postal_code":"75701"},"quantity":1,"url":"https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/products/forest-demo-widget","variant_id":"424242"}),
});
console.log(await res.json());

Example input

{
  "destination": {
    "country": "CZ",
    "postal_code": "75701"
  },
  "quantity": 1,
  "url": "https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/products/forest-demo-widget",
  "variant_id": "424242"
}

Example output

{
  "capability": "commerce.purchase-preflight",
  "data": {
    "accepted_quantity": 1,
    "blockers": [],
    "canonical_url": "example",
    "cart_possible": false,
    "cheapest_shipping": {
      "currency": "example",
      "max_delivery_date": "example",
      "min_delivery_date": "example",
      "name": "example",
      "price": 1
    },
    "checkout_possible": false,
    "checkout_url": "example",
    "currency": "example",
    "customer_session_touched": false,
    "deliverable": false,
    "delivery_checked": false,
    "delivery_requested": false,
    "item_price": 1,
    "order_not_created": true,
    "payment_not_attempted": true,
    "platform": "example",
    "provider_request_count": 0,
    "requested_quantity": 1,
    "scope": "anonymous_bounded_preflight_not_purchase_guarantee",
    "selected_variant_id": "example",
    "session_scope": "request_scoped_ephemeral",
    "shipping_option_count": 0,
    "shipping_options": [],
    "state": "ready",
    "subtotal": 1
  },
  "meta": {
    "cache": "miss",
    "checked_at": "2026-01-01T00:00:00.000Z",
    "duration_ms": 0,
    "provider": "shopify-ajax"
  },
  "ok": true,
  "version": "1"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
1 h agoPassed402154 ms$0.006
5 h agoPassed402119 ms$0.006
9 h agoPassed40240 ms$0.006
12 h agoPassed402114 ms$0.006
16 h agoPassed402116 ms$0.006
20 h agoPassed40238 ms$0.006
23 h agoPassed40238 ms$0.006
28 h agoPassed40284 ms$0.006