Applies to: Orders API | Catalog API
Learn how to apply discounts to an order using the Orders API.
Building on the example order created in Order Price Adjustments, learn how to apply discounts to the example order. If your application uses catalog pricing rules to calculate discount amounts, see Automatically Apply Discounts for information about setting up discount pricing rules.
After the Orders API calculates item totals, it considers any available discounts of these types:
- Discount on order total - A discount can be defined in the order and based on a percentage (for example, 10% off) or based on a fixed amount and then applied to the order total.
- Discount on line item - A discount can be defined in the order and applied to an individual item or the entire order.
- Pricing rule discount on line item - A catalog pricing rule for Square-applied order discounts and applied to line items in the order.
If an order has multiple discounts of different scopes and types, they're calculated and applied in this sequence:
- Item-level percentage
- Order-level percentage
- Item-level fixed amount
- Order-level fixed amount