Discussing APIs and development related to customers, discounts, and order management.
Discount code applying in cart if the cart token start with c1- (picture: 1) otherwise not (pcture: 2). What is the reason for this? and How to set cart token with prefix "c1-"?
The issue is that you're using a deprecated method of applying a discount code to your checkout.
instead of this
Something like that:
let baseUrl = window.location.protocol + "//" + window.location.hostname;