Anchor to DiscountCodeAppCreatePayloadDiscount
Discount Code App Create Payload
payload
Return type for mutation.
Anchor to FieldsFields
- Anchor to codeAppDiscountcode•
App Discount The discount that the app provides.
- Anchor to userErrorsuser•
Errors [DiscountUser Error!]!non-null The list of errors that occurred from executing the mutation.
Was this section helpful?
Anchor to Mutations with this payloadMutations with this payload
- •mutation
Creates a code discount. The discount type must be provided by an app extension that uses Shopify Functions. Functions can implement order, product, or shipping discount functions. Use this mutation with Shopify Functions when you need custom logic beyond Shopify's native discount types.
For example, use this mutation to create a code discount using an app's "Volume" discount type that applies a percentage off when customers purchase more than the minimum quantity of a product. For an example implementation, refer to our tutorial.
Was this section helpful?