Check an agent before you accept its payment

Who the agent is, whether it can spend right now, and its record on Writ’s ledger. No account, no API key. What is Writ? · Verify a receipt

1 · The agent’s passport

2 · Can it spend, and may it buy this category?

This public check never answers for an amount or a merchant: that would let anyone work out the agent’s balance, its limits and the merchants it may pay. To check an exact payment, ask the agent for a signed proof (step 3). A payment is always re-checked when the agent pays.

3 · Verify a proof the agent gave you

A valid proof shows that Writ issued this statement at the time it names: that exact payment passed the agent’s policy then. It is not a payment, and it does not guarantee that a later payment will be allowed.

The signature is also checked here, in your browser, against the keys Writ publishes at /.well-known/writ-receipt-keys.json: Ed25519 over the hex SHA-256 of "writ-agent-proof/v1|" + v1|proof_id|agent_id|merchant|amount|category|nonce|issued_at|expires_at + "|" + type|verdict|policy_version.