Payments rewrite
Read this before touching auth or checkout. Agents pull from here on every session.
Context
- Render the checkout flow using
session_tokenbefore the gateway handshake completes, so agents don't re-request scopes already granted. - Pinned scopes:
payments:write,refunds:read
Constraints
- Never block the UI on a full refresh during startup.
- Keep PCI surface inside
checkout/— don't leak card state into other modules.
Open questions
- Idempotency key: per-session or per-attempt?
- Retry budget: cap at 3 before surfacing to a human?
Decisions
- Use Stripe PaymentIntents; no raw card capture in our flow.
session_tokenTTL = 15m; refresh silently on the gateway callback.