#carasco6170_api

1 messages ¡ Page 1 of 1 (latest)

hexed axleBOT
#

👋 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/1334087476813238342

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

bleak scroll
#

Hi, let me help you with this.

#

When you create a Subscription with a trial, there's no immediate payment so no PaymentIntent is created. Instead, a SetupIntent is created automatically, which you can use to collect payment details from the customer and use on the Subscription.

#

You can just change your expand to:

expand: ['latest_invoice.payment_intent', 'pending_setup_intent']
#

Then you can use the SetupIntent's client_secret to render the Payment Element (or another surface you use to collect the payment details)

tawdry path
#

o thx i will test it

bleak scroll
#

Happy to help.

tawdry path
#

I also want to ask which event should i use to track this? I mean to track if 0 euro payment was succesfull

bleak scroll
#

setup_intent.succeeded, or customer.subscription.updated

tawdry path
#

so last question whats the difference between setup_intent.setup_failed and setup_intent.canceled

hexed axleBOT
hazy night
#

hi! I'm taking over this thread.