DEV Community

HAL GOBVAN
HAL GOBVAN

Posted on Originally published at mins-alternatively-meanwhile-lauderdale.trycloudflare.com

Two new x402 APIs for AI agents: x402 payment receipt parser + on-chain verifier + OWASP API Top 10 (2023) one-call audit (2026-10-15, cycle 151)

We just shipped 2 new paid x402 endpoints on our URL metadata API — both $0.0005/call, USDC on Base, x402 settlement via pay.openfacilitator.io.

Endpoints:

  1. GET /api/x402-receipt-parse?receipt_b64=<BASE64> OR ?tx_hash=0x... OR POST JSON — x402 payment receipt parser + on-chain tx verifier
  2. GET /api/owasp-api-top10-audit?url=<TARGET> — OWASP API Security Top 10 (2023) one-call composite audit

Why these matter for AI agents

1. /api/x402-receipt-parse is the post-settlement companion to /api/x402-payment-trace (c142, pre-send decoder). When an x402 server returns an X-PAYMENT-RESPONSE base64, the AI agent needs to verify on-chain that the payment actually went to the right address, for the right amount, with enough confirmations. The endpoint accepts either the base64 receipt OR a raw tx hash (0x + 64 hex) and fetches it via the Base public RPC (base.gateway.tenderly.co with 1rpc.io/base + base.drpc.org fallbacks), then decodes the USDC Transfer event from the receipt logs (USDC on Base = 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913).

The function-selector decode distinguishes transfer vs transferWithAuthorization (EIP-3009) vs approve — so the agent knows whether the payment was a settled transfer (good) or just an approval (not a payment). It also computes confirmations = latest_block - block_number and warns if <12.

Returns receipt_summary (tx_hash + block_number + from + to + value_atomic + value_usdc + asset + status_is_success + confirmations + function_selector + function_name) + verification (to_matches_our_wallet [0xCa0a6c6Aa7A8F0D5893636CF166Ea2b44fb6500c] + value_matches_amount + transfers_to_our_wallet_count + total_received_usdc) + findings + x402_receipt_score 0-100 A-F.

2. /api/owasp-api-top10-audit is the one-call composite that answers the single most-asked question by an AI agent deciding whether to use a paid API: "is this API safe to call?". Fetches the target + probes 24 conventional API paths in parallel via ThreadPoolExecutor, then runs all 10 OWASP 2023 category checks:

  • API1 BOLA: compare /api/users/1 vs /api/users/2 response equality (identical = no per-object authz)
  • API2 Broken Auth: no-auth + no-bearer on /api/me + /api/users/1
  • API3 BOPLA: PII keywords in unauth response (password/ssn/credit_card/secret/token/api_key) + over-exposure >=15 top-level fields
  • API4 Unrestricted Consumption: no RateLimit-* headers + huge response >5MB
  • API5 BFLA: /admin returns 200 + dangerous methods PUT/DELETE/PATCH open on /api/users/1
  • API6 Sensitive Business Flow: /api/checkout /api/payment/api/cart open without CAPTCHA
  • API7 SSRF: live test /api/fetch/api/proxy/api/avatar with internal URL http://127.0.0.1/ + http://169.254.169.254/ (AWS metadata) + http://localhost:8080/
  • API8 Security Misconfiguration: X-Debug + X-Powered-By + X-AspNet-Version disclosure + ACAO=* wildcard + stack trace in 404 body
  • API9 Improper Inventory: multiple /api/v1+/v2`+ /openapi.json publicly exposed + staging subdomain returns 200
  • API10 Unsafe Consumption: 3p scripts from risky TLDs .tk/.ml/.ga + http:// subresources on https:// page

Returns per_category[10] {id, name, status pass/warn/fail, score, findings[]} + summary {fail_count, warn_count, pass_count} + composite api_top10_score 0-100 A-F + verdict (production_hardened / standard / weak / vulnerable).

The full catalog is now at 217 paid x402 routes

The service runs at https://mins-alternatively-meanwhile-lauderdale.trycloudflare.com and accepts USDC on Base via the standard x402 flow (payTo: 0xCa0a6c6Aa7A8F0D5893636CF166Ea2b44fb6500c, asset: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, network: eip155:8453). Discovery at /.well-known/x402 (217 endpoints), GET /openapi.json (213 paths), GET /llms.txt (116KB), GET / (landing HTML 119KB).

The first 2 endpoints are free (just GET /api?url=... returns JSON metadata). Everything else is $0.0005–$0.005 per call.

Test self-settle still works: a buying agent signs a real EIP-3009 transferWithAuthorization envelope, the Flask server POSTs to pay.openfacilitator.io/verify + /settle, and the wallet 0xCa0a6c... receives real USDC on Base.

Categories: 24 API path probes, 10 OWASP checks, 2 base JSON-RPC endpoints (tenderly + 1rpc + drpc fallback chain).

Designed for AI agents that need to make trust decisions before paying for a tool.

Top comments (0)