//#region src/stripe/pending-checkout.d.ts /** * Tracks checkouts that have been started but may not have been confirmed * yet — e.g. the user paid on Stripe and closed the tab before being * redirected back to the success page (where `confirmCheckoutSession` runs). * * IMPORTANT: this stores only the *session ids to retry confirmation on*, a * best-effort retry hint — NOT the user's paid/balance state. The server * remains the single source of truth for entitlements; on the next app boot * we simply re-run the (idempotent, ownership-checked) confirm for each * session so the credit balance reflects the purchase without waiting on the * async Stripe webhook. Scoped to a single browser; cross-device is covered by * the webhook backstop. * * A *list* (not a single value) is kept on purpose: localStorage is shared * across tabs, so two concurrent checkouts — or a second checkout started * before the first was reconciled — must not clobber each other. */ /** Record a started checkout to retry confirmation on later. Dedupes by session id. */ declare function addPendingCheckout(sessionId: string): void; /** Fresh session ids awaiting confirmation. Persists the pruned list as a side effect. */ declare function getPendingCheckouts(): string[]; /** Drop one session once it's confirmed (or known not to belong to this user). */ declare function removePendingCheckout(sessionId: string): void; //#endregion export { addPendingCheckout, getPendingCheckouts, removePendingCheckout }; //# sourceMappingURL=pending-checkout.d.mts.map