Discount api problems

Topic summary

Issue: Discounts created via Shopify GraphQL (discountCodeBasicCreate) execute without errors but are not visible in Shopify admin and cannot be applied on the storefront using the previous GET /discount/{code} method.

Context:

  • Switched from PriceRules API to Discounts API to support subscriptions.
  • Previously, GET /discount/{code} successfully populated discount codes in the cart with PriceRules.
  • With Discounts API (discountCodeBasicCreate), the same GET endpoint no longer applies the code.

Current problems:

  • API-created discounts not appearing in Shopify admin > Discounts.
  • Need guidance on how to apply Discounts API codes on the storefront.

Latest update:

  • A participant requested confirmation on whether the GET /discount/{code} still fails and whether discounts remain absent from the admin section.

Status:

  • No resolution yet. The thread is awaiting the original poster’s update and clarification on the two outstanding questions.
Summarized with AI on February 1. AI used: gpt-5.

I try to use shopify discount api. According to documentation i run discountCodeBasicCreate mutation.

mutation discountCodeBasicCreate($basicCodeDiscount: DiscountCodeBasicInput!) {
discountCodeBasicCreate(basicCodeDiscount: $basicCodeDiscount) {
codeDiscountNode {
id,
codeDiscount
}
userErrors {
code
extraInfo
field
message
}
}
}

I run it with all needed variables so it returns without errors

So far i used priceRules API, i had to switch to discounts as priceRules ( this is another problem ) do not support subscriptions. On storefront i apply the discount by making GET request on /discount/${code}, this was working with price rule with discount code API it doesnt. How then i can apply the discount?

One more problem is that discount created by API is not visible in Shopify dashboard.

G.P.

Hi Greg,

Could you please post an update on whether your issues still exist. I.e.

  • Does GET request on /discount/${code} no longer populate the code into the customer’s cart?
  • Do discounts created by API still not show in the Shopify admin > discounts section?