The list of all deductions applied to the invoice.

Note: If consolidated invoicing is enabled, the attribute subscription_id is unavailable when the invoice has line items from multiple subscriptions. The individual subscription IDs are seen under line_items.subscription_id.

Columns

No match found

invoice_id string, not null
Foreign Key invoices.id
The unique ID of the invoice this table belongs to.

amount long, not null
The amount deducted.

coupon_set_code string, null
The coupon code, if applicable, used to provide the discount. The coupon ID is available in entity_id.

description string, null
Description of this deduction.

discount_type string, null
The type of discount applied to the line item. Relevant only when discounts[entity_type] is one of item_level_discount, item_level_coupon, document_level_discount, or document_level_coupon.

entity_id string, null
When the deduction is due to a coupon or a discount, this is the ID of the coupon or discount.

entity_type string, not null
The type of deduction and the amount to which it is applied.

line_item_id string, null
The unique ID of the line item this deduction is for. This is required when discounts[entity_type] is item_level_coupon or document_level_coupon.