#tanuki-invoice-events
1 messages · Page 1 of 1 (latest)
@heady tangle it's best to listen to invoice.paid and invoice.payment_failed to track payments
the invoice for example stays active until after the first failed payment, so you'd provision incorrectly overall
Usually you want to keep access while you wait for a payment for example
Thank you, i didn't think about it!
One more question, what is the status of the subscription on invoice.paid ? do i need to retrieve the full subscription data to get the status ?
In the InvoiceLineItem, the subscription doesn't have a status (trialing, active...)
Assuming the invoice paid is the latest one, the subscription would have status: 'active'
it's also expected line items don't have a status, it wouldn't make sense, they are a snapshot/record of the line item itself when it was invoiced
So i should prefer using the invoice status instead of the subscription status?
no, you need to look at both really
You listen to invoice.paid and invoice.payment_failed to handle fulfillment and you also monitor the subscription status changing via customer.subscription.updated to also keep track of the subscription's status
thanks you, i have to immerse myself in all of this !
haha yeah that's a lot of different events and it depends how you do fulfillment of your own service/product too
One more time. Is it possible to update a subscription with Stripe Checkout ?
On my app i have 3 offers, the first time we subscribe to one by using Stripe Checkout.
I allow to upgrade the subscription.
Actually i use the subscription update api call, but i think it should be better if i use Stripe Checkout / Invoice instead
Stripe Checkout can start a subscription. To update/change one, you want the Customer Portal https://stripe.com/docs/billing/subscriptions/customer-portal