Skip to content

[PM 35227](server) Extend checkout endpoint for browser/desktop platforms#7550

Open
cyprain-okeke wants to merge 7 commits intomainfrom
billing/pm-35227/server-extend-checkout-endpoint-for-browser-desktop-platforms
Open

[PM 35227](server) Extend checkout endpoint for browser/desktop platforms#7550
cyprain-okeke wants to merge 7 commits intomainfrom
billing/pm-35227/server-extend-checkout-endpoint-for-browser-desktop-platforms

Conversation

@cyprain-okeke
Copy link
Copy Markdown
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-35227

📔 Objective

Purpose: Extends the premium checkout session endpoint to support browser and desktop platforms, in addition to the existing ios and android platforms.

Changes:

  • Added browser and desktop as valid platform constants in StripeConstants
  • Updated request validation to accept the new platforms
  • Introduced platform-specific success/cancel redirect URLs so browser and desktop clients are redirected to appropriate post-checkout pages (separate from mobile URLs)
  • Added new GlobalSettings properties for browser and desktop checkout URLs (BrowserPremiumCheckoutSuccessUrl, BrowserPremiumCheckoutCancelUrl, DesktopPremiumCheckoutSuccessUrl, DesktopPremiumCheckoutCancelUrl)
  • Extracted URL resolution into a GetCheckoutUrls method that switches on platform
  • Added unit tests for request validation and platform-specific URL routing, including browser, desktop, and unsupported platform cases

📸 Screenshots

Screenshot 2026-04-27 at 3 34 36 PM Screenshot 2026-04-27 at 3 33 30 PM Screenshot 2026-04-27 at 3 32 31 PM

@cyprain-okeke cyprain-okeke requested a review from a team as a code owner April 27, 2026 14:35
@cyprain-okeke cyprain-okeke requested a review from kdenney April 27, 2026 14:35
cyprain-okeke and others added 4 commits April 27, 2026 15:38
…owser-desktop-platforms' of https://140.82.121.4/bitwarden/server into billing/pm-35227/server-extend-checkout-endpoint-for-browser-desktop-platforms
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 28, 2026

Logo
Checkmarx One – Scan Summary & Detailsc8540d4a-0d74-4e39-8ac8-cc26eb5ef230


New Issues (2) Checkmarx found the following issues in this Pull Request
# Severity Issue Source File / Package Checkmarx Insight
1 MEDIUM CSRF src/Api/Vault/Controllers/CiphersController.cs: 1558
detailsMethod at line 1558 of /src/Api/Vault/Controllers/CiphersController.cs gets a parameter from a user request from id. This parameter value flows ...
Attack Vector
2 MEDIUM CSRF src/Api/Vault/Controllers/CiphersController.cs: 1385
detailsMethod at line 1385 of /src/Api/Vault/Controllers/CiphersController.cs gets a parameter from a user request from id. This parameter value flows ...
Attack Vector

Copy link
Copy Markdown
Contributor

@kdenney kdenney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice job! Checks are failing but will most likely be fixed once key rotation is all wrapped up.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.78%. Comparing base (55e06e3) to head (5d00321).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7550      +/-   ##
==========================================
+ Coverage   59.76%   59.78%   +0.02%     
==========================================
  Files        2103     2103              
  Lines       92738    92762      +24     
  Branches     8262     8263       +1     
==========================================
+ Hits        55426    55459      +33     
+ Misses      35354    35345       -9     
  Partials     1958     1958              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 7, 2026

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