Hi @falex28 and @Conjured_Char It is possible to create discount codes which apply to subscriptions using the GraphQL API. If you’re not yet familiar with the GraphQL API guide we have a helpful Getting Started guide I was able to create a discount code which applies to both subscription orders an… Answer from csam on community.shopify.com
🌐
Shopify
shopify.dev › docs › api › functions › latest › discount
Discount Function API
The Discount Function API provides a unified schema for creating Function extensions. A single Function processes one discount (either code-based or automatic), but can apply savings across three discount classes: product, order, and shipping.
Discussions

Shopify Functions Product Discount API - get the collection ids of a product
Maybe you can help us here 🙂 We are wondering if there is a way to find the collection ids of a product using the Shopify Functions Product Discount API - https://shopify.dev/docs/api/functions/reference/product-discounts/graphql/common-objects/product Cheers! More on community.shopify.com
🌐 community.shopify.com
0
May 3, 2023
Discount codes for one-time purchases and subscriptions
Hi, Currently, all discount codes created via Discount APIs are working only for one-time purchases https://shopify.dev/api/admin/rest/reference/discounts There is an option on Shopify Admin to change to “Both” - it means discount codes will work on subscriptions too. More on community.shopify.com
🌐 community.shopify.com
1
1
July 5, 2021
API: List Sales by Discount Code
Hello, I am looking to integrate a SaaS platform with Shopify stores as a Partner, aiming to be able to create Discount Code as needed then listing Sales by any given Discount Code. After going through the docs, I understand that the process would go as follow. Create a PriceRule, using this Admin API ... More on community.shopify.com
🌐 community.shopify.com
0
September 4, 2023
Create Multiple Discounts using Shopify Functions Product Discount API
Is it possible to create multiple discounts using the Shopify Functions Product Discount API? Currently, I’m using the Shopify Function for 'Volume Discount’, but now I want to create a ‘Buy X and Get Y’ and ‘Buy X and Get git’ discount. https://shopify.dev/docs/api/functions/r... More on community.shopify.com
🌐 community.shopify.com
1
October 20, 2023
🌐
Shopify Community
community.shopify.com › retired boards › appdev › custom storefronts
Create / Apply Discount through Storefront API
October 17, 2023 - Hello. I am reading the documentation on Storefront API and I’m incredibly confused. I want to apply a discount with a dynamic amount based on the items in my cart. How do I do this? Can I do this without creating a fixe…
🌐
Shopify Community
community.shopify.com › retired boards › appdev › customers discounts and orders
Shopify Functions Product Discount API
May 3, 2023 - Hey all! Ohad here, from Zoorix. Maybe you can help us here 🙂 We are wondering if there is a way to find the collection ids of a product using the Shopify Functions Product Discount API - https://shopify.dev/docs/api/functions/reference/product-discounts/graphql/common-objects/product Cheers!
🌐
Shopify
shopify.dev › docs › apps › build › discounts › build-discount-function
Build a Discount Function
In this tutorial, you'll use Shopify Functions to create a new type of discount that does three things: - Reduces the price of a cart line by 20% - Discounts the order subtotal by 10% - Provides free shipping After creating the discount, you can test it out in your store. <Notice type="info" title="Migrate your existing discount functions" > To learn how to migrate your existing Discount Functions to use the [Discount API](/docs/api/functions/reference/discount), refer to [Migrate to the Discount API](/docs/apps/build/discounts/migrate-discount-api).
Find elsewhere
🌐
Shopify
shopify.com › partners › blog › discount-kit-shopify-functions-webassembly-api
Discount Kit's Journey: Faster Checkouts with Shopify Functions (2025) - Shopify
July 15, 2025 - 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.
🌐
GitHub
github.com › ramdhanishivam › discount-function-app
GitHub - ramdhanishivam/discount-function-app: Shopify Functions API - Javascript App for Discount
Shopify Functions API - Javascript App for Discount - GitHub - ramdhanishivam/discount-function-app: Shopify Functions API - Javascript App for Discount
Author   ramdhanishivam
🌐
Shopify
shopify.dev › docs › api › admin-rest › latest › resources › discountcode
DiscountCode
March 13, 2017 - The discount_code_id path parameter is the ID of the discount code to retrieve for the associated price rule. ... curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/price_rules/507328175/discount_codes/507328175.json" \
🌐
Shopify Community
community.shopify.com › retired boards › appdev › customers discounts and orders
API: List Sales by Discount Code
September 4, 2023 - Hello, I am looking to integrate a SaaS platform with Shopify stores as a Partner, aiming to be able to create Discount Code as needed then listing Sales by any given Discount Code. After going through the docs, I understand that the process would go as follow. Create a PriceRule, using this Admin API ...
🌐
Beehexa
beehexa.com › devdocs › shopify-api-create-update-delete-a-discount-code-with-postman-in-shopify
Shopify API 2025 - Create, Update, and Delete A Discount Code With Postman In Shopify - Beehexa
April 15, 2025 - You can define the parameters for a discount with the Price Rule resource, but you’ll need to create associated discount codes for customers. I will show you how to create, update and delete a discount code with Postman In Shopify. ... The Admin API section displays the app’s API key and password when you save the app’s details.
🌐
Shopify
changelog.shopify.com › posts › discount-functions-support-on-shopify-pos
Discount Functions support on Shopify POS - Shopify Changelog
June 5, 2024 - Discounts created by Discount Functions ... and POS. Discount Functions can not be excluded from POS. Stores on any plan can use public apps that are distributed through the Shopify App Store and contain functions. Only stores on a Shopify Plus plan can use custom apps that contain Shopify Function APIs...
🌐
Shopify Community
community.shopify.com › shopify apps
Create Multiple Discounts using Shopify Functions Product Discount API
October 20, 2023 - Is it possible to create multiple discounts using the Shopify Functions Product Discount API? Currently, I’m using the Shopify Function for 'Volume Discount’, but now I want to create a ‘Buy X and Get Y’ and ‘Buy X and Get git’ discount. https://shopify.dev/docs/api/functions/r...
🌐
Shopifyseoconsultant
shopifyseoconsultant.com › use-shopify-discount-code-api
Shopify Discount Code API: Discount Management Simplified
Sellers can use the API endpoints to generate unique codes with specific properties. This can include a discount percentage or fixed-amount discounts, free shipping, or buy-one-get-one offers.
🌐
Shopify Community
community.shopify.com › retired boards › appdev › customers discounts and orders
how to apply discount on Line item or on product by using api without create any discount code. - Shopify Community
November 2, 2022 - I am trying to apply discount on product or line item by using graph ql. I created discount code for a product and applied on checkout page, it’s give me discount ,but when i add second discounted product discount is no…
🌐
Shopify Community
community.shopify.com › retired boards › appdev › graphql basics and troubleshooting
How to find the number of times a discount code has been used using Shopify Discount API - Shopify Community
November 30, 2021 - Hi Guys, I’m developing a custom shopify app to fetch discount codes on real time using Shopify Discount API to update the discount values on cart drawer. I have been able to figure out everything except for “how to fi…
🌐
Shopify Help Center
help.shopify.com › en › manual › shopify-flow › reference › actions › get-discount-data
Shopify Help Center | Get discount data
In workflows that require discount data, you can use the Get discount data action to retrieve discount information from your store.
🌐
Oscprofessionals
oscprofessionals.com › home › shopify apps › how to implement shopify discounts through the draftorder api
Implement Shopify Discount API with draftOrder: Step-by-Step Guide
August 28, 2024 - According to Shopify’s latest release document, the draftOrderCreate API now supports acceptAutomaticDiscounts and allowDiscountCodesInCheckout, which allow you to apply default discounts.
Address   34, Mantri House, 34, Cement Rd, Om Sai Nagar, Shivaji Nagar, 440010, Nagpur
🌐
Oscprofessionals
oscprofessionals.com › home › shopify apps › what are the different discount apis for shopify apps?
What Are the Different Discount APIs for Shopify Apps
December 31, 2024 - Contact us now and get your store up and running fast! The Shipping Discount API available via Shopify Apps allows merchants to create discounts for shipping rates applied at checkout.
Address   34, Mantri House, 34, Cement Rd, Om Sai Nagar, Shivaji Nagar, 440010, Nagpur
🌐
Skailama
skailama.com › blog › shopify-discount-functions
Shopify Discount Functions: Implementation Guide & Migration Tips
October 29, 2025 - In either case, Shopify needs a record of a discount in the admin that corresponds to your function. The API call typically includes details like the function ID, the title of the discount, the strategy for how it combines with other discounts, etc.