About the Shipping Discount Function API
The Shipping Discount API enables you to create a new type of discount that's applied to one or more shipping rates at checkout.
Example use cases
Anchor link to section titled "Example use cases"- Free shipping.
- A discount on shipping. For example, 20% off shipping or $5 off shipping.
- A discount on specific shipping rates. For example, 50% off Standard shipping.
Developer tools and resources
Anchor link to section titled "Developer tools and resources"Migrating from scripts to functions
Anchor link to section titled "Migrating from scripts to functions"If you want to migrate an existing shipping script to Shopify Functions, then you can use the following mapping:
Shopify Scripts method | Description | Shopify Functions object |
---|---|---|
apply_discount |
Applies a discount to a shipping rate | Shipping discounts |
- Learn how to use Shopify Functions by building a discounts experience.