Skip to content

Conversation

@xlisachan
Copy link
Contributor

@xlisachan xlisachan commented Dec 10, 2025

Because

  • Sentry events frequently stating the "Server Components render" error occur for the CheckoutForm component
    • CheckoutForm is a client component, but it is importing the Node server SDK for Stripe causing Next to try to bundle Stripe Node SDK into the client build and surfacing the Server Components render error
    • Validation for paymentProvider was expecting an enum

This pull request

  • Updates import for Stripe to type-only since we are only using Stripe for Stripe.PaymentMethod.Type
  • Maps SubPlatPaymentMethodType to PaymentProvidersType

Issue that this pull request solves

Closes: PAY-3439

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.

@xlisachan xlisachan requested a review from a team as a code owner December 10, 2025 14:42
@xlisachan xlisachan marked this pull request as draft December 10, 2025 16:38
@xlisachan xlisachan force-pushed the polish_checkout-form branch 2 times, most recently from e9da02a to 69b630f Compare December 10, 2025 21:46
@xlisachan xlisachan changed the title fix(payments-ui): Prevent Server Components render error for CheckoutForm fix(payments): Fix validation for paymentProvider Dec 10, 2025
@xlisachan xlisachan marked this pull request as ready for review December 10, 2025 22:00
Because
- Sentry events frequently occur for the CheckoutForm component as it is a client component, but it is importing the Node server SDK for Stripe causing Next to try to bundle Stripe Node SDK into the client build and surface the Server Components render error
- Validation for paymentProvider was expecting an enum

This pull request
- Updates import for Stripe to import type-only since we are only using Stripe for Stripe.PaymentMethod.Type
- Updates to use SubPlatPaymentMethodType instead of PaymentProvidersType

Closes
- PAY-3439
@xlisachan xlisachan force-pushed the polish_checkout-form branch from 69b630f to a8c7c95 Compare December 11, 2025 15:40
@xlisachan xlisachan marked this pull request as draft December 11, 2025 17:59
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