How to modify shipping or payment options based on the discount code at Shopify checkout
Modify shipping or payment options when a discount code is applied at Shopify checkout.
•
September 9, 2025

Problem
Many Shopify store owners want to adjust shipping or payment options dynamically when a discount code is applied at the checkout.
Unfortunately, Shopify currently doesn’t share the discount codes with apps. So, we can’t directly detect the discount code applied at the checkout and take action based on it. But there is a workaround to achieve this.
Solution: BeSure Checkout Rules App
We can use the BeSure Checkout Rules app, which provides conditions to detect discounts by percentage or amount and adjust shipping or payment options as needed.
Here’s how to set it up:
1. Install the BeSure Checkout Rules App
First, you need to install the BeSure Checkout Rules app from the Shopify App Store. This app allows you to create custom rules for your Shopify checkout process.
2. Create Shipping or Payment rule
Once the app is installed, open it and click on the “Create rule” button.
- To modify shipping methods, go to the shipping section and then choose from
Reorder, Hide, Discount, or Rename shipping methods. Next, click on “Select rule”, and this will take you to a setup page where you can specify the conditions and actions for your rule.
- Alternatively, to modify payment methods, go to the payment section and then choose from
Reorder, Hide, or Rename payment methods. Next, click on “Select rule”, and this will take you to a setup page where you can specify the conditions and actions for your rule.
3. Select a condition set
Choose “Condition set 6”, which includes conditions for checking applied discount percentages or amounts at the checkout.
4. Set the rule conditions and actions
In the “Conditions” section (where it says When...), choose the condition that matches the discount you applied to detect it at the checkout. This ensures the rule will trigger once the discount is detected.
For example, see below where “Total discount percentage (any discount type) ≥ 30” is selected. This condition means that when any discount of 30% or more is applied, the rule will trigger.
In the “Actions” section, select the action you want to apply when the discount is detected.
For example, see below where
Hide these shipping methodsis selected. Then add a shipping method that containsUPS. This means the rule will hide all shipping methods that include the word UPS in their name when a 30% discount or greater is detected.
5. Save rule
After setting up the rule conditions and actions, click the Save button at the top to create and save your rule.
6. Test the new rule
After setting up the rule, it’s important to test it. Go to your store and proceed through checkout as a customer would. Apply the discount code and verify the results. For example, check that shipping methods containing UPS are hidden as expected when a 30% discount code is applied.
Example Use Case
If we create a discount code ORDER20%OFF on the order total amount and want to hide all shipping methods when this discount is detected, we can do the following:
-
Create a “Hide shipping methods” rule under the Shipping section (follow Step 2 as mentioned above if you’re unsure how to create one).
-
Select Condition set 6 (as explained in Step 3 as mentioned above).
-
In the “Conditions” section (where it says
When...), choose the condition:
Order total discount percentage ≥ 20 AND Order total discount percentage ≤ 20These two conditions with an AND in between will ensure the rule runs only when the discount is exactly 20%, which will happen when the discount code ORDER20%OFF is applied.
- Set the action to “Hide all shipping methods”. Or you can select any other desired action to modify shipping options.
This setup will only be true when the discount is exactly 20%, which means it will effectively detect the specific discount code ORDER20%OFF.
Conclusion
While Shopify does not natively allow changing shipping or payment methods based on discount codes, you can use the BeSure Checkout Rules app to achieve this. With the right setup, you can:
- Enforce specific payment methods for discounted orders.
- Restrict or limit shipping methods when promotions apply.
- Enhance the customer experience by making promotions seamless and rule-driven.
Related Articles
Always show Pickup as the last option on Shopify Checkout
Avoid issues by always showing pick-up as the last option in your Shopify checkout.
Hide Shipping Methods based on specific words in the address at Shopify checkout
Show the right shipping methods on your Shopify store depending on customer's address details.
How to add a fee for COD payment on Shopify checkout
Learn how to set up a fee for Cash on Delivery (COD) payment on Shopify checkout.