#yankovich
1 messages ยท Page 1 of 1 (latest)
you'd still get a customer.subscription.created event though, which seems like the correct event to use if the goal is to track when a user signs up?
I know. But I have already written the logic that expects exactly ustomer.subscription.update
And it works great for real money payments.
Why such a difference?
๐ taking over for my colleague. Let me catch up.
you can take a look at this doc https://stripe.com/docs/billing/subscriptions/webhooks#events where we explain the different type of events related to subscriptions
the recommended event is invoice.paid to give your customer access to your services
each invoice has a billing_reason https://stripe.com/docs/api/invoices/object#invoice_object-billing_reason which can help you figure out whether this is a new subscription (subscription_create), a subscription cycle (subscription_cycle) or an update happening to a subscription (subscription_update)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It looks logical. But I will have to make additional requests. Working with subscription.update was the most convenient ๐ญ
what info do you need to retrieve?
you can always retrieve the susbcription