how to know the subscript contract has free shipping discount

Hi. I work on implement discount code on subscription. If a subscription contract has free shipping discount, i need to avoid adding other discount code.

Are there any free shipping info on subscriptionContract or subscriptionDraft?

Hi @Yasuhiro ,

Here are our official docs on creating and managing discounts on subscriptions - specifically for your questions, you may be looking for Adding a free shipping discount to a subscription contract and Querying discount allocations on a subscription contract.

Hope this helps!

Cheers,

Noah

1 Like

Hi Noah.

Thanks your the reply.

I have already implemented the feature to add free shipping code by subscriptionDraftDiscountCodeApply and subscriptionDraftCommit. and I can make sure the subscription contract has free shipping if the subscription purchase completed and got mail. (the mail mention the purchase has free shipping)

but I can’t make sure the subscription contract has free shipping before the purchase is not completed even I use the Querying discount allocations.

it it is “percentage discount” or “fixed amount discount”, it is listed in “data.subscriptionDraft.lines.edges.node.discountAllocations”. but if it is free shipping discount, it is not listed on the place.

I’m looking for the other way..

Yasuhiro