Skip to content

Billing Portal: Phase 2 License Issuance#174

Merged
tobihagemann merged 1 commit into
developfrom
feature/store-migration-phase2
Jun 25, 2026
Merged

Billing Portal: Phase 2 License Issuance#174
tobihagemann merged 1 commit into
developfrom
feature/store-migration-phase2

Conversation

@tobihagemann

@tobihagemann tobihagemann commented Jun 24, 2026

Copy link
Copy Markdown
Member

Phase 2 wires the billing page to the API-owned session-to-license flow. Phase 1 got us a verified session; this exchanges that session for the actual Hub license and drops the old assumption that the store hands back the license token.

Two changes in hubsubscription.js:

  • Include the verified session in the Paddle checkout passthrough (alongside hub_id), so the payment webhook can tie the new subscription back to the session. Without it the API can't link the billing item and license issuance fails.
  • Fetch the license from GET /licenses/hub?session=... instead of refreshing it from a store-returned token. The manage-subscription responses no longer carry token/session, so that handling (and the ?session=undefined history rewrite) is removed.

Pairs with the store changes (cryptomator/store#24) and the API session-aware endpoints. Stacked on Phase 1 (#170); base moves to develop once that merges.

Flow

sequenceDiagram
  participant Web as Billing Page
  participant Store
  participant Paddle
  participant API

  Web->>Store: generate-pay-link
  Web->>Paddle: Checkout.open (passthrough {hub_id, session})
  Paddle--)API: webhook (passthrough {hub_id, session})
  API->>API: link billing item to session
  Web->>API: GET /licenses/hub?session=...
  API-->>Web: Hub license
Loading

Base automatically changed from feature/store-migration-phase1 to develop June 25, 2026 09:52
@tobihagemann tobihagemann merged commit ffa16fc into develop Jun 25, 2026
5 checks passed
@tobihagemann tobihagemann deleted the feature/store-migration-phase2 branch June 25, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants