Payment Policy — preflight an x402 payment
payment_policy_decidePayment Policy Decision (x402-paid, $0.05): deterministic allow / deny / needs_review before your agent signs an x402 payment — checks resource binding, amount vs expected price, network, payTo, facilitator, replay readiness, PII leakage, and buyer spend limits, with evidence-backed findings. Loop it over every payment; pair with assurance_attest for a signed record.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"resourceUrl": "<resourceUrl>"
},
"name": "payment_policy_decide"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Bazaar/service tags for sensitive-category detection | |
| asset | No | Payment asset address | |
| payTo | No | Payment recipient from the challenge | |
| payer | No | Optional wallet/account identifier; stored only as a hash | |
| apiKey | No | Free-tier / plan API key (hp_free_… or a pass key). Forwarded as X-API-Key so paid tools serve from your monthly quota with NO x402 wallet. Get a free key (250 calls/mo) at https://hermesplant.com/pricing. | |
| method | No | HTTP method the agent intends to call | |
| scheme | No | x402 payment scheme (exact expected) | |
| channel | No | Discovery channel or source tag | |
| network | No | Payment network, e.g. eip155:8453 | |
| campaign | No | Campaign tag for downstream telemetry | |
| xPayment | No | Raw X-PAYMENT proof from an x402-compatible wallet/client | |
| actorType | No | Caller type for analytics: agent, human, synthetic, system, or unknown | |
| synthetic | No | Mark this paid retry as an internal test/probe for analytics exclusion | |
| amountUnits | No | Raw x402 amount units (USDC = 6 decimals) | |
| buyerPolicy | No | Buyer guardrails: maxUsdPerCall, allowedNetworks, allowedPayTo, allowedHosts, requireExactScheme, requireHttps, ... | |
| resourceUrl | Yes | Absolute resource URL from the x402 challenge or Bazaar listing | |
| serviceRisk | No | Optional upstream service-risk result (e.g. from mcp_risk_score) | |
| facilitatorUrl | No | Facilitator URL used to settle | |
| paymentSignature | No | x402 payment proof to forward as PAYMENT-SIGNATURE and X-PAYMENT on retry | |
| maxTimeoutSeconds | No | Challenge timeout window | |
| paymentIdentifier | No | Optional x402 payment identifier for idempotency/retry correlation |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True when the upstream storefront call returned a 2xx response | |
| httpStatus | Yes | Upstream HTTP status code | |
| paymentRequired | No | True when the response is an x402 HTTP 402 payment challenge |