diff --git a/apps/web/server/lib/auth/sso/[provider]/getServerSideProps.tsx b/apps/web/server/lib/auth/sso/[provider]/getServerSideProps.tsx index 88166626f1..239fd701aa 100644 --- a/apps/web/server/lib/auth/sso/[provider]/getServerSideProps.tsx +++ b/apps/web/server/lib/auth/sso/[provider]/getServerSideProps.tsx @@ -128,7 +128,6 @@ const getStripePremiumUsernameUrl = async ({ const checkoutSession = await stripe.checkout.sessions.create({ mode: "subscription", - payment_method_types: ["card"], customer: customer.id, line_items: [ { diff --git a/packages/app-store/_utils/paid-apps.ts b/packages/app-store/_utils/paid-apps.ts index 1217831a45..1849f01d8d 100644 --- a/packages/app-store/_utils/paid-apps.ts +++ b/packages/app-store/_utils/paid-apps.ts @@ -26,7 +26,6 @@ export const withPaidAppRedirect = async ({ success_url: redirect_uri, cancel_url: redirect_uri, mode: appPaidMode === "subscription" ? "subscription" : "payment", - payment_method_types: ["card"], allow_promotion_codes: true, customer: stripeCustomerId, line_items: [ diff --git a/packages/app-store/stripepayment/api/subscription.ts b/packages/app-store/stripepayment/api/subscription.ts index 1d15027747..dfb31e60b6 100644 --- a/packages/app-store/stripepayment/api/subscription.ts +++ b/packages/app-store/stripepayment/api/subscription.ts @@ -40,7 +40,6 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) const return_url = `${WEBAPP_URL}/api/integrations/stripepayment/paymentCallback?checkoutSessionId={CHECKOUT_SESSION_ID}&callbackUrl=${callbackUrl}`; const createSessionParams: Stripe.Checkout.SessionCreateParams = { mode: "subscription", - payment_method_types: ["card"], line_items: [ { quantity: 1, diff --git a/packages/app-store/stripepayment/lib/PaymentService.ts b/packages/app-store/stripepayment/lib/PaymentService.ts index d3c3a3816e..5243541349 100644 --- a/packages/app-store/stripepayment/lib/PaymentService.ts +++ b/packages/app-store/stripepayment/lib/PaymentService.ts @@ -87,7 +87,6 @@ export class PaymentService implements IAbstractPaymentService { const params: Stripe.PaymentIntentCreateParams = { amount: payment.amount, currency: payment.currency, - payment_method_types: ["card"], customer: customer.id, metadata: { identifier: "cal.com", diff --git a/packages/features/auth/signup/handlers/calcomHandler.ts b/packages/features/auth/signup/handlers/calcomHandler.ts index d90e6864a0..d8d701cc9d 100644 --- a/packages/features/auth/signup/handlers/calcomHandler.ts +++ b/packages/features/auth/signup/handlers/calcomHandler.ts @@ -109,7 +109,6 @@ async function handler(req: RequestWithUsernameStatus, res: NextApiResponse) { if (req.usernameStatus.statusCode === 402) { const checkoutSession = await stripe.checkout.sessions.create({ mode: "subscription", - payment_method_types: ["card"], customer: customer.id, line_items: [ { diff --git a/packages/features/ee/payments/components/Payment.tsx b/packages/features/ee/payments/components/Payment.tsx index 65d8b63fe2..4c7e849c19 100644 --- a/packages/features/ee/payments/components/Payment.tsx +++ b/packages/features/ee/payments/components/Payment.tsx @@ -1,7 +1,6 @@ -import type { Payment } from "@prisma/client"; -import type { EventType } from "@prisma/client"; +import type { EventType, Payment } from "@prisma/client"; import { Elements, PaymentElement, useElements, useStripe } from "@stripe/react-stripe-js"; -import type { StripeElementLocale, StripeElements } from "@stripe/stripe-js"; +import type { StripeElementLocale, StripeElements, StripePaymentElementOptions } from "@stripe/stripe-js"; import { useRouter } from "next/navigation"; import type { SyntheticEvent } from "react"; import { useEffect, useState } from "react"; @@ -63,6 +62,10 @@ export const PaymentFormComponent = ( const [holdAcknowledged, setHoldAcknowledged] = useState(paymentOption === "HOLD" ? false : true); const disableButtons = isCanceling || !holdAcknowledged || ["processing", "error"].includes(state.status); + const paymentElementOptions = { + layout: "accordion", + } as StripePaymentElementOptions; + useEffect(() => { elements?.update({ locale: i18n.language as StripeElementLocale }); }, [elements, i18n.language]); @@ -70,7 +73,7 @@ export const PaymentFormComponent = ( return (
- onPaymentElementChange()} /> + onPaymentElementChange()} />
{paymentOption === "HOLD" && (