{"uid":"cap_66Hqtic0nYDY2t0Y4maV0","slug":"payment-policy-decision-api-1dc04a2a","name":"Payment Policy Decision API","description":"Preflight an x402 payment before an autonomous agent signs it. Checks resource binding, method, scheme, network, asset, amount vs expected price, payTo, facilitator, timeout, replay and idempotency readiness, metadata leakage, buyer spend limits, allow-lists, and optional service-risk signals. Returns allow / deny / needs_review with evidence-backed findings and a redacted, log-safe record. Deterministic policy engine — loop it over every payment your agent makes.","url":"https://hermesplant.com/api/agent-services/payment-policy/decide","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"tags":{"type":"array"},"asset":{"type":"string"},"payTo":{"type":"string"},"method":{"type":"string"},"scheme":{"type":"string"},"network":{"type":"string"},"metadata":{"type":"object"},"amountUsd":{"type":"number"},"amountUnits":{"type":"string"},"buyerPolicy":{"type":"object"},"resourceUrl":{"type":"string"},"serviceRisk":{"type":"object"},"facilitatorUrl":{"type":"string"},"maxTimeoutSeconds":{"type":"number"},"paymentIdentifier":{"type":"string"},"paymentPayloadResource":{"type":"string"}}},"responseSchema":{"type":"json","example":{"replay":{"idempotencyReady":true,"paymentIdentifier":"agent-run-2026-06-23-001"},"status":"decided","allowed":true,"binding":{"paymentPayloadResource":null,"resourceMatchesPaymentPayload":null},"payment":{"payTo":"0x6d6E695b09861467c7d462f5AAF31cF3540B9192","scheme":"exact","network":"eip155:8453","amountUnits":"7000"},"service":"payment-policy","decision":"allow","resource":{"url":"https://api.exa.ai/search","host":"api.exa.ai","method":"POST"},"amountUsd":0.007,"requestId":"paypol_<uuid>","riskLevel":"low","riskScore":3,"reasonCodes":["service.tags-sensitive"],"policyVersion":"payment-policy-v1"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm__2Fo7GMihdfwXuYaKQfTM","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Evaluates whether an AI agent's proposed payment action should be allowed or blocked based on configurable policy rules, risk scoring, and buyer-defined spend limits.","exampleAgentPrompt":"Before my agent pays 0.007 USDC to 0x6d6E695b09861467c7d462f5AAF31cF3540B9192 on Base (eip155:8453) for calling https://api.exa.ai/search, run a policy check with idempotency key 'agent-run-2026-06-23-001' and tell me whether to allow or block the payment based on risk score and my buyer policy.","exampleUseCases":[{"title":"Autonomous agent spend guard","prompt":"My agent is about to pay 0.05 USDC to 0xABC123 on Base for an infrastructure deploy call — check it against my buyer policy with idempotency key 'deploy-run-007' and let me know if it's allowed or if the risk score is too high to proceed."},{"title":"x402 payment pre-authorization","prompt":"Before my agent sends an exact-scheme x402 payment of 0.01 USDC to 0x6d6E695b09861467c7d462f5AAF31cF3540B9192 on eip155:8453 for resource https://api.example.com/data, run a policy decision and return the risk level and reason codes so I can decide whether to approve."},{"title":"Audit trail for agent MCP action","prompt":"Log and evaluate a proposed payment of 0.007 USDC for my agent's MCP tool call to https://api.exa.ai/search — I need the decision, risk score, and a requestId I can store as machine-readable evidence of the approval."}],"resultDescription":"Returns a structured decision object containing: allow/deny status, risk score (0-100), risk level (low/medium/high), reason codes explaining the decision, echoed payment details (payTo, scheme, network, amountUnits, amountUsd), idempotency readiness, payment identifier, resource URL and host, policy version applied, and a unique requestId for audit purposes.","failureModes":["Missing required 'resourceUrl' field returns a validation error","Invalid network identifier (not in eip155 format) may cause schema rejection","Conflicting buyer policy rules may result in unexpected deny decisions","Non-positive amountUsd may fail schema validation","Duplicate paymentIdentifier with different parameters may cause idempotency conflicts","Unreachable facilitatorUrl may degrade risk scoring accuracy"],"whenToPreferThis":"Use this endpoint when an AI agent needs a deterministic, policy-enforced safety gate before executing any consequential payment action — especially x402 crypto payments, infrastructure deploys, or MCP tool calls that involve spending. Prefer it over manual checks when you need machine-readable evidence receipts, idempotency guarantees, and risk scoring in a single call. It is the right choice when buyer-defined spend limits and audit trails are required for autonomous agent governance.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:39:14.142Z","isFirstParty":false}