#teeluxiii-invoice-discounts
1 messages · Page 1 of 1 (latest)
Looking. One moment
Sorry for the delay
Was juggling a few things. So you want the amount that the prorated invoice was discounted by?
Correct, in a normal invoice ex. in_1NYEJKKjI0M1O6BOBu87cmu2, the total_discounts is populated, but when its a prorated invoice, its always 0 even though a discount is being applied
I think this is a known limitation right now with discounts and those Invoices
teeluxiii-invoice-discounts
the idea is that the discount was applied to the InvoiceItem itself during proration, not the Invoice
What do you see when you look at the InvoiceLineItem for that proration
specifically https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-discounts this property
But I think it's null on those too
"id": "il_1NbUSgKjI0M1O6BOjUjl5YbE",
"object": "line_item",
"amount": 1414,
"amount_excluding_tax": 1414,
"currency": "usd",
"description": "Remaining time on 10 × XXXX (with 20.0% off) after 04 Aug 2023",
"discount_amounts": [
{
"amount": 0,
"discount": "di_1NYECYKjI0M1O6BOLMSwCor9"
}
],
"discountable": false,
"discounts": [
],
...
The only thing i can decipher is the fact that the line item unit amount is not the same as the unit amount on the price
yeh so it's trying to tell you there was a discount applied but the amount is wrong which I think is a long standing limitation we've had with those
it's because proration bundles the coupon/discount calculation together instead of being separate. There isn't really a way around it
"price": {
"id": "price_1MmOEhKjI0M1O6BO8vwTstXO",
"object": "price",
"unit_amount": 200,
"unit_amount_decimal": "200"
},
...
"unit_amount_excluding_tax": "141"
having total discounts = 0 with a discount on the invoice and prorated with a charge to a payment method is very confusing when trying to import paid invoices into another tool, I feel like that is something that should be addressed
or at least disclosed, so we know discount amounts will not surfaced on invoices that involve prorations
I don't disagree, I'm just explaining the current state!
You definitely can flag as a bug to our support team https://support.stripe.com/contact to track this as a feature request to fix soon
Totally understand and appreiciate the help!