#zonixo
1 messages · Page 1 of 1 (latest)
Yes invoice.paid is a good event to listen to, you can check the billing_reason on the invoice to see if it is the first payment on the subscription or if it is a recurring one https://stripe.com/docs/api/invoices/object#invoice_object-billing_reason
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I can look for other docs, is there is a specific part of this that you are stuck on?
It seems that for recurring payment the invoice.paid is the good one to follow with customer.subscription.updated ( but not sure if this one will be called before or after and what is the purpose ).
The little confusion is probably more at the beginning when user subscribe for the first time after the checkout page. There is an event of checkout.session.completed but i don't know what is the purpose of this one.
That event also tells you that the first payment has succeeded. You can also use that to see that a subscription has started.
They both signal that the first payment has succeeded but they are about different API objects. For some use cases it makes more sense to use one event, for some it makes more sense to use the other, for some they are more or less interchangable
Okay i will check the object to see what is needed.
Thank you
It's also possible to get the documentation about how the customer manage the checkout page ? I suppose they can update their credit card or something.
There is a similar Stripe-hosted page called the Customer Portal that you can use here. https://stripe.com/docs/customer-management