#LibbySwanger - test clock
1 messages · Page 1 of 1 (latest)
Hello, as Pain said some things will trigger slightly after the timestamp you'd expect them to. If that doesn't work I can look in to the specific invoice if you send me the ID
You may also want to check your settings,
Oh! What settings should I check?
Just a moment whilst I get the link
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Check the Manage failed payments
You should have a retry schedule in there with a few settings
@vestal current the invoice ID is in_1LEFjYCKdFRIRRTEGz3Et3yc
Thank you. Will check in to that ID in a minute
These are my settings for my subscriptions.
I believe they're set differently originally, it will keep trying to charge?
And yes check that setting if you have "leave subscription as is" that may be the cause
If the subscription is set to send invoice rather than charge automatically, does this setting have an effect?
That's something you will have to change if you want to cancel the subscription once payment fails
I believe this goes back to your settings too
We have it set to "mark the subscription as unpaid"
Custom retry schedule.
However, I have not made an attempt to pay the invoice. I've been trying to confirm what happens when the subscription is past due.
When the subscription is past due it will create a charge
Ahhh I see!
It should charge the default payment method
Even if the account is invoiced?
I believe there is an event sent when the subscription is past due
I cannot recall entirely, Pompey may know better.
Yes, that is the 'customer.subscription.updated' event
But if I'm not wrong, it should fall back on the account settings for subscriptions.
The issue is that the subscription is not being marked past due, so it's not being updated.
That's weird, let me try it on my end.
You used the email invoice to customer correct?
Yes
My status was set to overdue
The invoice is incomplete
and subscription status was set to overdue
When you created the subscription, how many days did you put for the invoice?
The payment due
30 days, but also, I have my settings marked to "leave invoice as-is" when all payment retries fail. I've updated that to mark invoice as uncollectible. I'll advance time and see if that changes anything.
Yes,
I set mine to a day just for testing, and you need to have the setting
as that updates the invoice
also the status did change to past_due
Yes, I believe that's the status it will have
as mine is the same
then a new draft invoice should be generated
I'm confused - why would a new draft invoice be generated?
for the next payment
Ohh I see
But what I'm trying to understand is why an open invoice due July 31, when the test clock time is in September, isn't causing the subscription to be marked past due.
I believe the invoice isn't part of the clock
If you open the invoice link up you will see, it states "due in x days"
instead of saying "past due"
but the status should change
Scroll down and click payment page
Since that isn't part of the testclock, I'm not too sure
Ahhhhhhhhh
I see!
So it's possible that I won't be able to test this aspect of the integration using test clocks.
You should be receiving events though
I am receiving events, yes
One of them should return the past_due status
Just to clarify, I'm not a staff member or anything; just another Stripe consumer. This is mainly from my knowledge so I may be wrong.
Thank you for the clarification! I really appreciate you helping out.
Yeah sorry the server has been busy and it has been hard to keep up with this thread. Where are we now with this?
The testclocks do not update the invoice status as it seems they do not actually impact them (based on the settings at least).
But they do reflect onto the subscription.
@vestal current I've tweaked my subscription settings so that after retry attempts are exhausted, the invoice is marked as uncollectible. I've advanced the test clock time by a minute a few times. The subscription is still active instead of past_due.
It still does not set the status to past_due?
Nope.
Can you send the ID of this latest subscription as well?
sub_1LEDxJCKdFRIRRTEvTo8ATvj
Thank you. I have asked for help from a colleague on looking in to this one so we should have a better idea of what is going on soon
Thank you!!!
Alright so I've tested it and the issue is the amount of days you have set the invoice to
You need to advance by 30 days (or however many you have set) not a few
The invoice is already well past due though - its due date is July 31 and the test clock date is Sept 6
Hmm, let me try to go past mine.
I'll have to create another subscription since I can only advance 1 day at the time currently, moment.
No
The subscription is set to "send invoice" rather than "charge automatically" so no attempts are made
Just to clarify, mine are being kept open too even though it's past the date which leads me to believe the test clock isn't simulating that part of the invoice.
But I'm looking at past invoices which were generated the same, they're marked as uncollectible or failed (which were not simulated).
Not sure if that's entirely the problem.
on invoice statuses - if the subscription is set to send_invoice instead of charge_automatically, the invoice remains open even once the due date has elapsed. Once a configured amount of time has elapsed, the invoice is set to uncollectible to reflect that we assume the customer will not or cannot pay the invoice.
But once the invoice due date has elapsed, the subscription should be marked past_due.
I just tested with 10 days, for me it did set the subscription as "overdue" and status past_due
What I can see is that you already paid October
Can you try making a new subscription with 1 day payment then simulating forward a day
Because I believe that subscriptions renewal is now in November
This should set it as past due
Invoice status will still be "open" after the due_date unless you've specified otherwise here:
but the subscription should still be getting marked past due, shouldn't it?
You already paid October
Judging by the image you sent
Yes but there is also an invoice on the account that is past due.
That does not matter as you’ve paid an invoice that’s recent
Which set it back to active
Check the subscription the date should’ve been updated
Whoa, really?
It’s the same as if you were to renew the subscription in a way, was scratching my head for a second on why it wouldn’t set it to overdue
Just to make sure I understand the flow -
- invoice is issued and goes unpaid
- we pause service on our end because of the unpaid invoice
- subscription is still billed monthly, so an invoice of $0 is issued (because we have paused service) and is marked paid (because it is $0)
- subscription is set back to active because the most recent invoice is paid
I believe you have it confused with another flow
Where you would still generate invoices but stop the service if they're unpaid?
And you must clear all invoices to receive your service
@tepid jetty What exact behavior are you looking to achieve? Can provide a recommendation from there
What stripe does is, it will generate a new invoice for the time and that has to be paid. Once that is paid the subscription will resume.
Is there a way to put the subscription on hold so it does not automatically issue monthly invoices?
It sounds like you might need: https://stripe.com/docs/billing/subscriptions/pause
Recommend reading thoroughly to understand caveats
Oh wait, this is not quite it.
You also need to understand that stripe already "pauses" the subscription in a way when an invoice is unpaid (with the settings you have in place).
It wont renew until the invoice is paid, it does this automatically.
I understand what you are trying to do, but you are looking at it as if they need to pay every single invoice which is not the case.
That section above is particularly important
If none of those are your use case
Then cancelling the sub is probably the way to go
What happened with the account i sent a screenshot of:
- issued an invoice
- advanced the test clock until the invoice was past due.
- this also meant advancing the test clock until a new invoice was issued. however, our subscription is per usage, and I hadn't applied any usage, so the new issued invoice was $0.
- because the new invoice was for $0, the account was never marked past due.
Yes that's correct
Ok! This is really helpful info, thank you!
From what I can tell, the invoices aren't being marked as uncollectible with the test clocks.
Sounds like you're right and canceling the subscription would be needed, I'll check in with our product folks and see how they want to proceed.
What do your account settings look like for invoice behavior?
These are the settings
It does set the invoice as uncollectible normally as I do have some already (from previous testing).
No what does it say here:
@sand brook where would I find that setting? I'm having trouble
But I have those settings as follows
Scroll down a bit, half way through the page.
@half gate I think they are asking about my settings
Under manage payments that require confirmation
No was asking @half gate since they are reporting a bug
Actually, I may be wrong give me a moment
since I did not use the invoice payment method
I used a saved method instead
I'm assuming you'd have to change the Manage invoices sent to customers settings instead.
Okay just making sure - my issue is all resolved, if the most recent invoice is paid, the subscription will remain active, even if there is a previous invoice that went unpaid and is past due
Is that correct?
Yeah, seems like that's what you need to change instead as it has specific settings for manual invoice payments.
Yeah that's correct. I screenshotted the wrong section. Whoops
@tepid jetty Scroll down to the Manage invoices sent to customers section and change it accordingly
The first settings I believe would apply to saved payments option
@tepid jetty You are correct. Recommendation from my end is to cancel the subscription and change the settings Pain mentioned
Seems like you'd need to upgrade to invoicing plus if you want to change the flow more
(Since you want to cancel the invoices quicker) the options above only allow after 30 (min) days
Really just getting the subscription to past_due is all we need, and I understand how that works now. Thank you!