#gagan.suie

1 messages · Page 1 of 1 (latest)

paper bobcatBOT
acoustic kernel
kindred sleet
#

so how do i change the subscription status of a user in our internal database at the end of a period if they canceled?

acoustic kernel
kindred sleet
#

will invoice.payment_failed ever trigger before a period ends?

acoustic kernel
#

If the payment fails, sure

kindred sleet
#

when does payment retrieval typically occur?

#

im using the following events for our webhook flow.

invoice.paid: to trigger paid events
customer.subscription.updated: if user changes from paid to free plan, update with cancel_at_period_end.
invoice.payment_failed: if payment fails
customer.subscription.deleted: triggers at the end of a period to change subscription on our end.

acoustic kernel
#

What do you mean by 'when does payment retrieval typically occur?'?

kindred sleet
#

when does payment occur for a user that has a subscription

#

on the 30th of each month?

acoustic kernel
kindred sleet
#

fantastic! thank you

acoustic kernel
kindred sleet
#

and if it fails, we cancel their subscription

acoustic kernel
#

You can see what upcoming invoices are coming in advance to prepare for keeping payment details up to date. On that same page, you can set Stripe to send remind emails to your customers for upcoming payments as well. If the payment fails, we also have a few settings, under 'Manage failed payments' and can even cancel the subscription programmatically if all reties fails on that invoice. Or as you mentioned, you can cancel it manually.

#

If you do not have any questions on this, I'm archiving this thread

kindred sleet
#

no not yettt

#

one second im investigating these links

kindred sleet
#

by default, how many times does a request for payment trigger before canceling, and can i change this setting??

barren sparrow
#

👋 hello! hopping in here since pgskc had to head out

kindred sleet
#

awesome! last question:

#

if a user is on paid plan, and switches to free plan at $0. and they remove their card. will that trigger payment failed events?

barren sparrow
#

No, if the user is on a free plan then removing their card would still allow payment to succeed

kindred sleet
#

when a retry payment fails, it triggers the invoice.payment_failed event correct?

barren sparrow
#

Correct

kindred sleet
#

boom

#

i think we got it

#

all scenarios covered.

#

@barren sparrow thank you so much for your help

#

you may close this case