From 823d655a51c0b5f2caa4d94deb870c3e3d5e772e Mon Sep 17 00:00:00 2001 From: panteliselef Date: Fri, 22 Aug 2025 18:48:38 +0300 Subject: [PATCH 1/3] fix(clerk-js): Update checkout to list available methods at trial checkout --- .../clerk-js/src/ui/components/Checkout/CheckoutForm.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/clerk-js/src/ui/components/Checkout/CheckoutForm.tsx b/packages/clerk-js/src/ui/components/Checkout/CheckoutForm.tsx index 0f442f237a3..1e2c34a6b2a 100644 --- a/packages/clerk-js/src/ui/components/Checkout/CheckoutForm.tsx +++ b/packages/clerk-js/src/ui/components/Checkout/CheckoutForm.tsx @@ -192,7 +192,7 @@ const useCheckoutMutations = () => { const CheckoutFormElements = () => { const { checkout } = useCheckout(); - const { id, totals } = checkout; + const { id, totals, freeTrialEndsAt } = checkout; const { data: paymentSources } = usePaymentMethods(); const [paymentMethodSource, setPaymentMethodSource] = useState(() => @@ -210,7 +210,7 @@ const CheckoutFormElements = () => { sx={t => ({ padding: t.space.$4 })} > {/* only show if there are payment sources and there is a total due now */} - {paymentSources.length > 0 && totals.totalDueNow.amount > 0 && ( + {paymentSources.length > 0 && (totals.totalDueNow.amount > 0 || freeTrialEndsAt) && ( 0 && !freeTrialEndsAt; + const shouldDefaultBeUsed = totalDueNow.amount === 0 || !freeTrialEndsAt; return (
- {isSchedulePayment ? ( + {shouldDefaultBeUsed ? (