#abuznego_sub-update-invoice-items
1 messages ยท Page 1 of 1 (latest)
๐ 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/1334651790351663137
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello, thanks for the info, looking in to this.
Do you have the request ID for the specific change to this subscription that caused the invoice to be created? I am not immediately seeing any update calls that created an invoice in the logs for that subscription
yes
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Ah thank you. I overlooked it because of proration_behavior: 'none' but now see how I missed this. Looking in to whether invoices from that type of update can start in draft
Is there a particular type of update that you are trying to do on the invoice?
upgrading products
Unfortunately I am not seeing a way to prevent the immediate finalization. Can you tell me a bit more about what you mean by upgrading products on the invoice? I can check if there is a workaround
changing products. i want the charge for that change to be in draft so i can add tax items to the invoice.
Trying to avoid having to delete the existing subscription and starting a new one...
Can you calculate the tax before you update the subscription? If so the add_invoice_items param that I mentioned could allow you to add the tax items.
there is no way to add description or anything to those invoice items
it is different than adding invoice line items
HI ๐
I'm stepping in as my colleague needs to go soon
ok
Is there a reason these tax line items are only added to the Invoice once it's created? Why not as an items.tax_rate parameter?
Also, I noticed you are reseting the billing cycle anchor in that request. Is there a reason for this? What behavior are you trying to get here?
Per our doc
When you reset the billing cycle anchor, Stripe immediately sends an invoice.
it doesnt specify that it would be paid right away
i just figured it would be in draft
we calculate the tax items with a third party
so it is not done via stripe.
we just add them as line items
Ah, okay. In that case you would need to create the Invoice Item using the Invoice Item API first and specify the Subscription you want it to apply to in the subscription parameter
This would let you include a description as well as metadata to keep track of additional information.
However, I strongly recommend you code this as a simulation in Test mode so you can verify it behaves the way you expect before making these changes to your Live mode integration
how do i ensure that update subscription invoice will pick up those items
Specifying the Subscription ID should to the trick. But you ensure it will work by building a simulation and testing it
is there an api to clean up any invoice items
if something were to go wrong between the invoice item add calls and update subscription call, i would need to clean those up.
You mean this one? https://docs.stripe.com/api/invoiceitems/delete