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.

Storefront cartDiscountCodesUpdate missing checkoutUserErrors

Storefront cartDiscountCodesUpdate missing checkoutUserErrors

Lennart-Franck
Shopify Partner
1 0 0

Hey, 

as of Storefront API version 2024-04 the Checkout API’s will be marked as deprecated. The deprecated checkoutDiscountCodeApplyV2 has the return field checkoutUserErrors which also states error codes for why a discount code may not applied. The new alternative cartDiscountCodesUpdate does not have this field and therefore there is no way of indicating why a code was not applied. 

 

Is there a way of finding out, why a discount code was not applied if it was not applied. 

 

Thanks. 

Reply 1 (1)

Rajanverma
Shopify Partner
11 0 1

use userErrors {field message }