{"id":"gate.receipt.v2","title":"Gate receipt: the signed record of one check made before a payment","unit":"one receipt per gate check","chain_set":"eip155:8453 (Base)","window":"the moment of the check (decided_at)","definition":"For each answer of the Gate (gate_check, POST /api/gate/check): the decision id, the paying agent's token id, the payee address, the amount in USD, the policy by name and by the SHA-256 of its whole body as evaluated (every limit), the decision (block, warn, log or allow), the reasons as the ids of the rules that fired, the mode and the time. Serialised with RFC 8785 (JCS), hashed with SHA-256 and signed with Ed25519 (key afg-pass-2026-10). The receipt is returned with the answer and stored; the policy body is returned beside it in the answer and stored with the decision. For a check made with a Desk session, the receipt's hash is also written into the signed statement log as the leaf publication/1|gate-receipt/<decision_id>|<sha256>|<decided_at> (agent.statement.log.v1), which the daily Base anchor commits to (anchor.v2).","method":"Made by the server at the moment the decision is recorded; a failure to sign never fails the check (the answer then says the receipt is unavailable). policy.sha256 is the SHA-256 of the UTF-8 bytes of the policy body in canonical form (keys sorted at every level, no spaces). The body is the policy as evaluated: the file of a named policy, or the object the caller sent, in both cases without the top-level keys _comment, name, note and description. At most 500 receipts are logged per UTC day; above that a receipt is signed but not logged, and says so. Read one back at /api/gate/receipt?id=<decision_id>. To check: recompute the SHA-256 of the canonical text; verify the signature with the key at /.well-known/afg-pass-keys.json; recompute the SHA-256 of policy.body from the answer and compare it with policy.sha256 in the receipt; for a logged receipt verify the leaf's inclusion under a signed head of /api/statements/log and read the anchor transaction on Base. Version 2 replaces version 1 from 24 November 2026, 10:10 UTC. The change and seven tests were written down on 23 November 2026, before the code; all seven gave the result written there on 24 November: two policies with the same constraint names and limits a thousand times apart carry one hash under version 1 and two different values under version 2; a policy with its keys in another order carries the same value; the five named policies carry five different values; the value in a receipt equals the SHA-256 recomputed from the answer's policy body; stored version 1 receipts verify as before; 320 stored decisions under a named policy, evaluated by both versions, give the same decision and reasons; the body stored equals the body evaluated.","excludes":["Checks made before 13 Nov 2026 (they are recorded, without a receipt).","Receipts issued from 13 Nov 2026 to 24 Nov 2026, 10:10 UTC: they are gate.receipt.v1 and stay as issued.","The facts snapshot behind the decision: it stays in our record of the decision and is not part of the receipt."],"does_not_assert":["That a payment was made, or that the client followed the answer.","That the payee or the agent is safe: the Gate is advisory and the client decides.","When the payment itself happened: the receipt carries the time of the check only."],"assumptions":"The client that keeps a receipt beside a payment is the one that asked for the check. To show the limits themselves it keeps the answer's policy body with the receipt; the body is also stored with the decision on our side.","known_gaps":"Receipts of anonymous checks are signed but not in the public log, so their time rests on our signature alone. A receipt is not bound to a transaction hash: the payment does not exist yet when the check runs.","intended_use":"An operator's own evidence that a payment was checked before it was signed, under which limits and with which answer.","not_intended_for":"Proof that a payment was safe, authorised or made.","source":"AFG-Pulse intake (lib/receipt.mjs; lib/gate.mjs policySha256)","since":"2026-11-24","supersedes":"gate.receipt.v1","revisions":[{"date":"2026-11-26","what":"From 22:40 UTC on 26 November 2026 an answer given while a policy is pinned to the agent carries gate.receipt.v3 (gate.policy.pin.v1). An answer for an agent without a pin keeps this version byte for byte, and receipts issued under it stay as issued. See /api/changepoints cp-2026-11-26-gate-policy-can-be-pinned."},{"date":"2026-11-27","what":"From 07:24 UTC on 27 November 2026 /api/gate/receipt also returns policy: the policy the decision was evaluated under, as stored with the decision since 24 November 2026, 10:10 UTC. For one of our named policies it returns the body itself (policy.body), so the limits stay readable after a named policy changes, with policy.sha256 computed from that body and policy.matches_receipt saying whether it equals body.policy.sha256. A caller's own policy is returned by its SHA-256 only: the caller holds the body from the check's answer. The signed receipt is unchanged, and so is every stored receipt. Checked before release (07:23 UTC): 47 of 47 stored bodies hash to their receipt's body.policy.sha256, and each of the 45 under a named policy equals today's file of that name."},{"date":"2026-11-27","what":"From 08:00 UTC on 27 November 2026 a receipt names payee.facts.v3 among its definitions, where it named payee.facts.v2: the payee facts gained a tenth, shared_new_destination, which no refuse condition and no named policy reads, so decisions are unchanged. Receipts issued before stay as issued."}],"body_sha256":"86eed5bfa988b36b5c8816f8be3be85f9b49a4083f7b028946eb8d73102b0c8f","url":"https://agenticfinancegraph.com/def/gate.receipt.v2","ladder":"https://agenticfinancegraph.com/ai-agent-liveness-methodology-l0-l9-ladder","license":"https://creativecommons.org/licenses/by/4.0/","attribution":"Agentic Finance Graph — https://agenticfinancegraph.com"}