{"uid":"cap_MHSnZ4mXTEYZkWxfn4J4S","slug":"screwtape-ai-agent-action-receipt-650114dc","name":"Screwtape.ai Agent Action Receipt","description":"Screwtape advises and records. Your agent must cooperate by checking the result before acting; we do not hold funds or independently stop payments.","url":"https://screwtape.ai/v1/receipt?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"action":{"type":"string"},"status":{},"agent_id":{"type":"string"},"children":{"type":"array","items":{"type":"string"},"description":"Ordered child receipt ids. Signs children_root over their receipt_hash values so any added, dropped or swapped step fails verification."},"event_id":{"type":"string"},"reference":{"type":"string"},"action_sha256":{"type":"string"}}},"responseSchema":{"type":"json","schema":{"type":"object","required":["receipt","receipt_hash","verify_url","keys_url"],"properties":{"receipt":{"type":"object","required":["receipt_id","agent_id","sequence","action_sha256","previous_hash","signature","kid","alg","status","issued_at","chain","event_id","schema"],"properties":{"alg":{"const":"Ed25519"},"kid":{"type":"string"},"chain":{"type":"string"},"schema":{"const":"screwtape-action-receipt-v1"},"status":{"enum":["requested","succeeded","failed","paid_not_served"]},"agent_id":{"type":"string","pattern":"^[A-Za-z0-9._:-]+$","maxLength":128,"minLength":1},"children":{"type":"array","items":{"type":"string"}},"event_id":{"type":"string","pattern":"^[A-Za-z0-9._:-]+$","maxLength":128,"minLength":1},"sequence":{"type":"integer","minimum":1},"issued_at":{"type":"string"},"signature":{"type":"string"},"receipt_id":{"type":"string"},"action_sha256":{"type":"string"},"children_root":{"type":"string","description":"SHA-256 of canonical JSON of ordered child receipt_hash values."},"previous_hash":{"type":["string","null"]},"reference_sha256":{"type":"string"}}},"keys_url":{"type":"string"},"replayed":{"type":"boolean"},"request_id":{"type":"string"},"verify_url":{"type":"string"},"receipt_hash":{"type":"string"}}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_JtFXcWETEDclOBzLNhQw7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Creates a cryptographically signed, tamper-evident receipt recording whether an AI agent was advised to allow or deny a spending action, forming an auditable chain of agent authorization decisions.","exampleAgentPrompt":"Log a Screwtape receipt for agent 'trading-bot-001' and event 'evt-20240501-buy-eth' recording that the action to purchase 0.5 ETH was requested — here's the action SHA-256 hash: a3f1c2d4e5b6789012345678901234567890abcdef1234567890abcdef123456.","exampleUseCases":[{"title":"Pre-payment authorization audit trail","prompt":"Before my agent 'dca-bot:prod' spends any money, log a Screwtape receipt for event 'evt-dca-001' showing the action 'buy $50 of BTC on Coinbase' was requested — use action hash b1e2f3a4c5d6e7f8901234567890abcdef1234567890abcdef1234567890ab12."},{"title":"Recording a successful agent transaction","prompt":"My agent 'inventory-agent:v2' just successfully completed a purchase — log a Screwtape receipt for event 'evt-inv-purchase-55' with status succeeded and action 'order 200 units of SKU-9981 for $340', action hash c2d3e4f5a6b7c8d9e0f1234567890abcdef1234567890abcdef1234567890cd34."},{"title":"Logging a failed or denied spending attempt","prompt":"Record a Screwtape receipt for agent 'expense-agent:finance' and event 'evt-exp-2024-09' with status failed — the action was 'submit $1200 expense reimbursement to Stripe' and the hash is d4e5f6a7b8c9d0e1f2345678901234567890abcdef1234567890abcdef12ef56."}],"resultDescription":"Returns a signed receipt object containing a unique receipt_id, agent_id, sequence number (position in the agent's hash chain), action_sha256, previous_hash linking to the prior receipt, an Ed25519 signature, the signing key ID, status, issued_at timestamp, and chain identifier. Also returns the receipt_hash for the new record, a verify_url for public verification, a keys_url for signature key lookup, and optionally a replayed flag and request_id.","failureModes":["Invalid agent_id or event_id format (must match pattern ^[A-Za-z0-9._:-]+$) returns 400","Missing required fields (action, status, agent_id, event_id) returns 400","Invalid status enum value returns 400","action_sha256 not matching the 64-character hex pattern returns 400","Payment not included or insufficient USDC (requires $0.003 via x402) returns 402","Agent submitting a duplicate event_id may receive replayed:true in response","Signature verification failure downstream if keys_url is unreachable"],"whenToPreferThis":"Use this endpoint when you need a cryptographically verifiable, chained audit log of AI agent spending decisions — especially for compliance, governance, or accountability use cases where you must prove an agent checked for authorization before transacting. Prefer this over simple logging services when you need Ed25519-signed receipts that form a hash chain (each receipt links to the previous), enabling tamper-evidence. This is not a payment gateway or fund-holding service; the agent must still enforce the decision — Screwtape records the advisory and proof.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-28T12:33:29.345Z","isFirstParty":false,"canonicalSlug":"screwtape-ai-agent-action-receipt-650114dc"}