How to auto apply discount when user selects online payment

Topic summary

A user seeks to automatically apply a discount when customers select online payment at checkout.

Technical Constraints:

  • This functionality requires Shopify Plus and cannot be implemented on standard Shopify plans
  • Standard discount APIs lack access to payment method information

Proposed Solution (Plus stores only):

  • Use a Checkout UI extension to detect the selected payment method and set a cart attribute
  • Build a Shopify Functions discount that triggers based on that cart attribute
  • Requires developing a custom app combining both APIs

Key Limitation:
Both Checkout UI extensions and custom Shopify Functions are Plus-exclusive features, making this approach unavailable to non-Plus merchants.

Summarized with AI on October 30. AI used: claude-sonnet-4-5-20250929.

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

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