【API】 is there any solution for checking customer can use the discount code

tomoya_nakano
Shopify Partner
9 0 1

Hi everyone.

 

I'm trying to create my coupons feature which can hold coupons and use it on headless commerce built with storefront API.

The feature's scenario would be like below.

 

1. input discount code

2. checking the discount code is valid
    - the discount code is exist

    - customer can use the code

      - customer selection(all or segmented or specific customers)
      - usage limit

3. save discount code on database

4. use discount on cart page

 

I've struggled with checking the discount code is valid.

It is possible to check the code exist, but I don't know how to check the customer can use it.

Please let me know if you tried it or know the solution.

Please regard.

Replies 0 (0)