#mayhul_webhooks

1 messages ¡ Page 1 of 1 (latest)

umbral irisBOT
#

👋 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.

storm mountain
#

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?

amber flare
#

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.

storm mountain
#

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

amber flare
#

As long as there is a payment method and you get checkout.session.completed the subscription immediately becomes active.

storm mountain
#

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?

amber flare
#

Yes!

storm mountain
#

awesome, ty!