#krystian
1 messages ยท Page 1 of 1 (latest)
Hi ๐ can you share the ID of the Subscription that you created as part of your testing?
sure one second
sub_1MgBw7AW7n1f4M8CEvZzGkpn
i also read in the docs that customer.subscription.created should fire before invoice.paid, but that doesn't seem to be the case here ^
ultimately, im trying to determine whether to provision trial (or any) access to the user from the invoice.paid or customer.subscription.updated event. in any event, it'd be good to know why updated isn't firing
Thank you, apologies for the delay (the server is pretty busy today) I'm taking a look at that Subscription.
You should never assume or rely on Events being delivered to you in a particular order. We cannot guarantee that those Events will reach your endpoint in the desired order.
got it, noted
When I double checked the API spec for the expected trigger for customer.subscription.updated I don't see any reference to it being triggered when the Subscription is created, it only mentions it being triggered when a Subscription is updated:
https://stripe.com/docs/api/events/types#event_types-customer.subscription.updated
Are you looking for customer.subscription.created instead?
https://stripe.com/docs/api/events/types#event_types-customer.subscription.created
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
this is where i got it from
so just trying to understand if the description is accurate, because its not reflecting that way for me
Thank you for that clarification, I believe that document is worded in a misleading manner or is making an assumption about the integration pattern being used. I'll flag it to my colleagues for review.
got it. so should i stick to invoice.paid for provisioning/enabling different access levels in that case? even for a trial?
That could be a good option, as that will be generated for Subscriptions with trials and those without. If you also accept/process one-off Invoices (as well as Invoices related to Subscriptions) then you may need to add filtering to your webhook endpoint to differentiate between the two flows.
wonderful. thank you!