Skip to content

[MKT_923]:feat/new checkout design#2050

Open
jaaaaavier wants to merge 7 commits into
masterfrom
feat/checkout-new-design
Open

[MKT_923]:feat/new checkout design#2050
jaaaaavier wants to merge 7 commits into
masterfrom
feat/checkout-new-design

Conversation

@jaaaaavier

@jaaaaavier jaaaaavier commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description

Redesign of the checkout page to reduce friction, the billing address form is gone for standard purchases.

  • Removed the global AddressElement (billing name + full address) and the section titles/plan-features list from the checkout layout. The Pay button moved into the order summary card on desktop.
  • Billing country is now derived from the user's IP (useUserLocation). The payments backend only requires country + captchaToken on POST /customer; all address fields are optional there.
  • Conditional postal code input: shown only when the detected country is US, CA or IN, where Stripe Tax requires country + postal code to calculate tax (everywhere else the country alone is enough). Validated before payment.
  • Conditional address form for crypto: the AddressElement (name + full billing address) now renders only when the crypto payment dropdown is opened. Bit2Me requires full name and complete postal address for KYC (see [PB-5312]: feat/additional params when creating crypto invoce payments-server#322, [_]: fix/load-firefox-ponyfill-dynamically #327, [_]: feat/folder-sharing #328 — PB-5312), so the strict address validation now applies only to crypto purchases.
  • Customer name fallback chain: companyName → typed name (crypto form) → authenticated user's name → email.
  • Tax preview: initial price+tax preview keeps working via IP (already supported by GET /price-by-id); the recalculation effect now reacts to both the conditional postal code input and the crypto address form, debounced (500 ms).
  • Local type relaxation in checkout.service.ts (CreateCheckoutCustomerPayload): the SDK's CreateCustomerPayload still marks the address fields as required even though the backend does not. To be removed once the SDK type is updated.
  • New translation keys (checkout.postalCode.*, checkout.error.postalCodeRequired, checkout.error.countryRequired) in all 8 locales.

Related Issues

Related Pull Requests

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

For manual verification in Stripe test mode, the flows to cover are the following. For an EU card purchase (subscription and lifetime), no address fields are shown, the customer is created with the IP-derived country, tax is calculated and the payment confirms. With a US IP, the postal code input appears under the payment method, paying without it shows the postalCodeRequired error, and once a ZIP is entered the tax preview recalculates. For a crypto lifetime purchase, opening the crypto dropdown shows the billing address form, submitting an incomplete address shows the addressRequired error, and a complete address reaches Bit2Me invoice creation. Finally, for logged-in vs. new users, the customer name falls back correctly (account name / email).

Additional Notes

@jaaaaavier jaaaaavier self-assigned this Jul 16, 2026
@jaaaaavier jaaaaavier added the enhancement New feature or request label Jul 16, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: f16f19e
Status: ✅  Deploy successful!
Preview URL: https://5a573ac1.drive-web.pages.dev
Branch Preview URL: https://feat-checkout-new-design.drive-web.pages.dev

View logs

@jaaaaavier
jaaaaavier marked this pull request as ready for review July 16, 2026 10:44

@xabg2 xabg2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ Also, remove the useless translations for each JSON if needed

Comment thread src/views/Checkout/services/checkout.service.ts
Comment thread src/views/Checkout/components/CheckoutProductCard.tsx Outdated
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants