#raz
1 messages · Page 1 of 1 (latest)
Hi, let me help you with this.
I would recommend invoice.paid
payment_intent.succeeded is also fine, but invoice.paid is more high-level.
Hi, so currently I have setup one time payments and also subscriptions, thing is I want to differentiate a payment that was done through the monthly subscription and one that is done via a one time payment
are there different events for those 2?
so I can specifically let my 2 webhook endpoints listen for different events
The invoice.paid will contain the Invoice object, that will have a subscription property set. One-time Invoices won't have it.
Happy to help.
One more thing I wanted to ask, do I open another thread or?
checkout.session.completed is only fired for one time payments? For subscriptions the checkout session remains open and never completes?
No, it completes when you pay the first Invoice successfully and the Subscription is active
Understood, thank you