I am currently using the js-shopify-buy SDK (via gatsby-plugin-shopify-buy [https://github.com/ginlane/gatsby-plugin-shopify-buy])
TLDR: when apply a discount code via shopify-buy, the checkout object reflects the discount code; however, the webUrl provided by the checkout object has a discount code error: "Unable to apply this discount code. Try again"
The issue is that when I apply a discount code to the checkout object, the checkout object via
shopifyClient.checkout .addDiscount(checkoutID, discountCode)
the checkout object returned has the discount code applied, and the price object in the checkout object reflects the discounted price;
however, when I go to the `webUrl` provided by the checkout object, the shopify checkout page shows the error under the discount code input field:
What's going on? Is this functionality supported? Am I doing something wrong?
1) When I type the discount code that I applied programmatically (DISCOUNT2021) on the shopify checkout page, the discount code is successfully applied (so I assume there is no error with the discount code)
2) When I add another product to my checkout AFTER programmatically applying the discount, the discount shows up on the shopify checkout page.
Would you be able to provide us with X-Request-Id returned for of a recent API request you have sent following this process? Also, please feel free to provide a checkout token, URL, or any other steps used from the JS Buy SDK and Storefront API to generate a checkout.