Question about the subscriptionDraftDiscountCodeApply mutation

Solved

Question about the subscriptionDraftDiscountCodeApply mutation

d_tehrani
Shopify Partner
56 1 13

Hi.

I would like to make sure my understanding of the subscriptionDraftDiscountCodeApply mutation is correct.

Let's say I create a discount code that can only be used once for an order (per customer) and apply it to a subscription contract using the subscriptionDraftDiscountCodeApply mutation. Will the discount only apply to the next order of the subscription and not to the orders that come after?

Or do I have to do something else to ensure that the discount code applies to a contract correctly?

 

Thanks.

Accepted Solution (1)

ThomazReis
Shopify Staff
24 10 6

This is an accepted solution.

Hi DanielTehrani,

The `subscriptionDraftDiscountCodeApply` will apply a discount code to a `ContractDraft` that later on can be committed to create a real contract.

The discount code for subscription will have it's own rules, so the discount needs to have the `pruchase type` as subscriptions or both:

ThomazReis_0-1620065666110.png

 

After that, on the usage limit rules you will have the options:

ThomazReis_1-1620065710520.png

 

 

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Replies 2 (2)

ThomazReis
Shopify Staff
24 10 6

This is an accepted solution.

Hi DanielTehrani,

The `subscriptionDraftDiscountCodeApply` will apply a discount code to a `ContractDraft` that later on can be committed to create a real contract.

The discount code for subscription will have it's own rules, so the discount needs to have the `pruchase type` as subscriptions or both:

ThomazReis_0-1620065666110.png

 

After that, on the usage limit rules you will have the options:

ThomazReis_1-1620065710520.png

 

 

To learn more visit the Shopify Help Center or the Community Blog.

d_tehrani
Shopify Partner
56 1 13

Thanks, this clarified things.