InvoiceItemDiscounts
Returns the discounts applied to invoice items, including coupon, promotion code, and discount period details.
View-Specific Information
SELECT
The component uses the Stripe API to filter the results by the following columns and operators while the rest of the filter is executed client-side within the component.
| Column | Supported Operators |
| Customer | = |
| AccountId | = |
You can select from InvoiceItemDiscounts with the following queries:
SELECT * FROM InvoiceItemDiscounts WHERE Customer = 'cus_SgzC4iu7Lx4FyI'
SELECT * FROM InvoiceItemDiscounts WHERE AccountId = 'acct_1TjZrMH3UchJqHFo'
Columns
| Name | Type | References | Description |
| Id [KEY] | String | The Id of the discount object. | |
| InvoiceItemId | String |
InvoiceItems.Id | The Id of the invoice item to which the discount is attached. |
| Customer | String | The Id of the customer. | |
| Start | Datetime | The date on which the coupon was applied. | |
| End | Datetime | The date on which this discount ends if the coupon has a duration of repeating. This attribute is null if the coupon has a duration of once or forever. | |
| Coupon | String | DEPRECATED. The Id of the coupon. | |
| CouponAmountOff | Integer | DEPRECATED. The amount, in the specified currency, that is taken off the subtotal of any invoices for this customer. | |
| CouponCurrency | String | DEPRECATED. The three-letter ISO code for the currency of the amount to take off, set when amount_off has been specified. | |
| CouponName | String | DEPRECATED. The name of the coupon displayed to customers, for example, on invoices or receipts. | |
| CouponCreatedAt | Datetime | DEPRECATED. The date on which the coupon was created. | |
| CouponDuration | String | DEPRECATED. Describes how long a customer who applies this coupon receives the discount, such as forever, once, or repeating. | |
| CouponDurationInMonths | Integer | DEPRECATED. The number of months the coupon applies when the duration is repeating. This attribute is null if the coupon duration is forever or once. | |
| CouponPercentOff | Decimal | DEPRECATED. The percent that is taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with a percent_off of 50 makes a $100 invoice $50 instead. | |
| CouponRedeemBy | Datetime | DEPRECATED. The date after which the coupon can no longer be redeemed. | |
| CouponTimesRedeemed | Integer | DEPRECATED. The number of times this coupon has been applied to a customer. | |
| CouponValid | Boolean | DEPRECATED. Indicates whether this coupon can still be applied to a customer, taking the other coupon properties into account. | |
| CouponMaxRedemptions | Integer | DEPRECATED. The maximum number of times this coupon can be redeemed in total, across all customers, before it is no longer valid. | |
| PromotionCode | String | The promotion code applied to create this discount. | |
| Subscription | String | The subscription that this coupon is applied to, if it is applied to a particular subscription. | |
| SourceCoupon | String | The Id of the coupon that is the source of this discount, if the discount originated from a coupon. | |
| SourceType | String | The type of object that is the source of this discount, such as coupon. |
Pseudocolumns
Pseudocolumn fields are used in the WHERE clause of SELECT statements and offer more granular control over the data returned from the data source.
| Name | Type | Description | |
| AccountId | String | The Id of the connected account from which to retrieve invoice item discounts. |