#Zarbi4734

1 messages · Page 1 of 1 (latest)

sick shellBOT
cerulean estuary
#

Hi there

upper valley
#

hi

#

sorry by inactive I meant other than "active"

cerulean estuary
#

It's a good question

#

Pretty sure it moves to past_due

upper valley
#

okay so I don't have to force it by sending a req to stripe, I just need to cancel it on my side right ?

cerulean estuary
#

Not sure what you mean by "force it"?

#

Like force the finalization of it?

upper valley
#

yes

cerulean estuary
#

Ah no you don't have to if you don't want to. Up to you how you want to handle it really

upper valley
#

okay thanks !

#

Just one last question:
When the customer have an error when automatically paying (like invoice.payment_failed or even invoice.finalization_failed I know that I need to "pause" the subscription on my side but my question is: when the customer update his payment method and that the payment go throw, does the invoice.paid event is fired ?

cerulean estuary
#

Yep invoice.paid will always fire when a successful payment is made

#

Mostly you just want to focus on the status of the Subscription object

#

I'd recommend using the customer.subscription.updated event to track that status

upper valley
#

humm yeah but it's not fired for new subscriptions

cerulean estuary
#

True, you would use customer.subscription.created for that

upper valley
#

Okay, but what about the end date of the subscription ?

#

I track the end date by updating it with the current_period_end in the paid invoice

cerulean estuary
#

It is mostly up to you. Using invoice.paid is fine, it is just less all-encompassing in my opinion

upper valley
#

okay So I can do everything with the invoice after all ?

#

tracking new subscriptions and updated ones (like when a cust changes his plan)

cerulean estuary
#

No you can't track updated Subs via invoice.paid 🙂

#

I meant you can track renewal

#

But that is why I recommend customer.subscription.updated

#

Because you can track everything with just that event (and customer.subscription.created)

upper valley
#

But when a customer update his plan, it generate an invoice right ?

cerulean estuary
#

Not always. Depends on your integration and what update is occurring

upper valley
#

okay, so if I resume, I can track new subscriptions with the invoice.paid and renewal, but if I want to track plan update/downgrade I should use the customer.subscription.updated

cerulean estuary
#

Yep that would work fine

upper valley
#

okay thanks a lot !