{"service":"HALOWERK x402werk","endpoint":"/policy/check","method":"POST","content_type":"application/json","inputSchema":{"type":"object","required":["proposed_payment","policy"],"additionalProperties":false,"properties":{"proposed_payment":{"type":"object","required":["amount_units"],"additionalProperties":false,"properties":{"amount_units":{"type":"string","pattern":"^[0-9]{1,78}$","description":"Amount of the proposed payment as an integer in the smallest unit of the token."},"asset":{"type":"string","description":"Token contract address, or \"native\" for the chain coin."},"chain":{"type":"string","description":"Chain as CAIP-2 (\"eip155:8453\"), short name (\"base\") or chain id."},"pay_to":{"type":"string","description":"Recipient address of the proposed payment."},"resource":{"type":"string","maxLength":2048,"description":"URL of the resource being bought. Nothing is fetched; it is only checked for shape."},"input_schema_present":{"type":"boolean","description":"Whether the offer declares an inputSchema. Use Nr. 83 to find out if you do not know."}}},"policy":{"type":"object","additionalProperties":false,"properties":{"max_per_call":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Largest allowed single payment, in whole tokens of the proposed asset, for example \"0.05\"."},"max_per_hour":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Largest allowed sum per hour, in whole tokens."},"max_per_day":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Largest allowed sum per day, in whole tokens."},"allowed_chains":{"type":"array","items":{"type":"string"},"description":"Chains you accept, as CAIP-2 or short names. Omit to allow any."},"allowed_assets":{"type":"array","items":{"type":"string"},"description":"Token addresses you accept. Omit to allow any."},"allowed_recipients":{"type":"array","items":{"type":"string"},"description":"Recipient addresses you accept. Omit to allow any; the recipient is then flagged as unverified."},"blocked_recipients":{"type":"array","items":{"type":"string"},"description":"Recipient addresses you refuse. Beats allowed_recipients on conflict."},"require_schema":{"type":"boolean","description":"Whether the offer must declare an inputSchema."}}},"spent_so_far":{"type":"object","additionalProperties":false,"properties":{"hour":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Already spent in the current hour, in whole tokens."},"day":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Already spent in the current day, in whole tokens."}}}}},"requestExample":{"proposed_payment":{"amount_units":"0"},"policy":{}},"operations":[{"method":"POST","inputSchema":{"type":"object","required":["proposed_payment","policy"],"additionalProperties":false,"properties":{"proposed_payment":{"type":"object","required":["amount_units"],"additionalProperties":false,"properties":{"amount_units":{"type":"string","pattern":"^[0-9]{1,78}$","description":"Amount of the proposed payment as an integer in the smallest unit of the token."},"asset":{"type":"string","description":"Token contract address, or \"native\" for the chain coin."},"chain":{"type":"string","description":"Chain as CAIP-2 (\"eip155:8453\"), short name (\"base\") or chain id."},"pay_to":{"type":"string","description":"Recipient address of the proposed payment."},"resource":{"type":"string","maxLength":2048,"description":"URL of the resource being bought. Nothing is fetched; it is only checked for shape."},"input_schema_present":{"type":"boolean","description":"Whether the offer declares an inputSchema. Use Nr. 83 to find out if you do not know."}}},"policy":{"type":"object","additionalProperties":false,"properties":{"max_per_call":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Largest allowed single payment, in whole tokens of the proposed asset, for example \"0.05\"."},"max_per_hour":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Largest allowed sum per hour, in whole tokens."},"max_per_day":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Largest allowed sum per day, in whole tokens."},"allowed_chains":{"type":"array","items":{"type":"string"},"description":"Chains you accept, as CAIP-2 or short names. Omit to allow any."},"allowed_assets":{"type":"array","items":{"type":"string"},"description":"Token addresses you accept. Omit to allow any."},"allowed_recipients":{"type":"array","items":{"type":"string"},"description":"Recipient addresses you accept. Omit to allow any; the recipient is then flagged as unverified."},"blocked_recipients":{"type":"array","items":{"type":"string"},"description":"Recipient addresses you refuse. Beats allowed_recipients on conflict."},"require_schema":{"type":"boolean","description":"Whether the offer must declare an inputSchema."}}},"spent_so_far":{"type":"object","additionalProperties":false,"properties":{"hour":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Already spent in the current hour, in whole tokens."},"day":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Already spent in the current day, in whole tokens."}}}}},"requestExample":{"proposed_payment":{"amount_units":"0"},"policy":{}}}],"example_request":{"proposed_payment":{"amount_units":"0"},"policy":{}},"serviceName":"spend_policy","tags":["x402","x402-infra","agent-payments","budget","policy"],"outputSchema":{"type":"object","properties":{"decision":{"type":"string","enum":["erlauben","ablehnen","pruefen"]},"reasons":{"type":"array","items":{"type":"object","properties":{"regel":{"type":"string"},"ergebnis":{"type":"string","enum":["erfuellt","verletzt","nicht_pruefbar","nicht_gesetzt"]},"grenze":{"type":["string","null"]},"wert":{"type":["string","null"]},"hinweis":{"type":["string","null"]}}}},"remaining":{"type":"object"},"would_exceed":{"type":"object"},"risk_flags":{"type":"array","items":{"type":"object"}},"conflicts":{"type":"array","items":{"type":"object"}},"amount":{"type":"object"},"thresholds_used":{"type":"object"},"unavailable_fields":{"type":"array","items":{"type":"string"}}}},"outputExample":{"decision":"pruefen","decision_basis":"No rule violated, but 2 risk flag(s) were raised: chain_unusual, recipient_unverified.","reasons":[{"regel":"max_per_call","ergebnis":"nicht_gesetzt","grenze":null,"wert":null,"hinweis":null},{"regel":"max_per_hour","ergebnis":"nicht_gesetzt","grenze":null,"wert":null,"hinweis":null},{"regel":"max_per_day","ergebnis":"nicht_gesetzt","grenze":null,"wert":null,"hinweis":null},{"regel":"allowed_chains","ergebnis":"nicht_gesetzt","grenze":null,"wert":null,"hinweis":null},{"regel":"allowed_assets","ergebnis":"nicht_gesetzt","grenze":null,"wert":null,"hinweis":null},{"regel":"blocked_recipients","ergebnis":"nicht_gesetzt","grenze":null,"wert":null,"hinweis":null},{"regel":"allowed_recipients","ergebnis":"nicht_gesetzt","grenze":null,"wert":null,"hinweis":null},{"regel":"require_schema","ergebnis":"nicht_gesetzt","grenze":null,"wert":null,"hinweis":null}],"remaining":{"hour":null,"day":null},"would_exceed":{"per_call":null,"hour":null,"day":null},"risk_flags":[{"flag":"chain_unusual","detail":"No chain was given with the proposed payment.","threshold":"The chain is a testnet or is not among the chains this service knows."},{"flag":"recipient_unverified","detail":"No allowed_recipients list was configured, so the recipient could not be checked against anything. Flagged, not rejected.","threshold":"No allowed_recipients list was configured, so the recipient could not be checked against anything. Flagged, not rejected."}],"conflicts":[],"amount":{"units":"0","human":null,"decimals":null,"decimals_source":null,"asset":null,"asset_symbol":null,"chain":null,"chain_name":null},"thresholds_used":{"price_flag_amount":"1","price_flag_note":"A fixed threshold, not a market comparison: a single agent call above one unit of a known stablecoin is flagged for a look. Whether the price is above or below what comparable endpoints charge is not decided here — that is Nr. 89.","unknown_recipient":"No allowed_recipients list was configured, so the recipient could not be checked against anything. Flagged, not rejected.","schema_missing":"The offer declares no inputSchema, so a calling agent cannot construct a valid request before paying.","chain_unusual":"The chain is a testnet or is not among the chains this service knows.","asset_not_canonical":"The token address is a bridged variant, not the canonical token of that chain.","conflict_rule":"Where two rules contradict each other, the stricter one applies and the conflict is named in conflicts."},"stateless":"This endpoint holds no budget and no history. The counters in spent_so_far come from you and are returned unchanged.","unavailable_fields":["amount.human"]}}