What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Reduction Code Unable to Apply This

Reduction Code Unable to Apply This

brianguyen
Shopify Partner
1 0 1

Hey all,

 

Was wondering if anyone saw this error code being returned at all when using this mutation:  https://shopify.dev/api/storefront/2021-10/mutations/checkoutCreate

 

{
  "err":[{"code":"UNABLE_TO_APPLY","field":null,"message":"Reduction code Unable to apply this discount code. Try again."}],
  "code":"SHOPIFY USER ERROR"
}

 

At a lost at how this error can be returned when none of the inputs have anything related to discount/reduction codes

Replies 3 (3)

Anna55
Shopify Partner
4 0 6

We have the same problem. This error was returned when we updated the checkout with curl as follows, can anyone help with this?

curl --request PUT \ --url https://***.myshopify.com/admin/api/2022-04/checkouts/***.json \ --header 'Content-Type: application/json' \ --header 'X-Shopify-Access-Token: ***' \ --data '{ "checkout": { "line_items": [] } }'

response:

{
    "errors": {
        "reduction_code": [
            {
                "code": "unable_to_apply",
                "message": "Unable to apply this discount code. Try again.",
                "options": {}
            }
        ]
    }
}

 

GabrielAnzaldo
Shopify Partner
1 0 2

Is there any update on this? we are facing the same issue, with an automatic discount.

BillyF
Shopify Partner
1 0 1

We are seeing the same issue at checkout without applying any discount in the discount field. This is a different error than the one when you try to apply a discount that is expired or doesn't work for some other reason. Any progress on figuring out what causes this error? Shopify support suggested checking Recharge but we don't apply discounts using Recharge. Any additional information would be helpful!

 

Screen Shot 2022-10-25 at 4.14.01 PM.png