#zach_api
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/1290654599946047559
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
It seems the Invoice.Created e vent, truncates the number of invoice line items to just ~9
after that a URL is sent which guides point to using to retrieve all the invoice line items
I read through the guides and am unclear how as a python consumer of the API library, i should be interacting with this URL
hi there!
you would need to make extra API call to retrieve all invoice line items for a specific Invoice: https://docs.stripe.com/api/invoice-line-item/retrieve
and then you can use Auto Pagination to view all results: https://docs.stripe.com/api/pagination/auto
what programming language is this?
and which version of stripe-pything are you using?
i belive i sent that right as u asked the question, wanted to make sure u saw it and werent waiting on me to answer
thanks, just saw it ๐
looke like list_lines was added in version 9.9.0: https://github.com/stripe/stripe-python/blob/v10.12.0/CHANGELOG.md#990---2024-05-30
so you would need to update your version of stripe-python
๐
oh thats scary
is everything forward compatible?
or am i going to run into all sorts of compatibility issues
no, you'll need to check the changelog I just linked
I see
ok this explains a lot.
I have one other question/issue I am having, not sure if you want me to start a new thread.
you can ask it here
Great.
I am creating manual Invoice Items (not line items, but invoice items)
I do so through the API
those items render on the screen where it shows current invoice on the customer.
But I am unable to delete them via the UI
req_BT0jZhUXVnAWAM
is an example of the call
i also cannot edit them
one interesting this is :
the invoice item that it says no such invoice item, has tmp in the item identifier, as well as il_ as the prefix
if i remove the _tmp and i change the il to ii, i can delete via api (cant obviously do this on front end)
what exactly are you doing to trigger these requests? can you share a screenshot of the dashboard where you are doing this exactly?
But I am unable to delete them via the UI
by "UI" you mean in the Stripe dashboard no? so can you share a screenshot of the dashboard UI?
yes stripe dashboard
I can just give me one sec, i had kinda workarounded like I mentioned above so deleted those line items
remaking them now
ok here it is
This is from the customers subscriptions creen
I changed the quantity from 60 to 61
and it throws this error
and if i try and delete the line from that page
i get the following error:
If I take 'il_tmp_1Q55gmCYEIkFpocTTEJqMpKb' and hit the API it gives similar error
If i change 'il_tmp_1Q55gmCYEIkFpocTTEJqMpKb' to 'ii_1Q55gmCYEIkFpocTTEJqMpKb'
it will let me delete via API
hey ther,e just catching up on this, give me a few minutes
np
Ok i see, thanks. Is this is the "upcoming invoice" lines?
Correct
So this is a bug that you can reach this, but also expected as a result
Those are temporary/fake line items for the upcoming invoice, they dont actually exist yet to be editted/deleted
The invoice item you created can be manipulated, as you;ve found
If you're creating these invoice items via the API you'll need to manage them via the API too.
If you for example retreived the upcoming invoice via the api, you could inspect the invoice_item attribute on the lines
https://docs.stripe.com/api/invoice-line-item/object#invoice_line_item_object-invoice_item
which is the object you'd need to update
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.