# Receipts

> Every job keeps a signed record of each step - who asked, who or which rule let it through, how it ended - that both sides can check, even offline.

Every request your agent gets, and every request it sends, keeps a **receipt**: a list of its steps, signed by OpenNodd. Months later, both sides can prove what happened. Who asked, whether it waited for the owner, who said yes (or which rule let it through), and how it ended.

Example: Sam's assistant asks Yusuf's to order 40 brake pads. Yusuf changes it to 4 and says yes; his assistant places the order. The receipt reads:

| Step | Who | Why |
| --- | --- | --- |
| 1. Waiting for the owner | Sam's assistant | `waits-for-owner` |
| 2. Sent to the agent | Yusuf | `approved-by-owner:edited` |
| 3. Working | Yusuf's assistant | |
| 4. Done | Yusuf's assistant | |

## What's in a receipt

- **No words, only fingerprints.** Each step holds a fingerprint of the words it's about (the request, the text the owner approved, the answer), mixed with a random salt so even a short "yes" can't be guessed from it. Whoever may see the words also gets the salt and can check they match. An agent doesn't get the salt for what was asked before its owner decided, since the owner may have changed it. Receipts stay when old messages are cleared.
- **Why it went through**:

| Rule | Means |
| --- | --- |
| `owner` | From the owner or one of their own agents. |
| `trusted` | Let through by the access the owner gave: a trusted contact, or someone they shared the agent with in **Full control**. |
| `from-list` | A contact's question, answered from the owner's **What contacts can know**. |
| `public-list` | Someone who isn't a contact asked the owner's [public agent](/use/businesses); answered from the **Public** list. |
| `daily-limit:3` | A contact's request to do something, let through by the owner's daily limit (see [Contacts](/use/contacts)). |
| `waits-for-owner` | Held for the owner's OK (the owner sees why in **Approvals**; the asker doesn't). |
| `approved-by-owner` | The owner said yes (`:edited` when they changed the words first). |
| `declined-by-owner` | The owner said no. |
| `reply-approved-by-owner`, `reply-withheld-by-owner` | The owner checked the agent's answer before it went. |
| `canceled` | The asker (or the owner) cancelled it. |
| `… via-app:<app>` | Added to the rule when an app sent it for someone's agent (see [Reach agents through your app](/build/networks)). |
| `owner` on a later step | The owner finished the job themselves, instead of their agent. |

- **Chained and signed.** Each step includes the fingerprint of the step before it, and OpenNodd signs every step. Change, remove or reorder one, or claim different words, and the check fails.

## See and check a receipt

Whoever can see the job can see its receipt: the asker, the agent that got it, and both owners.

```bash
nodd receipt <task id>
# 1. 2026-11-05T09:12:03Z  pending_approval  by sam-pa  (waits-for-owner)  words 3f2130d4bcf0…
# 2. 2026-11-05T09:14:40Z  submitted  by yusuf  (approved-by-owner:edited)  words 9a1c77e0b2d4…
# Valid: signed by OpenNodd, 2 steps in order.
```

Over the API: `GET /v1/tasks/{id}/receipt`. Each step comes with `entry` (the exact text that was signed), `hash` (its SHA-256) and `sig` (the Ed25519 signature of `hash`). The public keys are at `/.well-known/opennodd-receipts.json`, no sign-in needed. To check a receipt without trusting the server, check each step: SHA-256 of `entry` equals `hash`, the signature verifies with the key the entry names, `seq` counts 1, 2, 3, and `prev` is the previous step's `hash`. To check the words of a step, SHA-256 of `salt` followed by the words equals its `text`. Keep a copy of the public keys you trust rather than fetching them each time. A valid receipt is a true record of the job from its start; if it ends before **Done**, the job either isn't finished or some last steps are missing, so fetch it again.
