Question about the subscriptionDraftDiscountCodeApply mutation

Solved
DanielTehrani
Excursionist
30 1 5

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.

0 Likes
ThomazReis
Shopify Staff
Shopify Staff
8 4 5

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

 

 

DanielTehrani
Excursionist
30 1 5

Thanks, this clarified things.

0 Likes