Attach Discount To Invoice Item

View as Markdown

Attach a discount to a specific invoice item.

Item-level discounts are always one-time and apply to that specific item.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

invoice_item_external_idstringRequired
account_idstringRequired

Request

This endpoint expects an object.
coupon_idstringRequired
ID of the coupon to apply
promotion_codestring or nullOptional
Optional promotion code used to apply this coupon
start_datedatetime or nullOptional

When the discount becomes active (defaults to now)

end_datedatetime or nullOptional

When the discount expires (based on coupon duration if not set)

metadatamap from strings to any or nullOptional
Arbitrary metadata

Response

Successful Response
idstring
coupon_idstring
promotion_code_idstring or null
attachment_levelstring
customer_idstring or null
subscription_idstring or null
invoice_idstring or null
invoice_item_idstring or null
start_datedatetime
end_datedatetime or null
is_activeboolean
metadatamap from strings to any or null
created_atdatetime
updated_atdatetime

Errors

422
Unprocessable Entity Error