#thomasst
1 messages · Page 1 of 1 (latest)
Hi đź‘‹
It looks like the Invoice Item was created for the Customer. but, since this subscription was canceled in the middle of the billing period and you didn't specify the invoice_now option, an invoice was not generated to apply this invoice item. It will be included on the next invoice for this customer or at the end of the billing period.
Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period
From our API ref docs on canceling subscriptons
https://stripe.com/docs/api/subscriptions/cancel
@cobalt parrot If this is the case, shouldn't there be an upcoming invoice item on the customer page here https://dashboard.stripe.com/test/customers/cus_OdwgdbxFm34XXE ?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Under "Pending invoice items"
I'm not sure what the Dashboard will show, we don't spend much time working with the dashboard here. You are using test clocks and that might not behave the way you expect either. But I do see the Invoice Item created 40 minutes ago. But it also shows a deleted (39 minutes ago).
What event deleted it?
Looks like this one https://dashboard.stripe.com/test/events/evt_0Nqer04rOYBvHyzs1MiX899e
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Do you have any idea how it got deleted?
The dashboard should normally show those items, but it appears it somehow got deleted. Why?
It looks like that was related to the canceling of the Subscription. I would recommend you test this process out again with invoice_now: true.
But I don't necessarily want it invoiced, I'd like to keep the upcoming invoice item.
Is it a bug? Shouldn't it stay?
đź‘‹ Hello! I 'm hopping in to take a look as well since snufkin has to head out soon
Thanks!
I'm still chasing this down, but it may take me a bit longer
No worries, thank you for looking into it
Just a quick update from me - I'm still looking, but I actually haven't been able to reproduce the behavior you're seeing at all
I see my invoice items being retained whe the subscription is canceled
ok, please keep me posted
I'm still not able to reproduce, but wanted to ask really quick
Is this something you're able to reproduce repeatedly whenever you cancel a subscription?
Or is it just happening for this one subscription test?
It happened in this subscription test. I'll go with the suggestion of using invoice_now but I'm suggesting that this may be a bug on your side that possibly should be investigated.
Yeah what I was trying to narrow down is whether this is somethign you seen in ALL your subscription cancellation requests, or just this specific one
I've had some where it worked. I don't remember the exact conditions.
so I was surprised it disappearing here
Are you able to reproduce it? Maybe it's only if the clock is exactly on the cycle renewal timestamp.
I haven't been able to reproduce it at all - which is why I asked if it was somethign you were able to reproduce repeatedly as well 🙂
Would you like me to rerun the test just to see if it happens again?
on a new test clock & customer ID
Yeah that would help
I have another quick question meanwhile.
go ahead
The amount_due vs amount_remaining fields are both 200 on in_0Nqfqo4rOYBvHyzsaxrO2YFg. But the customer has a credit balance of $290. The docs for amount_due say: "Final amount due at this time for this invoice. If the invoice’s total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may be 0. If"
In this case, since there is a balance, wouldn't the amount_due have to be 0 "at this time"?
I know that Stripe doesn't apply the balance automatically to already finalized invoices, but I'm confused by what the docs are saying here https://stripe.com/docs/api/invoices/object#invoice_object-amount_due
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Use case is: I want to calculate the total amount of money that the customer owes us (or we owe them).
That would be the balance plus any outstanding amount of invoices that aren't paid.
To make this calculation, should I sum up the balance + amount_due or amount_remaining of each invoice?
Actually this customer would have due invoices for $292, and a balance of $290, so owes $2 in total.
From what I can see, that customer had a credit balance that was added on 2023-09-15 17:34:20 but the Invoice was finalized before that on 2023-09-15 17:30:44 - that's why the invoice doesn't reflect that customer balance
Yep, in that scenario is there a difference ever between amount_due and amount_remaining?
It would change once the invoice is actually paid, but at that point in time for the invoice it'd be the same
For my use case, which field should I use?
I'd use amount_remaining - once an invoice is paid, amount_due won't change. amount_remaining will
The invoice item wasn't deleted for that example, right?
no