Shopify App Block Apply Discount to Cart

Shopify App Block Apply Discount to Cart

jcquigs
Shopify Partner
2 0 0

I'm building an app block that a user can interact with, and will give out discount codes depending on the interaction

i'd like to apply the discount code from the app block, which lives in the home page of a Theme. 

I cannot find documentation on what apis to use to interact with the cart to add discount codes, has anyone come up with a solution?

i've seen some suggest using the discount shareable link and redirecting the user back to the home page after that, but I'm curious what the best approach is

Replies 0 (0)