Checkout settlement binding (browser principal)
Status: Preview shipped
Issue: ehx-web#4 follow-up
Tracking: ehx-kb#12
Shipped
| Piece | Behavior |
|---|---|
Session user_id | Checkout auto-fills browser principal (browser:…) and syncs cookie |
entitlements on session | After confirmed, API returns stub tier binding snapshot |
| Plan page | /account/plan?checkout=activated live-fetches plan with principal |
| Confirmed panel | Links to plan with activation query; shows active entitlements message |
Flow
/checkoutcreates session withuser_id= browser principal +ehx_principalcookie- User reports tx → RPC verify →
confirmed(whenEHX_CHECKOUT_CONFIRM_ON_VERIFY=1) GET /checkout/sessions/{id}→entitlements.active: true- Plan & usage → tier
team/scaleviacheckout_stubfor same principal
M5.2 follow-up (preview shipped)
- Checkout confirm upserts
subscriptionsrow (30-day stub period) - Logged-in checkout binds subscription to
account_id - Device link codes migrate principal subscriptions to account — see milestone-5-2-auth-and-subscriptions.md
M5.2b custodial deposits (preview shipped)
Per-chain treasury via EHX_CHECKOUT_DEPOSIT_* → settlement_mode: custodial with recipient + amount RPC verify.
Doc: milestone-5-2b-custodial-checkout-deposits.md
Still open (production settlement)
Preview shipped
| Piece | Issue |
|---|---|
| HD wallet — unique address per session | ehx-api#13 — milestone-5-2c-hd-wallet-deposits.md |
| Settlement reconcile + processor webhooks | ehx-api#14 — milestone-5-2d-settlement-reconciliation.md |
| Subscription renew / cancel | ehx-api#15 — milestone-5-2e-subscription-renew-cancel.md |
| Invoice PDF | ehx-api#16 — milestone-5-2f-invoice-pdf.md |
Stuck-payment status panel on /checkout | ehx-web#27 |
| Confirmed panel + receipt entitlement snapshot | ehx-web#28 |
| Admin checkout finance CSV + stuck report | ehx-api#17 |
Related
- API:
ehx-api/api/v1/checkout.py,entitlements.py - Web:
lib/browser-principal.ts,/checkout,/account/plan