#mayhul_webhooks
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/1307057028207742986
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
The other piece here is that I need to know the client_reference_id of the checkout session. So I would normally just listen to customer.subscription.updated, but it seems like there's no way for me to see which checkout session the update came from
I suppose what I could also do is listen to customer.subscription.updated and then list all of the checkout sessions for that customer. And pull the client_reference_id from the most recent checkout session. Do you think that would preferrable?
Hi, event ordering is not guaranteed, https://docs.stripe.com/webhooks#event-ordering. The subscriptions would be created by the time checkout.session.completed is sent. Are you seeing otherwise? Can you share an example?
You would not want to make a GET request as it won't scale as you get bigger. Instead, you should store the data in your database and look at the data within customer.subscription.updated to match.
The subscription is created, but I'm unsure if it will be marked as active when checkout.session.completed is called
I haven't run into any issues yet, but I'm just trying to make sure our implementation makes sense
As long as there is a payment method and you get checkout.session.completed the subscription immediately becomes active.
We document how subscription statuses work here: https://docs.stripe.com/billing/subscriptions/overview
Ok, so I should expect that by the time I'm receiving the checkout.session.completed event, I can expect the subscription created during that session to be active?
Yes!
awesome, ty!