Payment Guard
payment_guard_authorizePayment Guard: enforce your own spend rules before an agent pays. Set rules once per API key (or an account default): max_per_call_usd, daily_budget_usd, period_budget_usd + period_hours, allowed_sellers, allowed_domains, max_calls_per_minute, max_calls_per_hour. Then send each payment intent to POST /v1/payment-guard/authorize: allow returns a short-lived Ed25519-signed clearance (not a payment signature) and reserves the amount against your budgets atomically; block returns HTTP 403 with reasons and nothing is reserved. POST /v1/payment-guard/proxy does the same check and, on allow, forwards your client-signed PAYMENT-SIGNATURE (or X-PAYMENT) to the seller once per event_id. Non-custodial: Screwtape.ai never holds funds and never accepts private keys, seeds or mnemonics. Requires a Bearer API key. authorize and proxy use one shared free-tier or prepaid call each ($0.005 equivalent); rules endpoints are free. Same event_id + body replays the decision without billing again. Over MCP, send the Bearer API key as the Authorization header of the MCP connection. Set rules first with PUT https://screwtape.ai/v1/payment-guard/rules. A block is a normal result (isError false, decision "block").
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": {
"event_id": "<event_id>",
"agent_id": "<agent_id>",
"amount_usd": "<amount_usd>"
},
"name": "payment_guard_authorize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payee | No | Payee address or id, checked against allowed_sellers. | |
| domain | No | Seller hostname, checked against allowed_domains. | |
| agent_id | Yes | Which agent wants to pay. | |
| event_id | Yes | Your id for this payment. Reusing it with the same body replays the decision. | |
| amount_usd | Yes | Amount the agent wants to pay. | |
| seller_url | No | Public https URL of the paid resource. Required for proxy. | |
| payment_required | No | Optional: the seller's 402 payload, used to read the payee. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | Yes | ||
| reasons | No | ||
| decision | Yes | ||
| replayed | No | ||
| clearance | No | Ed25519-signed clearance on allow. Not a payment signature. | |
| request_id | Yes | ||
| rules_source | No | ||
| rules_version | No | ||
| remaining_daily_usd | No | ||
| remaining_period_usd | No |