#daviddd_code

1 messages ยท Page 1 of 1 (latest)

brave karmaBOT
#

๐Ÿ‘‹ 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/1340985114351636481

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

warped bay
#

Because when there is a trial there is no payment. Instead you want to get the pending_setup_intent field from the Subscription object

brave karmaBOT
distant sun
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

stable vapor
distant sun
#

when you start a subscription in trial period, there won't be any payment until the trial period has ended

#

to collect the payment method to be charged later for the first payment after the trial period, you need to use the pending_setup_intent's client_secret and confirm the setup on the front end

#

so you need to add both latest_invoice.payment_intent and pending_setup_intent to the expand

#

and based on whether the pending_setup_intent is null or not, you send the corresponding client_secret and type of confirmation (setup or payment) to the frontend to correctly collect the payment methods and confirm the SetupIntent or the PaymentIntent