Details about the discounts associated with the subscription, as recorded in the ramp.

Columns

No match found

id string, not null
A unique and immutable identifier for the discount. The system auto-generates this ID.

ramp_id string, not null
Foreign Key ramps.id
A unique and immutable identifier for the ramp.

item_price_id string, null
Foreign Key item_prices.id
The ID of the item price in the subscription that the discount targets. Relevant only when apply_on is specific_item_price.

amount long, null
The value of the discount. The format of this value depends on the kind ofcurrency.

apply_on string, not null
The portion of the invoice the discount targets. Possible values are:
  • invoice_amount: Applies to the invoice sub_total.
  • specific_item_price: Applies to the invoice_line_item_amount associated with the item price defined in item_price_id.

created_at timestamp, not null
Timestamp indicating when the discount was created.

duration_type string, not null, default=forever
The time duration for which the discount is associated with the subscription. Possible values are:
  • forever: The discount remains associated indefinitely.
  • limited_period: The discount is effective for a specific period, starting from the first invoice it's applied to, and ends after the defined period and period_unit.
  • one_time: The discount is valid for one invoice only and is no longer applicable after that.

included_in_mrr boolean, not null
Indicates whether the discount is included in Monthly Recurring Revenue (MRR) calculations. Applicable only when duration_type is one_time and the feature is enabled. If the site-level setting excludes one-time discounts from MRR calculations, this field is always false.

invoice_name string, null
The display name of the discount, shown on customer-facing documents such as invoices and hosted pages. This name is auto-generated based on the type, amount, and currency_code.

percentage double, null
The percentage of the original amount that should be deducted from it. Applicable only when discount.type is percentage.

period null
The number of time units the discount remains associated with the subscription. Applicable only when duration_type is limited_period.

period_unit string, null
The unit of time for period. Applicable only when duration_type is limited_period. Possible values are:
  • day: 24 hours
  • month: One calendar month
  • week: Seven days
  • year: One calendar year

type string, not null, default=percentage
The type of discount. Possible values are:
  • fixed_amount: A specified amount is discounted.
  • percentage: A specified percentage is discounted.