How to auto apply discount when user selects online payment

How to auto apply discount when user selects online payment

arkray
Tourist
12 0 4

how to give an auto discount to the customer when he selects online payment on checkout page?

Reply 1 (1)

tobebuilds
Shopify Partner
567 41 151

Hi Arkray,

 

You probably can't achieve this without Shopify Plus.

 

Typically, for custom discounting, I would recommend the Shopify Functions API. Only Plus stores can build custom apps with this API, but any store can use public apps built with it.

 

However, Shopify Functions discounts don't have access to information about the selected payment method. If I had to guess, the Checkout UI extensions API probably does. You could probably put together a solution where a checkout UI extension sets a special cart attribute based on the payment method, and then your Shopify Functions discount only applies based on that cart attribute. The thing is, Checkout UI extensions are also Plus-only.

 

If you are on Plus, though, then the solution I outlined above should work for you. You can build a custom app.

 

Hope this helps,

Tobe

Founder, Regios Discounts app (4.8 stars, 89 reviews, Built for Shopify)
- Custom discounts made simple
- "Just about any discount you'll ever need"
- Built by an ex-Google software engineer
- Often imitated, never duplicated