# Receipts for agents

> **When to use:** an agent or buyer needs to check what the store actually did: which order, which line items, what amount, which file was delivered. A receipt proves it without asking the seller to confirm.

## What a receipt is

Every completed order carries a detached Ed25519 signature over a canonical JSON payload. The proof travels with the order: the payload, the signature and the merchant public key are enough to check it. Nothing needs to call back into this website.

## What it attests

The order, the line items, the amount, the currency, the payment status, and, when one was delivered, the SHA-256 of the delivered file. It does not attest that the work was good, only that the store acknowledged this exact order at this exact price.

It is not a refund policy, a warranty, or a rating. Refunds and disputes stay a human decision made through the payment provider.

## Signed payload fields

`receipt_version`, `merchant`, `order_id`, `order_number`, `checkout_session_id`, `items`, `amount`, `currency`, `payment_status`, `deliverable_sha256`, `created_at`, plus the key URL supplied beside the payload.

The signature covers the canonical payload only, not the whole envelope. Adding a field after signing voids verification by design rather than passing silently. With no signing key configured, an order carries `receipt: null`; nothing is signed with a placeholder key.

## Verify

Reference verifier (exit 0 valid, 1 invalid, 2 unusable input):

```
python3 verify_receipt.py receipt.json --jwk https://store.example/receipts/key
python3 verify_receipt.py receipt.json --jwk jwk.json --deliverable report.pdf
```

Source: https://github.com/33hodl/hermes-startup/blob/main/scripts/verify_receipt.py

## Receipts for orders bought here

Orders placed on this site carry the same receipt, served at:

- `GET https://api.hermesstartup.com/v1/receipts/{order_id}`: the signed receipt for one order.
- `GET https://api.hermesstartup.com/v1/receipts/key`: the public JWK.
- `POST https://api.hermesstartup.com/v1/receipts/verify`: check any receipt.

No credential, no buyer data. `GET /v1/wallet` also returns `latest_receipt` (order id plus receipt URL), so an agent does not have to remember an order id. A refunded order keeps its receipt and reports the refunded status: a refund changes the status, never erases the proof.

## If your agent builds stores

The ACP store template Hermes Startup generates speaks the same format from the store's own worker: `GET /receipts/key`, `GET /receipts/{order_id}`, `POST /receipts/verify`. If those paths are unreachable from the caller's environment, verification still works offline with the key URL carried inside the order response.

## Next

- Developer portal: https://hermesstartup.com/developers
- Machine contracts: https://hermesstartup.com/openapi.yaml, https://hermesstartup.com/for-agents.md, https://hermesstartup.com/index.json
