#joshy_api

1 messages ยท Page 1 of 1 (latest)

shadow forumBOT
fast gardenBOT
#

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.

shadow forumBOT
#

๐Ÿ‘‹ 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.

exotic citrus
#

Req ID where subscription.pause_collection.behavior was set to void:
req_QABtRMlcAMuWWo

rigid fern
#

Hi ๐Ÿ‘‹

What are you trying to do in the request ID you first shared?

exotic citrus
#

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)

rigid fern
#

Do you have an example invoice?

exotic citrus
#

in_1PF1geJc8cbXO9roVHP7XZri and in_1PF1fGJc8cbXO9ro8lSEaido

#

I am testing with the Test Clock BTW, not sure if that affects anything

rigid fern
#

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.

exotic citrus
#

Interesting. So in 1 hour real-time maybe they'll be void?

rigid fern
#

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) ๐Ÿ˜…

exotic citrus
shadow forumBOT
rigid fern
#

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.

exotic citrus
#

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 ๐Ÿ˜…

old adder
#

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

exotic citrus
#

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

old adder
#

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)?

exotic citrus
#

Hmm yeah I think canceling the subscription is the best solution here