Discounts
Discount entities describe percentage or amount-based discounts for transactions. They're sometimes called coupons or promo codes.
Discounts let you reduce a transaction total by a percentage, a flat amount per transaction, or a flat amount per unit on a transaction.
Discount entities hold information like:
- How the discount reduces the total of the transaction
- Whether the discount is one-time or recurring
- When the discount is valid to
- Which items in your catalog the discount applies to
- Whether this discount can be applied by customers using a code
Discounts work with prices, transactions, checkouts, and subscriptions.
By default, discounts apply to the entire value of a transaction. You can link discounts to price entities to limit them to certain prices. For example, you can create a discount for subscription plans that won't work on other items.
Use discount codes to let your customers apply discounts themselves at checkout, or pass a discount to checkout to apply it automatically.
Discounts don't have to have codes. They can be applied manually to transactions as part of the sales process.
Learn how to create different kinds of discount and pre-fill them on a checkout. See: Run promotions and discounts
There's no delete operation for discounts. Use the update a discount operation to archive discounts when you no longer need them. See: Delete entities