DiscountUpdate

March 11, 2026 ยท View on GitHub

Schema to update a discount.

Fields

FieldTypeRequiredDescription
metadataDict[str, models.DiscountUpdateMetadata]:heavy_minus_sign:Key-value object allowing you to store additional information.

The key must be a string with a maximum length of 40 characters.
The value must be either:

* A string with a maximum length of 500 characters
* An integer
* A floating-point number
* A boolean

You can store up to 50 key-value pairs.
nameOptionalNullable[str]:heavy_minus_sign:N/A
codeOptionalNullable[str]:heavy_minus_sign:Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API.
starts_atdate:heavy_minus_sign:Optional timestamp after which the discount is redeemable.
ends_atdate:heavy_minus_sign:Optional timestamp after which the discount is no longer redeemable.
max_redemptionsOptionalNullable[int]:heavy_minus_sign:Optional maximum number of times the discount can be redeemed.
durationOptionalNullable[models.DiscountDuration]:heavy_minus_sign:N/A
duration_in_monthsOptionalNullable[int]:heavy_minus_sign:N/A
typeOptionalNullable[models.DiscountType]:heavy_minus_sign:N/A
amountOptionalNullable[int]:heavy_minus_sign:: warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
currencyOptionalNullable[models.PresentmentCurrency]:heavy_minus_sign:: warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
amountsDict[str, int]:heavy_minus_sign:N/A
basis_pointsOptionalNullable[int]:heavy_minus_sign:N/A
productsList[str]:heavy_minus_sign:N/A