#cnguyen85
1 messages · Page 1 of 1 (latest)
Hmm, you'd infer that from an invoice.paid event at the start of the new paid billing period
So I have to check the hook 'invoice.paid' and what I have to check exactly ?
Well you'd probably also want customer.subscription.updated to track the status transition to active from trialing
That will happen before we attempt payment
So you can infer a connection between those events via the in_xxx ID
yes I checkeced this but it's not good because it doesn't mean that the first billing (at the end of trial) is successful
that's why I try to find the way to check only the payment is successfuk
As explained, you can't infer that it was the end of the trial and payment was successful automatically from a single event.
So I have to listen invoice.paid and customer.subscription.updated ?
You'd listen for customer.subscription.updated events which will transition to status: 'active', then map the latest_invoice: 'in_xxx' to the ID in a corresponding invoice.paid event