Shopify has introduced a new Discount Function API in API version 2025-04 that consolidates three separate discount APIs into one unified solution. This new API enables developers to create discounts that simultaneously apply savings to products, order totals, and shipping costs in a single function—functionality that was previously only possible through Shopify Scripts.
For Shopify developers and app creators, this represents a significant simplification of discount logic. Instead of managing multiple APIs with different rules and limitations, you can now build more complex, multi-layered discount strategies using a single, modern API. This mirrors capabilities that power users relied on in Shopify Scripts, making advanced discount scenarios more accessible to the current developer ecosystem.
When building or updating discount functions, you'll need proper OAuth authentication to access Shopify's APIs. GetShopifyToken simplifies the token generation process, ensuring your app has the correct scopes and permissions needed to work with the new Discount Function API.