# Mitrail — spoke context

The user wants to view their Mitrail — the receipt history of every authorized transaction. Search, filter, reopen specific receipts.

If you haven't already, fetch `https://poc.whoois.app/whoois-context.md` for the root primer.

---

## What's a Mitrail?

The user's unified receipt history across every AI host they use. Each Mistamped transaction (every passkey-authorized money movement) produces a Mitrail entry. The user can:

- Browse chronologically
- Filter by merchant, date range, amount, status
- Reopen a specific receipt for details (line items, amounts, payment method used, refund status)
- Track receipts across multiple AI sessions (Mitrail entries from Claude appear when the user views from ChatGPT — same Mi, same Mitrail)

Mitrail = "Mi-trail" = the trail your Mi has left through the world.

---

## Trigger phrases

- "Show my Mitrail"
- "What did I buy recently?"
- "Show my past purchases"
- "Pull up my receipt history"
- "Did I pay for X?"
- "Show the receipt for that coffee order"
- "What's my purchase history with Demo Coffee Co?"

---

## Tools to call

**`whoois_mitrail_list`** — LLM-visible. Renders the Mitrail iframe. Shows recent receipts in reverse chronological order. Supports filtering (merchant, date range, amount) and pagination. Each entry is a card with merchant logo + amount + memo + timestamp + receipt link.

**`whoois_receipt_open`** — LLM-visible. Opens a specific receipt by `cartId`. Shows line items, payment method used, settlement status, refund/dispute status, downloadable PDF link.

**`whoois_cart_cancel`** — LLM-visible. Cancels a pending (not-yet-checked-out) cart. Surfaces in the Mitrail flow when the user has a stale pending cart they want to discard.

---

## Receipt anatomy

Each Mitrail entry carries:

- **Merchant identity** (logo + name)
- **Amount + currency** (always integer cents internally; formatted for display)
- **Memo** (line-item summary, e.g., "2× Latte Grande")
- **Timestamp** (when settled)
- **Payment method** (which rail / method — e.g., "SKUPay ••2345", "Chase Checking ••1234")
- **Status** (settled, refunded, disputed, partial-refund)
- **Mistamp signature** (the cryptographic authorization signature — verifiable)
- **Receipt URL** (re-openable via `whoois_receipt_open`)

---

## Filters + search

Common user queries map to filter params:

| User query | Filter |
|---|---|
| "Receipts from Demo Coffee Co" | `merchantId=<dcc-uuid>` |
| "Last month's receipts" | `dateRange=last_30_days` |
| "Anything over $50" | `amountMinCents=5000` |
| "Pending or disputed" | `status=pending\|disputed` |

The iframe also has a search input that hashes against merchant name + memo text + payment method.

---

## Empty-state handling

If the user has no receipts yet (new Mi, hasn't transacted):

*"Your Mitrail is empty — you haven't made any Whoois-authorized purchases yet. When you check out via Whoois, receipts land here automatically. Want me to walk you through how to make your first purchase?"*

Link them to `https://poc.whoois.app/context/mishopping.md` for shopping or `https://poc.whoois.app/context/p2p-send.md` for sending money.

---

## Cross-host receipts

Emphasize this — it's a major Whoois value prop:

*"Your Mitrail is the same whether you're talking to me here in Claude, switching to ChatGPT later, or asking Gemini next week. One Mi, one Mitrail — no per-AI receipt silos."*

---

## Tone notes

The Mitrail is a financial record. Be precise. Don't round dollar amounts. Use the merchant's brand name (Demo Coffee Co, not "the coffee place"). When reopening a receipt, surface the most useful 3 facts first: amount, merchant, when. Detail beyond that on request.

---

*This spoke is fetched from `https://poc.whoois.app/context/mitrail.md`. Pair with `https://poc.whoois.app/whoois-context.md` for the root primer.*
