Skip to main content
Anchor to discountCodeBasicCreate

discountCodeBasicCreate

mutation

Requires Apps must have write_discounts access scope.

Creates an amount off discount that's applied on a cart and at checkout when a customer enters a code. Amount off discounts can be a percentage off or a fixed amount off.


Note

To create discounts that are automatically applied on a cart and at checkout, use the discountAutomaticBasicCreate mutation.


•DiscountCodeBasicInput!required

The input data used to create the discount code.


Was this section helpful?

Anchor to DiscountCodeBasicCreatePayload returnsDiscountCodeBasicCreatePayload returns

•DiscountCodeNode

The discount code that was created.

•[DiscountUserError!]!non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?