Skip to main content

Checkout settlement binding (browser principal)

Status: Preview shipped
Issue: ehx-web#4 follow-up
Tracking: ehx-kb#12

Shipped

PieceBehavior
Session user_idCheckout auto-fills browser principal (browser:…) and syncs cookie
entitlements on sessionAfter confirmed, API returns stub tier binding snapshot
Plan page/account/plan?checkout=activated live-fetches plan with principal
Confirmed panelLinks to plan with activation query; shows active entitlements message

Flow

  1. /checkout creates session with user_id = browser principal + ehx_principal cookie
  2. User reports tx → RPC verify → confirmed (when EHX_CHECKOUT_CONFIRM_ON_VERIFY=1)
  3. GET /checkout/sessions/{id}entitlements.active: true
  4. Plan & usage → tier team/scale via checkout_stub for same principal

M5.2 follow-up (preview shipped)

  • Checkout confirm upserts subscriptions row (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

PieceIssue
HD wallet — unique address per sessionehx-api#13milestone-5-2c-hd-wallet-deposits.md
Settlement reconcile + processor webhooksehx-api#14milestone-5-2d-settlement-reconciliation.md
Subscription renew / cancelehx-api#15milestone-5-2e-subscription-renew-cancel.md
Invoice PDFehx-api#16milestone-5-2f-invoice-pdf.md
Stuck-payment status panel on /checkoutehx-web#27
Confirmed panel + receipt entitlement snapshotehx-web#28
Admin checkout finance CSV + stuck reportehx-api#17
  • API: ehx-api/api/v1/checkout.py, entitlements.py
  • Web: lib/browser-principal.ts, /checkout, /account/plan