#krsacme

1 messages · Page 1 of 1 (latest)

hard sunBOT
modern aurora
#

Hmm.. this is indeed strange. I can't figure out why the last invoice was created. Can I suggest you writing to our Support https://support.stripe.com/contact, so that they can check it for you?

coral flower
#

Hi! I'm taking over this thread. Give me a few minutes to look into this.

astral sable
#

ok

#

@coral flower any thing that can be figure out of this event?

coral flower
#

Looks like the Subscription Schedule cancelled the Subscription at a specific point in time, which was not exactly the end of the billing cycle. And when then happen there is some unused time on the Subscription, so Stripe would create a new Invoice.

astral sable
#

Can you cross check the subscription and schedule dates - in both the instances i can see that it is ending at 1699997200 only

junior fiber
#

Hey, checking in here to help. This behaviour seems expected to me given that you added a one-time invoice item (via add_invoice_items) on schedule creation: https://dashboard.stripe.com/logs/req_Ko2912aXFViNAx

We don't include those on the initial subscription invoice, but on the next invoice for the phase. In this case there was no next invoice as it was set to cancel, so we generated an invoice on cancellation

#

The prorated invoice items on that subscription (which total $0) are likey just a side effect of that behaviour

astral sable
#

The one-time invoice item added at the time of schedule creation is associated with this invoice already on the same date - https://dashboard.stripe.com/invoices/in_1M4AAvI5vSu94Gk8Z9G8HisR
We don't create subscription and then schedule in this instance, we create the schedule directly which internally creates subscription with this one-time prices.

junior fiber
#

Hmm, checking

astral sable
#

Yes, it is our logic to add one-time prices once a year. It happens once we receve the draft invoice created notification. But the question is why such an invoice is created in the first place? As the invoice is schedule to be cancelled, it should not have created an invoice.

junior fiber
#

Ok, got it. Let me check on this

#

Yeah I can see why this is confusing. Unfortunately I don't have an immediate answer for you as it's something I'll need to raise with a team internally for them to look at. In the meantime I'd recommend ignoring any invoice.created events where the total is 0 to prevent accidentally billing users again

astral sable
#

I have added another safeguard in our system, so that we can avoid adding yearly one-time invoice items, but the question if the 0 invoice is created based on the remaining time, then a valid amount invoice could also be created - which will charge the customer eventhough it is scheduled for cancellation. That is the worrying part that I wanted to understand.

junior fiber
#

Yep, understandable. There's a minor (1 second) discrepancy in the timestamps between the cancellation (automated by our processes) and the start of the cycle. So in that case the proration is accurate and it's 0 because it's such a small unit of time. But I'd agree that in this case there should be an invoice

#

Does this happen often of just on this occasion?

astral sable
#

This is the first occasion that we are seeing it, i have cross checked all the logs in the last 6 months.

#

Are you saying that this is an expected behavior?

junior fiber
#

I'm just trying to understand if this was a one-off or whether this occurs regularly. As I've explained, I'll file an ask with the team internally and we'll look into it. Beyond that I can't really help any further today other than recommend you put safeguards in place

astral sable
#

Do you think it is safe to assume Unused time in the description as a special invoice which need to avoided from our processing?

junior fiber
#

I wouldn't use that as the only condition as there could be invoices where there is actual proration (as opposed to 0)

astral sable
#

We don't use stripe's proration in our platform

junior fiber
#

Then I guess that might make sense sure

astral sable
#

ok. how do i get update on this issue once you know an update from internal team?

junior fiber
#

You'd write in to support and reference this thread: https://support.stripe.com/contact