W

Workers · Preflight

by Workers

POSTBaseSolana

$0.001

per call · USD Coin on Base

Agent Reliability Network: ARN x402 PayGuard provides x402 payment security for autonomous AI agents. Check the seller before you pay with payment preflight and payment-challenge validation. Returns ALLOW, CAUTION, or BLOCK.

Endpoint

POST https://arn-x402-payguard-payment-security.rajdeep-dutta-in.workers.dev/preflight

2

Calls / 30d

2

Unique payers / 30d

Aug 30

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://arn-x402-payguard-payment-security.rajdeep-dutta-in.workers.dev/preflight", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "intended_spend_usdc": 0.03,
    "url": "https://paid-agent.example/api"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://arn-x402-payguard-payment-security.rajdeep-dutta-in.workers.dev/preflight" \
  -H "Content-Type: application/json" \
  -d '{"intended_spend_usdc":0.03,"url":"https://paid-agent.example/api"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "authorization": {
    "mechanism": null,
    "status": "UNAVAILABLE"
  },
  "checks": {
    "asset_address_valid": true,
    "canonical_usdc": true,
    "challenge_stable": true,
    "content_type_sane": true,
    "exact_payment": true,
    "http_402": true,
    "https": true,
    "no_unsafe_redirect": true,
    "pay_to_address_valid": true,
    "pay_to_safe_receiver": true,
    "positive_amount": true,
    "reachable": true,
    "reasonable_timeout": true,
    "resource_binding": true,
    "response_size_within_limit": true,
    "structured_response_sane": true,
    "supported_network": true,
    "within_intended_spend": true,
    "x402_v2": true,
    "x402_valid": true
  },
  "decision": "ALLOW",
  "errors": [],
  "intended_spend_usdc": 0.03,
  "latency_ms": 42,
  "methodology": "live-security-v1",
  "network": "eip155:8453",
  "payTo": "0x1111111111111111111111111111111111111111",
  "payment_required": true,
  "quoted_price_atomic": "30000",
  "quoted_price_usdc": 0.03,
  "reachable": true,
  "reason_codes": [],
  "scheme": "exact",
  "simulation": {
    "failure": null,
    "status": "UNAVAILABLE"
  },
  "warnings": [],
  "x402_valid": true,
  "x402_version": 2
}

Payment details

Pay to0xa7e1fe3744e3b6d55237d95ce575cafe3b8abecd
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Solana
Schemesexact

Is this your API?

Pin it to the top of Other and the homepage with a featured placement.

Get featured →

More from Workers & similar services