Offers

An Offer is a wrapper around a Discount that allows for explicit redemption and usage controls.

Offers lets you reuse discounts: you can give two partners the same underlying discount (e.g., "get a 60-day free trial") and manage redemption constraints independently. Similarly you can create seasonal offers tied to the same discount with different start/end dates.

You must supply an id when creating each offer. This id must be unique for all offers across the entire application. Offers can also be identified by generating single-use codes. If single-use codes are created for an offer, the offer's id cannot be used in the activation flow.




Attributes:

NameTypeDescription
idstringUnique id defined by the Application. Once set, the id cannot be changed.
discountobjectThe associated Discount object.
starts_atintegerUnix timestamp of when the offer starts (in seconds since the Unix epoch). If set to 0, the offer will start immediately.
ends_atintegerUnix timestamp of when the offer ends (in seconds since the Unix epoch). If set to 0, the offer will never end.
max_redemptionsintegerThe maximum number of times the offer can be redeemed. If set to 0, the offer can be redeemed an unlimited number of times. This field is ignored if require_code is true.
redemptionsintegerThe number of times the offer has been redeemed to-date.
active_eligiblebooleanIf this offer should be made available to active accounts.
pending_cancel_eligiblebooleanIf this offer should be made available to accounts that have cancelled (will not auto-renew but still have access).
signup_eligiblebooleanIf this offer should be made available to new accounts (signups).
winback_eligiblebooleanIf this offer should be made available to winbacks (churned accounts starting a new subscription).
require_codebooleanIf this offer should be redeemed through codes. If single-use codes are used to identify an offer, max_redemptions will be ignored.
created_atintegerUnix timestamp of when the offer was created (in seconds since the Unix epoch).
updated_atintegerUnix timestamp of when the offer was last updated (in seconds since the Unix epoch).