#marcosmercuri_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/1230814048355090441
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- marcosmercuri_api, 2 days ago, 14 messages
๐ happy to help
sorry it will take me a while to investigate this
please bear with me
no worries, thanks
I just checked and it's just two different types of requests that's why you're seeing a totally different behavior
for the one with proration it's https://dashboard.stripe.com/logs/req_yN7T2yxukHURfY which is update the subscription in question and you're passing prorate: true
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
where as for the other one, you're creating the invoice item manually https://dashboard.stripe.com/logs/req_sRgw3AMWSYSJRR and there's no proration happening
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
You are saying that the invoice in_1MwqWSB78pGGtXVgR8jIfM9P was manually created? and the user created the 39 lines with the unused and remianing amounts and quantities?
I'm saying that the invoice Item ii_1Mwq5qB78pGGtXVgqG03yq9A was created manually
and then it was added to the first invoice of the subscription
but there isn't a need for any proration here
and the same is true for line il_1Mwq5vB78pGGtXVgCitAfVHn? named Remaining time on 52 ร Standard after 11 Nov 2022?
no this line was added because of the proration
that one has proration as false though
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
I think I need to understand better what's the high level use case, and how did the Invoice end up in this state exactly.
I can explain the situation I have and why I want to understand this:
We have different connected accounts, and we use the stripe API to import subscription, invoices, and products in our system. Any product that is in an invoice will be imported into our system. We have a connected account that has a lot of this remaining ... and unused... products. In a previous thred in here: #1230814048355090441 message I was told these types of products were because of proration.
With this information I sampled a few invoices from this account and I saw that for old invoices (eg 2022) the proration property was false for this remaining unused lines and the property price.product had an id of a one-off product, and for newer (eg 2024) the property was set to true, and the price.product was pointing to a regular product.
remaining ... and unused... products
Those are not Products but InvoiceItems. I don't think you should be using those to create Products in your system. You should checkprice.productinstead.
So you could as well use the prorated items to extract product data.
give me some minutes, I want to double check something
For example, in invoice in_1MwqWSB78pGGtXVgR8jIfM9P the line il_1Mwq5rB78pGGtXVgKTKDxoZj, has a name Unused time on 60 ร Standard after 22 Oct 2022 it has the proration as false , the price.product.id is prod_NiGdDE9MOdtmo1 which is a one-off product.
Those are not Products but InvoiceItems. I don't think you should be using those to create Products in your system. You should check price.product instead.
this is what we are currently doing, but in cases like the one I just mentioned we end up importing this one-off product. So I wanted to see what is the logic I should use to avoid this
I understand what you mean. Not sure there's a straightforward way though.
There's this property the you could also check: https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-discountable
but something could be not discountable and not proration no?
what I don't understand is why for some of this unused line items, the proration is false, and for others is true. I thought it was a changed that was made in the API, and after a certain point all were going to be true . that's what I wanted to confirm
I honestly don't know, and can't find any notes about it unfortunately.
Let me check a few more things...
I see on this Invoice that this Invoice in_1MwqWSB78pGGtXVgR8jIfM9P has proration items with both proration: true and proration: false, so I don't think it's an API update thing.
I think it's due to not of those "Remaining/unused time..." items are actually treated as "prorations" internally. It seems like a conflict of definitions. Is it a "proration itself" or a "prorated item"? Unfortunately, this created a confusing situation like this.
Sorry, I didn't follow you
Hi, just want to make sure this channel is not closed yet ๐
No, it hasn't. Equally we're a bit stumped by your issue (that is why proration: false on some obvious proration items) so I think we need to take this issue to our team via support so we can spend some more time investigating: https://support.stripe.com/contact/email?topic=api_integration
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
do I need to send an email with the summary of the issue? Can't this conversation be forwarded to the team?
You can include the URL for this thread directly and we can reference the conversation: https://discord.com/channels/841573134531821608/1230814048355090441
ok, how long would you say it will take to get an answer?
We'll endeavour to answer ASAP
ok, Ill write up the email, thanks
Sorry we couldn't solve it here โ proration is tricky for sure