#mindsetinmeta_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1263822453566865460
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
It would depend on the status of the Subscription. If incomplete_expired, then you'd need to create a new sub
what event should I listen to to update that?
Update what specifically?
I'm currently listening to invoice.payment_failed
update the subscription status
customer.subscription.updated?
or subscription_schedule.updated
that one yes
customer.subscription.updated (sorry it wasn't clear, I replied to that specific message).
cool
thanks
when it's overdue but subscription status is incomplete_expired, then I'm assuming I should create a new checkout session for user to pay for a new schedule.
on the other hand, when it's overdue but subscription status is NOT incomplete_expired, what should I do to have the user pay again? create a checkout session with subscription ID?
it can't be in overdue and incomplete_expired at the same time. incomplete_expired is a very specific status for when the first Invoice of a subscription is never paid and thus the subscription was never activated/started, it goes to that status after 23 hours.
you probably want to step back a bit here and clearly lay out the scenario you're facing with specific examples and IDs etc so we can fully understand the use case
It's a monthly subscription. Tom paid for it on the 1st day of July. The next renew is August 1st. However, his credit card was not able to be charged automatically on the Aug 1st so the subscription status changes to _____________?
hi! I'm taking over this thread.
it depends on your dashboard settings here https://dashboard.stripe.com/settings/billing/automatic
Stripe will automatically retry it?
again, it depends on your settings on that same page
I'm using API. Can these be set up using API?
the settings I shared can only be set in the dashboard.
then they apply to all Subscriptions created by your Stripe account
so I don't have to worry about retries.
Stripe handles that.
If all retries fail, the subscription status will be set to "canceled"
as I configured in Stripe
yes that makes sense
meanwhile, what if I want to give a button for user to retry it manually?
Say user can click the button and pay for the overdue
you can. the simplest option is probabbly to find the last Invoice of the Subscription, and send the users to the hosted invoice page: https://docs.stripe.com/api/invoices/object#invoice_object-hosted_invoice_url
thanks