Applying discounts to a cart without discount code

Applying discounts to a cart without discount code

Waqar_Sadiq
Shopify Partner
1 0 0

Is there a way to add discounts to the cart without the discount code. By discount I mean adding manual discounts using a shopify api not the discount codes.

 

Here is the scenario I am trying to build.

On the checkout screen, our app shows offers that the customer can purchase using their points in our app, and those offers are supposed to give discounts, on the entire cart or on a specific item or both. So we want to call our api on the cart screen before checkout  with the cart details and modify the cart using an API based on the customer offers, and have that new state of the cart be submitted for the checkout.

 

Question:

Can a cart that hasn't been submitted yet be modified using an api, by modified I mean adding discounts to line items or the entire order? 

 

 

Replies 0 (0)