{"uid":"cap_pDAgIavs5F0WUqDl8ocl6","slug":"agent-payment-guard-x402-payment-firewall-policy-creator-dca3b9b0","name":"Agent Payment Guard — x402 Payment Firewall Policy Creator","description":"Machine-payable service intelligence for discovering, verifying, and monitoring identity, risk, authorization, execution-preflight, and evidence APIs before autonomous agents spend.","url":"https://base-agent-preflight.bytoken2023.workers.dev/v1/x402/payment-guard/policies","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"name":{"type":"string"},"fail_closed":{"type":"boolean"},"webhook_url":{"type":"string","format":"uri"},"allowed_tools":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"retention_days":{"type":"integer","maximum":365,"minimum":1},"allowed_domains":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"max_single_usdc":{"type":"string"},"allowed_purposes":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"daily_budget_usdc":{"type":"string"},"session_budget_usdc":{"type":"string"},"active_from_hour_utc":{"type":"integer","maximum":23,"minimum":0},"active_until_hour_utc":{"type":"integer","maximum":24,"minimum":1},"human_review_above_usdc":{"type":"string"},"reservation_ttl_seconds":{"type":"integer","maximum":3600,"minimum":30}}},"responseSchema":{"type":"json","example":{"policy":{"max_single_usdc":"0.10","daily_budget_usdc":"5.00","session_budget_usdc":"1.00"},"product":"agent-payment-guard-policy","profile_id":"policy_demo","agent_token":"agent_token_example","owner_token":"owner_token_example"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Mxuhb-4PCnY2EKqL2vPv3","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Creates a payment guard policy that enforces risk scoring, budgets, domain allowlists, human approval thresholds, and replay protection for autonomous AI-agent x402 payments.","exampleAgentPrompt":"Set up a payment guard policy called 'ProductionAgentPolicy' with a daily budget of 50 USDC, a session budget of 10 USDC, max single payment of 2 USDC, human review required above 5 USDC, only allow payments to domains api.openai.com and api.anthropic.com, fail closed if the guard is unreachable, active from hour 8 to 20 UTC, and send alerts to https://my-webhook.example.com/alerts.","exampleUseCases":null,"resultDescription":"Returns the created policy record including a policy ID, all configured enforcement parameters (budgets, domain allowlists, human-review thresholds, active hours, webhook), and audit retention settings that the payment guard will apply to subsequent x402 agent transactions.","failureModes":["Invalid USDC amount strings (non-numeric or negative values) cause 400 Bad Request","Malformed webhook URL returns validation error","active_from_hour_utc or active_until_hour_utc outside 0-23 range causes 422 error","Missing required policy name returns 400","Duplicate policy name may return 409 Conflict","Service unavailable on Cloudflare Workers edge returns 503","Authentication/authorization failure returns 401 or 403"],"whenToPreferThis":"Use this endpoint when you need to create a new governance policy for AI-agent autonomous payments using the x402 protocol — specifically when you need budget caps, domain allowlists, human-in-the-loop approval triggers, replay protection, and webhook-based auditing configured as a reusable policy object. Prefer this over ad-hoc transaction checks when you want persistent, named policy enforcement across multiple agent sessions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:33:56.561Z","isFirstParty":false}