#marcosmercuri_api

1 messages ยท Page 1 of 1 (latest)

weary fjordBOT
#

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

tidal marlinBOT
#

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.

fresh tusk
#

๐Ÿ‘‹ happy to help

#

sorry it will take me a while to investigate this

#

please bear with me

dark basin
#

no worries, thanks

fresh tusk
#

I just checked and it's just two different types of requests that's why you're seeing a totally different behavior

dark basin
#

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?

fresh tusk
#

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

tidal marlinBOT
dark basin
#

and the same is true for line il_1Mwq5vB78pGGtXVgCitAfVHn? named Remaining time on 52 ร— Standard after 11 Nov 2022?

fresh tusk
#

no this line was added because of the proration

dark basin
#

that one has proration as false though

compact swallow
#

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.

dark basin
#

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.

compact swallow
#

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 check price.product instead.

#

So you could as well use the prorated items to extract product data.

dark basin
#

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

compact swallow
#

I understand what you mean. Not sure there's a straightforward way though.

dark basin
#

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

compact swallow
#

I honestly don't know, and can't find any notes about it unfortunately.

#

Let me check a few more things...

weary fjordBOT
compact swallow
#

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.

dark basin
#

Sorry, I didn't follow you

weary fjordBOT
dark basin
#

Hi, just want to make sure this channel is not closed yet ๐Ÿ™‚

jaunty gull
#

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

dark basin
#

do I need to send an email with the summary of the issue? Can't this conversation be forwarded to the team?

jaunty gull
dark basin
#

ok, how long would you say it will take to get an answer?

jaunty gull
#

We'll endeavour to answer ASAP

dark basin
#

ok, Ill write up the email, thanks

jaunty gull
#

Sorry we couldn't solve it here โ€“ proration is tricky for sure