percentOff. Digital River first applies the discount and then the transaction's taxes are determined based on the discounted price. In the response, we return the
totalDiscountapplied to the transaction.
discount.quantity. This indicates how many products the discount should be applied to. If you don't specify a
discount.quantity, we assume you want to apply the discount to all the products in that line item. For example, if the
3and you don't specify a
discount.quantity, then, by default, the discount is applied to all three products.
POST /checkoutsdemonstrates both types of item-level discounts. In the percent off request, the
discount.quantityis set to
1, so the discount will be applied to only one of the three products. For the amount off request,
discount.quantityis not specified, so the discount will be applied to all three products.:
POST /checkoutsresponse, the
items.amountvalue is adjusted to reflect the discount and the
totalDiscountvalue shows the discount for the entire order.
discount.amountOffparameter to create a discount on the entire order.
amountvalues, applies the discount to arrive at a
subTotaland then uses that figure to compute a
totalTax. This is illustrated in the following
POST /checkoutsdemonstrates how to use
shippingDiscountto specify either a
totalDiscountincludes the shipping cost discount.
POST /checkoutsresponse shows a transaction with multiple discounts applied to it: