wealth/docs/decisions/0044-invite-codes-kept-per-...

877 B

0044 An invite link's code is kept per creator in the checkout draft

Status: Superseded by 0059 · Area: architecture · Date: 2026-10-09 · Decided by: agent

Context

Creators share /@username?code=… (J10-2). The code must survive a guest's login and reach that creator's checkout (J06-1b/1c, 2n/2o). 0030 keeps checkout state out of the URL.

Decision

The channel reads ?code= and keeps it in the persisted session.checkout-draft store under inviteCodes[creatorId], written only after the draft is restored. That creator's checkout fills it in, marks it as from the link and checks it. It is dropped after a paid subscription to that creator or on sign-out. It never goes into checkout's URL.

Alternatives

  • /checkout/@user?code= (designer note): leaks the code into history and shared links, against 0030.

Consequences

The store's version is 3.