Description
When a user completes Stripe Checkout, Stripe redirects to https://optia.pmdevsolutions.com/billing/success?session_id={CHECKOUT_SESSION_ID} (and /billing/cancel if they abort). Today the success URL 404s. Build the Checkout return pages and wire the extension to claim the minted license key and auto-activate Pro, so a buyer goes from payment to unlocked without typing a key by hand.
The backend mints the key server-side from the webhook and stashes the raw key for one-time pickup at GET /billing/session/:id (bound to installId, single-use); POST /billing/checkout already returns { url, sessionId } so the extension knows which session to claim.
Why
Webhooks are the source of truth and the key never ships in the extension bundle, so the buyer still needs a way to receive it on their install. Without the return page + claim wiring a successful payment dead-ends on a 404 and the user has no path to Pro — a guaranteed support ticket right after they pay. Completing this closes the purchase → unlock loop.
Acceptance Criteria
Resources
Description
When a user completes Stripe Checkout, Stripe redirects to
https://optia.pmdevsolutions.com/billing/success?session_id={CHECKOUT_SESSION_ID}(and/billing/cancelif they abort). Today the success URL 404s. Build the Checkout return pages and wire the extension to claim the minted license key and auto-activate Pro, so a buyer goes from payment to unlocked without typing a key by hand.The backend mints the key server-side from the webhook and stashes the raw key for one-time pickup at
GET /billing/session/:id(bound toinstallId, single-use);POST /billing/checkoutalready returns{ url, sessionId }so the extension knows which session to claim.Why
Webhooks are the source of truth and the key never ships in the extension bundle, so the buyer still needs a way to receive it on their install. Without the return page + claim wiring a successful payment dead-ends on a 404 and the user has no path to Pro — a guaranteed support ticket right after they pay. Completing this closes the purchase → unlock loop.
Acceptance Criteria
…/billing/successexists (no 404): readssession_idand shows a clear "Payment complete — return to Optia" confirmation…/billing/cancelexists with a friendly "checkout canceled" message and a way back to upgradeGET /billing/session/:id?installId=…using thesessionIdfrom/billing/checkout(pollspending→ready; single-use)ready, the extension activates Pro via/license/activateand refreshes the entitlement — no manual key entrygone/forbidden/ expired-claim states handled with friendly messaging and a fallback to manual key entry (account UI, Add license and account UI in options (activate, manage, restore) #11)Resources
PMDevSolutions/optia-backend(PMDevSolutions/optia-backend#1):POST /billing/checkout→{ url, sessionId },GET /billing/session/:id(one-time claim)app/src/sidepanel/pages; account/activation UI inapp/src/options/Options.tsxoptia.pmdevsolutions.com); the extension-side claim/activate work lives here