-
Notifications
You must be signed in to change notification settings - Fork 25
Discounts
Nikola Gavrić edited this page Jun 17, 2018
·
3 revisions
Can be applied to both products and orders. When applied to orders, the discount will reflect the price of each individual product rather than the whole order, so if you have 5 products and discount of 20 dollars, each product will get a 4 dollars discount.
Figure 1. Discounts table
- name: Represents a unique discount name (Required)
- percentage: A value of 7.25 corresponds to a percentage of 7.25%. This value range between 0.0 up to 100.0 (Required, if amount not present)
- amount: A fixed amount of money in smallest denomination of the currency used (Required, if percentage not present)
- reference_id: An optional ID you can associate with the discount for your own purposes
- reference_type: An optional class namespace you can associate with the discount for your own purposes
NOTE: Single Discount can only have either percentage
or amount
field, if both, you'll get an exception.
If you are still unsure how discounts are applied, you can view it on official docs