#abuznego_sub-update-invoice-items

1 messages ยท Page 1 of 1 (latest)

undone knollBOT
#

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

viral estuary
#

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

versed edge
#

yes

viral estuary
#

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?

versed edge
#

upgrading products

viral estuary
#

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

versed edge
#

changing products. i want the charge for that change to be in draft so i can add tax items to the invoice.

undone knollBOT
versed edge
#

Trying to avoid having to delete the existing subscription and starting a new one...

viral estuary
#

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.

versed edge
#

there is no way to add description or anything to those invoice items

#

it is different than adding invoice line items

last tiger
#

HI ๐Ÿ‘‹

I'm stepping in as my colleague needs to go soon

versed edge
#

ok

last tiger
#

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.

versed edge
#

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

last tiger
#

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

versed edge
#

how do i ensure that update subscription invoice will pick up those items

last tiger
#

Specifying the Subscription ID should to the trick. But you ensure it will work by building a simulation and testing it

versed edge
#

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.

last tiger