Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
According to Deprecation of Checkout APIs we're required to migrate all of our Checkout REST APIs to Storefront Cart API.
Migrating to above-mentioned Storefront Cart API got us stuck with one of the problems that we're trying to overcome.
Problem is that whenever we programatically create Checkout using the REST API for the customer we were calculating discount on our end and supplied applied_discount property during the checkout creation.
to give you an understanding payload looks something like this:
/*
.... other properties are supplied for the Checkout creation
*/
"applied_discount": {
"title": "Custom Calculated Discount",
"value": "30.00",
"description": "Custom Calculated Discount",
"value_type": "fixed_amount",
"amount": "30.00"
}
above-mentioned value & amount properties are hardcoded for the time being, but those values are subject to change(according to our custom logic)
At the moment I couldn't find any useful mutation that would help me achieve similar result and apply either cart level or line item level discount
Anyone that could help with this by any chance?
Anyone that could help?
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025