#ihor-a_docs
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/1326867106616311859
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
What do you mean by "exactly in 1 month" exactly?
In general, do you want to stop providing services when the payment fails? And then reset the billing cycle anchor when a successful payment is made?
Sorry, I was not clear enough.
I create a monthly subscription (1 month). But after a few months user got this error "Payment failed because of insufficient funds". And pay an invoice in 2 weeks. It means that user do not have access to service until he pay the invoice.
For examlpe:
- Subscription created and invoice paid on Oct 1.
- Paid successfully on Nov 1.
- The payment failed on Dec 1.
- After multiple retries invoice was paid successfully on Dec 15. The current subscription period in Stripe is still from Dec 1 to Jan 1.
User do not have access to my service from Dec 1 to Dec 15.
The next invoice in Stripe will be created on Jan 1. Right?
What i'm trying to do is shift the billing cycle to the facial date of payment - Dec 15.
To provide user access from Dec 15 to Jan 15.
And make the next payment date Jan 15.
I hope this explains my situation well
It means that user do not have access to service until he pay the invoice.
How are you enforcing that?
So my understanding here is correct?
Yes, this is correct
In this case, what you can do is:
- Once the
past_dueSubscription is paid, you can make a requests to updatebilling_cycle_anchor="now": https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_cycle_anchor - In order to avoid any kind of prorations, you can set
proration_behavior="none": https://docs.stripe.com/api/subscriptions/update#update_subscription-proration_behavior - Until then, make sure you don't provide your services when
status="past_due".
Once the past_due Subscription is paid, you can make a requests to update billing_cycle_anchor="now":
Would not this create new invoice immediatelly?
anyway, let me test this approach. And I will be back in a couple of hours.
Please try this and see what happens.
I the worst case it will charge the customer twice, in which case we will need to find another way round.
Potentially the next best solution is to cancel the Subscription and create a new one when the customer adds a valid PaymentMethod.
Generally, by design, you should be providing services as long as the Subscription is not cancelled.