Applying a coupon or promo code

Learn how to apply a coupon or promo code.

Coupons or promotional codes encourage store sales by providing discounts on products or shipping costs. You can configure a coupon or promo code offer in Global Commerce and apply that coupon or promo code to an active shopping cart to encourage sales in your stores by providing discounts on products or shipping costs.

Send a POST shoppers/me/carts/active request to the Carts resource with the required promoCode query parameter. The request must include a valid anonymous or authenticated customer token. No payload is associated with this request; the payload could be empty.

The request in the following example applies a promotional code value of wb32xjtam.

Note: A successful request returns a 200 status code in the response header. An unsuccessful request returns an error code in the response.

curl --location --request POST
--header 'authorization: Basic ***\ 

Typically, the next steps after applying a coupon or promo code are either redirecting the customer to the Digital River-hosted checkout to complete the purchase process or submitting the cart and creating an order to complete the checkout process.

Primary versus secondary offers

When using a coupon, it's important to note that it's linked to a primary offer which may also have a secondary offer, typically tied to shipping discounts. Each offer has its specific criteria, which can be evaluated separately. A warnings object appears in the response only when neither set of criteria is met. For example, you create a discount offer with a second shipping discount as follows:

  • The primary offer is a $5 discount for Product A.

  • The secondary offer is a 50% shipping discount on orders over $200.

The following table shows when the A warnings object appears.

Last updated