#tanuki-invoice-events

1 messages · Page 1 of 1 (latest)

wooden nimbus
#

@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

heady tangle
#

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...)

wooden nimbus
#

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

heady tangle
#

So i should prefer using the invoice status instead of the subscription status?

wooden nimbus
#

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

heady tangle
#

thanks you, i have to immerse myself in all of this !

wooden nimbus
#

haha yeah that's a lot of different events and it depends how you do fulfillment of your own service/product too

heady tangle
#

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

wooden nimbus
heady tangle
#

Okay i was not sure, i will use Stripe Checkout to start a subscription and use a mix between my own management & customer portal.

#

Last one, there is a way to try a subscription end / renewal ?

#

I actually read the doc but i found nothing about it 🤔