#windy_code
1 messages ยท Page 1 of 1 (latest)
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.
- windy_code, 1 day ago, 53 messages
- windy_code, 1 day ago, 18 messages
๐ 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.
Hi there, this is how you create a subscription with a free trial peroid. https://docs.stripe.com/billing/subscriptions/trials
When you use PaymentRequest to confirm the subscription pending_setup_intent, you can set PKRecurringPaymentSummaryItem's startDate so that your customer know when exactly when they will be charged. See this for more details https://docs.stripe.com/billing/subscriptions/build-subscriptions?platform=ios#add-apple-pay
yeah i used that doc
lemme check it
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
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
so how to handle it?
since there's no payment_intent, the stripe.confirmCardPayment fails
and how to get pending_setup_intent