
In ecommerce, every millisecond at checkout matters. That’s why we’re highlighting how Discount Kit, a leading Built for Shopify discount app, unlocked major performance and capability gains by migrating to both the new Discount API and the WebAssembly API for Shopify Functions. These migrations didn’t just speed up their app—they enabled new discounting features and more powerful promotions for merchants.
Shopify Functions empower developers to extend and customize core Shopify workflows like discounts, shipping, and payments.
Historically, Discount Kit and other apps could only generate product, order, or shipping discounts as separate Functions—each tied to its own code and configuration. This limited what merchants could offer, and created unnecessary complexity.
The Functions tooling also processed all input data upfront, converting everything into usable structures before running any business logic. This approach wasted compute cycles on data that might never be used, adding performance overhead and increasing the risk of hitting compute limits.
Two major improvements have changed this landscape:
The Discount API now allows apps to generate product, order, and shipping discounts—all powered by a single Discount Code. Merchants can combine multiple discount effects, reduce the number of Functions needed, and unlock more flexible promotions. In addition, Shopify now allows up to 25 Discount Functions to run at once, enabling even the most complex offers.
The WebAssembly API introduces a lazy-loading approach;Functions execute immediately, and only build (deserialize) the data structures your code actually accesses. This shift brings three key benefits:
For developers, this means fewer resource constraints and more reliable execution. For buyers, it means a faster, more dependable checkout.
Sammy and the team at Discount Kit recognized the opportunity. They migrated their most complex discount Function to both the new Discount API and the WebAssembly API—tackling performance and unlocking new discounting capabilities at the same time.
With the Discount API, Discount Kit can now trigger multiple discount effects with a single code and support up to 25 Discount Functions running at once. With the WebAssembly API, their Functions run faster, use less compute, and are more reliable.
Discount Kit’s migration delivered:
The WebAssembly API migration was straightforward and immediately solved our most pressing performance challenges. We’re now able to offer more powerful discounting options without worrying about hitting instruction limits.
—Sammy Isseyegh, creator of Discount Kit
These improvements have real impact:
Ready to optimize your own Shopify Functions? Here’s how:
Shopify’s ongoing investment in performance and developer experience is clear. As more partners like Discount Kit adopt these advancements, the entire ecosystem benefits.
The WebAssembly API and Discount API are available now—giving you the tools to build faster, more capable commerce experiences.
Are you ready to take your Shopify Functions to the next level? Dive into the documentation today and transform your app’s performance.