Solved

Apply a discount code to checkout via API

adityamertia
Visitor
2 0 1

Hello,

 

We are generating discount codes for users from API and want to apply this discount code to the currently active checkout object of the user using an API. If a discount code is already applied to the checkout then remove and apply the one specified in the API. Which API can help to achieve this?

 

Thanks

Aditya

Accepted Solution (1)

c10s
Shopify Partner
67 12 26

This is an accepted solution.

Depending on how you have things set up checkoutDiscountCodeApplyV2 and checkoutDiscountCodeRemove may do what you need.

View solution in original post

Reply 1 (1)

c10s
Shopify Partner
67 12 26

This is an accepted solution.

Depending on how you have things set up checkoutDiscountCodeApplyV2 and checkoutDiscountCodeRemove may do what you need.