#joshy_api
1 messages ยท Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- joshy_subscription-invoice-void, 25 minutes ago, 12 messages
- joshy_customer-paymentmethod, 22 hours ago, 8 messages
๐ 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/1238616067824291870
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Req ID where subscription.pause_collection.behavior was set to void:
req_QABtRMlcAMuWWo
Hi ๐
What are you trying to do in the request ID you first shared?
In that request, I listened for the invoice.payment_failed event, then I paused payment collection for that subscription so that invoices were no longer created. (https://discord.com/channels/841573134531821608/1238599981829455993)
Actually I believe I manually paused collection for that subscription, but it still created DRAFT invoices after pausing and kept them as DRAFT (still now)
Do you have an example invoice?
in_1PF1geJc8cbXO9roVHP7XZri and in_1PF1fGJc8cbXO9ro8lSEaido
I am testing with the Test Clock BTW, not sure if that affects anything
I'm like 90% certain it does. The odd thing is, behind the scenes, all those invoices have a state of closed_cancelled and were created like that.
Let me test something.
The counter that keeps new invoices in draft for 1 hour after they are created is separate from the Test Clock time.
Interesting. So in 1 hour real-time maybe they'll be void?
But our docs https://docs.stripe.com/billing/subscriptions/pause-payment#collect-payment-never explicitly say
All invoices created before the resumes_at date are immediately marked as void.
So in 1 hour real-time maybe they'll be void?
I think so, you will know before me though (since your invoices were created earlier) ๐
Maybe it's because I didn't use resumes_at, just indefinitely paused collection
Okay I just created a new sub and then set pause_collection.behavior="void". I see the invoice.created event has the status as draft but then I immediately see an invoice.voided event (well 2 seconds later)
You might try setting the payment_behavior in you NodeJS code. the only difference I see is that your update to the Subscription occurred via the Dashboard.
I need to go but my colleague @old adder will be able to help you dig further if you want to continue the investigation.
Yeah it worked now when I didn't pause through the dashboard and paused through my backend. That's interesting.
I'm working with a new subscription now, sub_1PF2AwJc8cbXO9roBy24XoU0
Now the issue is that the subscription is still marked as past_due when there is nothing past due ๐
I think that's expected, since the Subscription is still technically active and has an upcoming Invoice. Voiding the Invoice doesn't automatically cancel a Subscription. The Subscription either has to be explicitly canceled via an intervention from you and your integration, or after Stripe exhausts payment retry attempts
My goal was to stop drafting new invoices when one fails, then continue again once they pay the OPEN/FAILED invoice. I didn't want to cancel the sub
There isn't a way to stop Invoice creation for Subscriptions that aren't cancelled, but you can pause the subscription, which supresses things like upcoming invoice emails and webhooks: https://docs.stripe.com/billing/subscriptions/pause-payment
Not sure if that fits your use-case though. If not, can you elaborate on why you don't want to:
(a) cancel the subscription and create a new one later (if needed), or
(b) keep it in a past_due status and let it create invoices without payment attempts (i.e. via pausing as mentioned above)?
Hmm yeah I think canceling the subscription is the best solution here