Skip to content

[PB-6912]: feat/support the checkout without a Drive session - #2187

Merged
xabg2 merged 5 commits into
featurew/sign-up-passwordless-for-checkoutfrom
feat/PB-6912-checkout-without-session
Oct 6, 2026
Merged

xabg2 merged 5 commits into
featurew/sign-up-passwordless-for-checkoutfrom
feat/PB-6912-checkout-without-session

Conversation

@xabg2

@xabg2 xabg2 commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Description

First part of letting new customers pay before creating their account (PB-6873). This adds the pieces the checkout needs to work for a buyer who has no Drive session yet, without changing anything visible:

  • A checkout client that doesn't need a Drive session, so an unexpected error during an anonymous purchase never logs anyone out.
  • Creating the checkout customer and the subscription or payment intent for a buyer without an account.
  • A feature flag (REACT_APP_PASSWORDLESS_CHECKOUT_ENABLED, off by default) that later PRs use to switch the new checkout on.
  • A small shared service to resend the account setup email and recognise the "account setup pending" error.

Related Issues

  • PB-6912 (subtask of PB-6873)

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

Unit tests for the checkout service (customer, subscription and payment intent created through the client without a session for buyers without an account, and through the usual client for logged-in users) and for the payment hook. tsc, lint and the checkout, services and core test suites pass.

Additional Notes

Nothing changes for users yet: nothing calls these paths until the next PR, and the flag is off by default. The SDK version still needs to be bumped once internxt/sdk#444 is released.

Add the passwordless checkout groundwork: an env flag, a checkout SDK
client that carries no session token, an account-setup service, and
the createCustomerWithoutAccount/withoutSession option in the checkout
service and payment hook. No user-facing behaviour changes yet.
@xabg2 xabg2 added the enhancement New feature or request label Sep 29, 2026
@xabg2 xabg2 self-assigned this Sep 29, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: eac761d
Status:⚡️  Build in progress...

View logs

@xabg2
xabg2 marked this pull request as ready for review September 30, 2026 09:35
Comment on lines +65 to 79
const paymentIntentResponse = isPasswordlessSignUp
? await checkoutService.createPaymentIntent(
{ customerId, priceId, currency, userAddress, token, captchaToken, promoCodeId },
{ withoutSession: true },
)
: await checkoutService.createPaymentIntent({
customerId,
priceId,
currency,
userAddress,
token,
captchaToken,
promoCodeId,
});

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: I think that could be simplified using withoutSession: !!isPasswordlessSignUp

@xabg2
xabg2 changed the base branch from master to featurew/sign-up-passwordless-for-checkout October 6, 2026 11:23
@xabg2
xabg2 merged commit 391c388 into featurew/sign-up-passwordless-for-checkout Oct 6, 2026
1 of 3 checks passed
@xabg2
xabg2 deleted the feat/PB-6912-checkout-without-session branch October 6, 2026 11:41
@sonarqubecloud

sonarqubecloud Bot commented Oct 6, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
71.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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