#yankovich

1 messages ยท Page 1 of 1 (latest)

torpid bayBOT
sudden haven
#

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?

torpid bayBOT
hoary orchid
#

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?

wicked sapphire
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

#

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)

hoary orchid
#

It looks logical. But I will have to make additional requests. Working with subscription.update was the most convenient ๐Ÿ˜ญ

wicked sapphire
#

what info do you need to retrieve?

hoary orchid
#

current_period_end
current_period_start

#

For example

wicked sapphire
#

you can always retrieve the susbcription