Applying discount code to the cart

Highlighted
Shopify Partner
46 0 4

Hey, I am building an application which injects widget to the store. I want to apply some discount automatically when a user adds something to the cart. How do I add discount code to the cart? My app uses scriptTag api to inject the script tag etc. Any help appreciated

0 Likes
Highlighted
New Member
10 0 0

Hi!

What you need to do is to send ajax head call to /discount/{{your_discount_code_here}}.

0 Likes