Call createCart by graphql include discountCodes. Got success and discountCodes in response was applicable but not apply in checkout page. Some days ago, it work fine
Topic summary
A GraphQL createCart mutation successfully includes discount codes in the API response, showing them as applicable. However, these codes fail to apply when users reach the checkout page.
Key Details:
- The implementation worked correctly until recently
- Response indicates
discountCodesare applicable - Screenshots show the GraphQL query/response and checkout page behavior
Suggested Solutions:
- Verify discount code compatibility with
cartCreateAPI - Explicitly pass discount codes in the checkout URL rather than relying solely on cart response
- Consider using
checkoutCreateAPI as an alternative if not handling redirects manually
Status: The issue remains unresolved with one proposed workaround provided.
1 Like
Hi,
Hope this will help
- Make sure your discount code works with cartCreate
- Don’t trust cart response only, and always pass discount code in checkout URL
- Or use checkoutCreate API instead if you’re not redirecting manually

