stripeのstripe.confirmPaymentでSSRしなくする

コード

await stripe.confirmPayment({
    elements,
    confirmParams: {
      return_url: 'http://localhost:3000'
      payment_method_data: {
        billing_details: {
          name: "ユーザー名",
        }
      }
    }, redirect: 'if_required'
  })

参考記事

How to prevent redirect - "Stripe Elements & PaymentIntents (no redirect)" - I can't avoid redirect · vercel/next.js · Discussion #33846

Hello, I'm having an issue with the Elements version of the example in the folder "with-stripe-typescript". I'm trying to keep the form on the client side while confirming the paymentIntent. I'm us...

GitHub