#carasco6170_api
1 messages ¡ Page 1 of 1 (latest)
đ 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.
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 find it under pending_setup_intent: https://docs.stripe.com/api/subscriptions/object#subscription_object-pending_setup_intent
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)
o thx i will test it
Happy to help.
I also want to ask which event should i use to track this? I mean to track if 0 euro payment was succesfull
setup_intent.succeeded, or customer.subscription.updated
so last question whats the difference between setup_intent.setup_failed and setup_intent.canceled
hi! I'm taking over this thread.