#windy_code

1 messages ยท Page 1 of 1 (latest)

jovial scrollBOT
frozen heartBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

jovial scrollBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1237940132624072775

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

earnest kelp
tidal parrot
#

I am not sure what it means

#

I am using Next.js typescript frontend

#

so for free trial, don't we need to confirm the payment?

#
// Confirm the PaymentIntent without handling potential next actions (yet).
          const { paymentIntent, error: confirmError } =
            await stripe.confirmCardPayment(
              isSubscription
                ? (subscriptionPaymentIntent!.clientSecret as string)
                : (oneTimePaymentIntent?.client_secret as string),
              { payment_method: ev.paymentMethod.id },
              { handleActions: false }
            );
#

cc @wise spire

earnest kelp
#

For subscription with a free trial period, the first invoice that it create is a $0 invoice, and there's no payment_intent associated with a $0 invoice

#

But you can still use the subscription's pending_setup_intent to collect a payment method

tidal parrot
#

so how to handle it?

#

since there's no payment_intent, the stripe.confirmCardPayment fails

#

and how to get pending_setup_intent

earnest kelp
tidal parrot
#

The thing is I want to know the flow how the Free Trial works

#

in Payment Request Button