# P2P Send — spoke context

The user wants to send money to someone via Whoois P2P. This is the sender-side flow. The companion claim flow (recipient side, what someone does after receiving a P2P invite SMS) is at `https://poc.whoois.app/context/p2p-claim.md`.

If you haven't already, fetch `https://poc.whoois.app/whoois-context.md` for the root primer.

---

## Trigger phrases

- "Send John $50 for dinner"
- "Pay back Sarah $20 for lunch"
- "Send Mike $100"
- "Transfer money to [name]"
- "Venmo [name] $X" (treat as a P2P send intent)
- "I owe [name] $X — send it"

If the user names a recipient and an amount, this is almost certainly a P2P-send intent.

---

## Tool to call

**`whoois_p2p_initiate`** — kicks off the P2P send flow.

Arguments:
- `name` (string, optional) — recipient name as the user said it ("John", "Sarah Lim", "Mike")
- `amountCents` (number, optional) — integer cents (e.g., $50 → 5000)
- `memo` (string, optional) — short note ("for dinner", "lunch yesterday")
- `forceInvite` (boolean, optional) — set to `true` to skip contact search and go directly to the invite flow (used when picker says "another John?")

Parse the recipient + amount + memo from the user's utterance. Pass them to the tool; the iframe handles the rest.

---

## State branches (what the iframe returns)

The tool returns one of three `initialState` values based on the user's contact graph:

### `picker` — multi-match
The user has multiple contacts matching the name (e.g., 3 Johns). The iframe shows a list with avatars + last-transaction context so the user picks the right one. After they pick, the iframe internally transitions to `confirm-send` for the chosen contact.

### `confirm-send` — single match
Exactly one contact matches the name (e.g., "Sarah Lim" is unambiguous). The iframe shows the recipient avatar + amount + memo + a "Send with passkey" button. On tap, the iframe calls `whoois_p2p_authorize` (visibility:app) which fires the passkey ceremony.

### `confirm-invite` — no match
No contact matches the name (e.g., "Jane" who isn't in the user's contact graph). The iframe shows a "Send invite via SMS" flow:
- Recipient avatar is a placeholder (the user types Jane's number)
- Whoois generates a claim token + SMS body with a `https://poc.whoois.app/claim/{token}?from=...&amount=...&memo=...` URL
- On mobile: the iframe triggers `sms:` deep-link directly
- On desktop: the iframe shows a QR code encoding `/p2p/sms?body=...` for the user to scan with their phone

The recipient receives the SMS, taps the URL, lands on the claim landing page (`https://poc.whoois.app/context/p2p-claim.md` describes the recipient flow).

---

## What to say to the user

**On `picker`:** *"I found {N} contacts named '{name}' in your Whoois. Pick the right one — I'll send the $X."*

**On `confirm-send`:** *"Ready to send ${amount} to {recipient name}. {memo if present}. The iframe will ask for your passkey to authorize."*

**On `confirm-invite`:** *"I don't see {name} in your Whoois contacts. I can send them an SMS invite — they'll get a link to claim ${amount} from you. Want me to do that?"*

---

## Pending invites

Once an invite is sent, the user can check status of their pending invites via:

**`whoois_p2p_view_pending`** — lists pending P2P transfers (sent or received), filterable by state (invited, claimed, expired).

Trigger phrases:
- "Show my pending P2P transfers"
- "Did Jane claim that $20 I sent?"
- "What's the status of my P2P invites?"

---

## Common user questions

**"How does the recipient know I sent it?"**

If they're already a Whoois user, they get a real-time notification in their own Whoois session. If not, they get an SMS with a claim link. The SMS includes the sender's name + amount + memo + a 7-day claim deadline.

**"What if the recipient never claims?"**

After 7 days, the pending claim expires and the funds return to the sender's wallet. No charge to either party for unclaimed transfers.

**"Can I cancel after sending?"**

For non-claimed invites: yes — the user can revoke a pending invite from `whoois_p2p_view_pending`. For already-claimed transfers: no — once the recipient has settled the funds to their Mivault, the transaction is final.

---

## Tone notes

P2P sends are intimate (between friends, family, splitting bills). Be efficient — the user wants to confirm and move on. Don't over-explain or pad with marketing language. Confirm the details, fire the passkey, move on.

---

*This spoke is fetched from `https://poc.whoois.app/context/p2p-send.md`. Pair with `https://poc.whoois.app/whoois-context.md` for the root primer.*
