#Gkiokan-description-concat
1 messages · Page 1 of 1 (latest)
Hi there! Can you clarify what you mean here? Sounds like you are talking about setting the description param when creating an invoice item?
Example Invoice in_1LAzZ9Ha5WPIKK5IOTA0b9iu
InvoiceItem il_1LAzZ9Ha5WPIKK5INJ16gWv0
says unsued time on business (with %)...
InvoiceItem il_1LAzZ9Ha5WPIKK5IerG7dkQ6
tells the new tier with quantity only (thats fine)
I want to know which properties to check to genereate the description text myself as it is not localized (reported already)
This is due the prorotation when a customer upgrades his subscription. However, when the previous sub has a coupon I can't find the correct params to declare it as "unsued time" in german or in this case "old sub"
@queen mist what's the question though?
the format of the description is not something we guarantee, it will change (and has changed over the years)
Probably but for now it's fine when I find a solution for now. Because currently I can't determine if a InvoiceItem is an old sub item, like the description is like "unsued ...."
I just want to know which properties the stripe api check for the description string
So I can follow that flow and generate the string myself as I am creating custom Invoices in pdf
everything is in the API
https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-proration tells you it's a proration line item
The amount being positive or negative tells you if it's about the old Price (credit) or new Price (amount owed)
That worked for invoices without a coupon like a sharm. That is also what I am doing.
So maybe I need to check if the InvoiceItem has a discount_amounts prop, too.
proration is always true for the old InvoiceItems from the old sub?
yes if it's a proration it will have proration: true
Ok. I will give it a shot then. Thanks for the hint.
il_1LB0AhHa5WPIKK5IZPyz1hXt
Can you have a check on that Item?
This should be actually the new subscribed product but it shows as proration after the subscription update
it's in this invoice in_1LB0AhHa5WPIKK5Ij2ATPJA5
I'm sorry the channel is really busy and I'm not following your ask
Can I ask you to try and be a lot more descriptive in one message about what exactly you see in the API and what part confuses you?
NP, take your time. If you get a free time spot just check the invoice. The items are almost identically and the solution with prorations doesn't work in this case.
Old InvoiceItem is prorated: true with 0,00 amount (with coupon)
New InvoiceItem has also prorated: true with 0,00 amount (coupon is also applied due the livetime of the coupon from the previous sub)
How would you find out which one is the "old one"?
ah yeah it doesn't work there. I expected proration_details[credited_items] to have the right information. I'm asking someone on my team
okay I confirmed with other people that proration_details should work so it's a bug in our eyes. I'm going to flag to the product team but you should also report/flag to our support team: https://support.stripe.com/contact and mention you talked to me here
The two items are almost identical. I am looking for a property to rely on but can't find one at the first look. Even the period is same. proration_details are empty on both items.
Seems to be only the case if a previous coupon is applied to the new sub.
I think I will just parse the description item for unsued or remaining and determine what kind of InvoiceItem it is. Not the best bullet proof solution but I can't think of another way for now.
I think getting the localized description string to production would fix alot of hussle. Any clue of that bug when it will be on the plan to fix it?