Discounts are applied to purchases or subscription products via coupons. They can take off percentages, fixed amounts, or fixed amounts per unit. They can also be specified to apply after a certain number of billing periods (remainingUsagesUntilStart
) and be applied for a certain number of billing periods (remainingUsages
). Discount creation and editing is done through the UI
Property | Type | Description |
---|---|---|
name | String | The name given to this discount. Set through the UI [Max Length: 255 characters] |
description | String | The description for the discount. Set through the UI. [Max Length: 500 characters] |
code | String | The code which can be used to apply this discount. Fusebill enforces uniqueness for this field. Set through the UI. [Max Length: 255 characters] |
discountType | Enum: {Amount, AmountPerUnit, Percentage} | Dictates how amount is interpreted |
remainingUsagesUntilStart | Integer | The number of charges that will be generated before this discount is applied. This number decreases by one each time the relevant charge is generated until it reaches zero. This is used to schedule a discount after a certain number of periods of a subscription. |
remainingUsage | Integer | The remaining number of times this discount will be applied before it expires. NULL means infinite usages. This decreases only once remainingUsagesUntilStart reaches zero. |
amount | Decimal | The amount the discount is for. Typically a dollar amount, unless discountType is "Percentage", in which case this field represents a percent reduction. |
status | Enum:{Active, Retired} | Indicates whether the discount is usable |
frequencyOverrides | Object. Defined below. | A list of frequency overrides. When the discount is being applied to a subscription whose frequency matches the override, then the override values are used for discountType , remainingUsagesUntilStart , remainingUsage , and amount |
id | Integer | The Fusebill generated ID that uniquely identifies this discount. [Read Only] |
uri | String | The full string path to this resource [Read Only] |
Discount Frequency Fields
Property | Type | Description |
---|---|---|
interval | Enum:{Monthly, Yearly} | Used in conjunction with numberOfIntervals to determine if this override is a match. The frequency override is a match if the subscription has the same values as this override. |
numberOfIntervals | Number | Used in conjunction with interval to determine if this override is a match. The frequency override is a match if the subscription has the same values as this override. |
discountType | Enum: {Amount, AmountPerUnit, Percentage} | Dictates how amount is interpreted if this frequency override is a match. |
remainingUsagesUntilStart | Number | The number of charges that will be generated before this discount is applied if this frequency is a match. This number decreases by one each time the relevant charge is generated until it reaches zero. This is used to schedule a discount after a certain number of periods of a subscription. |
remainingUsage | Number | The remaining number of times this discount will be applied before it expires if this frequency override is a match. NULL means infinite usages. This decreases only once remainingUsagesUntilStart reaches zero. |
amount | Decimal | The amount the discount is for if this frequency override is a match. Typically a dollar amount, unless discountType is "Percentage", in which case this field represents a percent reduction. |