Invisible Discount Code

Highlighted
Shopify Partner
7 0 2

We are thinking about adding an additional functionality to the Android and iOS apps.

 

The idea is to give some bonuses to the users of the apps to stimulate them to use the app more.

For example – a free shipping for all orders in the app, or an automatic XX% discount when someone orders through the app.

 

Now, I can do it in a simple way by creating a discount code in Shopify and advertising it together with the app.

However, it’s not a good way because it requires users to remember this discount code. Also, such code will be applicable both for purchases on the website or through the app and it isn’t what we want – we want to separate sales channels.

Unfortunately, Shopify in its standard configuration doesn’t allow us to create different discounts for different sales channels.

 

So, I’m thinking about some “invisible” discount code sewed inside the app. This way, it won’t be visible for a customer but it will automatically apply to all orders created inside the app.

 

I've looked into help manuals and API documentations for both Storefront and Admin APIs.

 

Can Shopify support multiple discount code on checkout?

How to create discount code specifically for mobile app users (i.e. apps using Storefront APIs) which will apply automatically during checkout?

 

Please advise on how invisible discount code should be approached.

 

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
624 102 129

Hi @Mayank_Kumar 

 

Can Shopify support multiple discount code on checkout?

No, right now you cannot stack discount codes in Shopify. Only one discount code can apply to one order at a time

 

How to create discount code specifically for mobile app users (i.e. apps using Storefront APIs) which will apply automatically during checkout?

There is no native functionality in Shopify that allows you to do this. You will have to implement this yourself as follows:

  1. Create a discount code on your store to be used on Mobile Apps only. Make sure this discount code is never shared publicly, but save this discount code in your Mobile App's code base
  2. When customer opens the mobile app, use the Storefront API to create the checkout object for them (https://shopify.dev/docs/storefront-api/reference/mutation/checkoutcreate?api[version]=2020-04) and update the checkout object as customer is adding or removing items from their cart  (https://shopify.dev/docs/storefront-api/reference/mutation/checkoutlineitemsreplace?api[version]=202...)
  3. Before user finishes, use this mutation to apply the Mobile App only discount code to their checkout : https://shopify.dev/docs/storefront-api/reference/mutation/checkoutdiscountcodeapplyv2?api[version]=...
  4. Re-direct the user to the 'webUrl' field of the checkout object so the customer can pay for their order and complete the checkout

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes