Creating Conditional Payment Gateway Availability Rules
Last updated
7th May 2025
Read time
8 mins
Cover image
Beauty retailers and other businesses with global reach face important risk management challenges when it comes to payment options. Services like AfterPay and other Buy Now, Pay Later (BNPL) options can boost conversion rates but may present increased risk for high-value orders or international transactions. The ideal solution involves creating conditional rules that dynamically hide specific payment gateways based on factors like order value, customer location, or other risk indicators.
Standard Shopify checkout settings don't support conditional payment gateway rules, but with the Sway Functions Generator, you can create sophisticated payment functions that evaluate order details and customer data to determine which payment options should be available.
The Business Case for Conditional Payment Gateway Rules
Reduced Payment Risk
Limit high-risk payment methods for specific scenarios
Streamlined Checkout Experience
Show only relevant payment options to each customer
Lower Fraud and Chargeback Rates
Prevent high-risk transactions through gateway availability control
Improved International Strategy
Adapt payment options to local market conditions and restrictions
Better Compliance Management
Ensure payment methods meet regulatory requirements in different regions
Step-by-Step Implementation
1. Access the Payment Functions Section
Screenshot showing the Functions menu with Payment option highlighted
- From your Shopify admin, open the Sway Functions Generator app
- Click on "Functions" in the main navigation
- Select the "Payment" tab
2. Create a New Payment Function
Screenshot showing the 'Create function' button and payment type selection
- Click "Create function"
- From the modal, select "Conditionally Remove Gateways"
- You'll be taken to the function editor
3. Configure Basic Settings
Screenshot showing the basic payment function configuration form
- Enter a descriptive campaign name (e.g., "High-Value Order Payment Restrictions")
- Set the function status to "Active"
4. Define High-Value Order Condition
Screenshot showing high-value order configuration
This is where you'll specify when certain payment methods should be hidden:
- Under "Cart Qualifier," select "Cart Total"
- Choose the condition "greater than or equal to"
- Enter your high-value threshold (e.g., "$1000.00")
- This ensures the function activates for orders exceeding $1,000
5. Configure Payment Gateway Hiding
Screenshot showing payment gateway hiding configuration
Now define which payment options should be hidden for high-value orders:
- Under "Payment Gateway Actions," select "Hide Gateways"
- Choose "Gateway Name Contains"
- Enter the payment method to restrict (e.g., "Afterpay", "Klarna", "Affirm")
- This hides BNPL options for orders over $1,000
6. Create a Second Function for International Orders
Screenshot showing international order function configuration
- Create a new payment function
- Name it "International Payment Method Restrictions"
- Under "Customer Qualifier," select "Shipping Address Country"
- Choose the condition "is not one of"
- Add your domestic market countries (e.g., "Australia", "New Zealand")
- Configure the same payment gateway hiding actions
- This ensures international customers don't see restricted payment methods
7. Save and Test
- Save both functions
- Test thoroughly with different order values and shipping addresses
Advanced Configuration Options
Combined Condition Rules
For more nuanced payment controls:
- Create functions with multiple qualifiers using AND/OR relationships
- For example: Hide BNPL options when (Order Value > $1,000) OR (Customer is International)
- Set appropriate priority levels to ensure the correct rules apply
Customer Risk Profile-Based Rules
For payment options based on customer risk assessments:
- Add customer tag qualifiers to payment functions
- Tag customers based on purchase history and risk factors
- Create specific payment option sets for different risk profiles
- For example: Hide high-risk payment methods for customers tagged as "high_risk"
Product-Specific Payment Restrictions
For items with unique payment requirements:
- Add product tag or collection qualifiers to payment functions
- Create specific payment rules for different product types
- For example: Hide certain payment methods for "high-value" or "fragile" products that have higher return/chargeback risk
Implementation Example: Australian Beauty Retailer
Screenshot showing beauty retailer payment example
Here's a real-world example from an Australian beauty retailer:
-
Standard Payment Options:
- Credit/Debit Cards (Visa, Mastercard, Amex)
- PayPal
- Apple Pay / Google Pay
- AfterPay / Klarna
- Shop Pay Installments
-
High-Value Order Rules ($1,000+):
- Hide: AfterPay, Klarna, Shop Pay Installments
- Show: Credit/Debit Cards, PayPal, Apple Pay / Google Pay
- Reason: Risk management for high-value orders
-
International Customer Rules:
- Hide: AfterPay, Klarna, Shop Pay Installments
- Show: Credit/Debit Cards, PayPal, Apple Pay / Google Pay
- Reason: Higher fraud risk and regulatory complexity with international BNPL transactions
-
Combined High-Risk Scenario:
- International customer + order over $500
- Only show: Credit Cards, PayPal
- Reason: Maximum risk mitigation for highest-risk transactions
Merchandising Your Payment Gateway Strategy
Screenshot showing payment gateway merchandising
To optimize your conditional payment approach:
- Add Payment Method Information Pages - Explain available payment options and conditions
- Create Market-Specific FAQs - Address common payment questions for different regions
- Highlight Available Options - Clearly display available payment methods on product and cart pages
- Use Pre-Checkout Messaging - Let customers know what payment options will be available
- Provide Alternative Options - Suggest alternatives when preferred payment methods aren't available
Real Results: Beauty Retailer Case Study
A beauty retailer implemented conditional payment gateway rules with these results:
- 48% reduction in BNPL-related fraud incidents
- 36% decrease in international order chargebacks
- 22% lower payment processing dispute rate
- 18% reduction in order cancellations due to payment issues
- Minimal impact on overall conversion rate (less than 0.5% decrease)
Measuring Success
To evaluate the effectiveness of your conditional payment gateway strategy, monitor these metrics:
- Fraud Rate by Payment Method - Are risky payment-related fraud incidents decreasing?
- Chargeback Rate - Are chargebacks declining for previously problematic scenarios?
- Order Approval Rate - Are more orders being successfully processed without flags?
- Conversion Impact - Has there been any significant effect on checkout conversion?
- Customer Feedback - Are customers reporting payment option confusion or frustration?
Common Issues and Solutions
| Issue | Solution | |-------|----------| | Customer confusion about unavailable payment methods | Add clear pre-checkout messaging about available options | | Difficulty identifying payment gateway code names | Consult with your payment providers for exact gateway identifiers | | Lost sales from restricted payment options | Consider adding additional secure payment alternatives | | Varying BNPL provider policies | Create provider-specific rules based on their individual risk policies |
Next Steps
Ready to implement conditional payment gateway rules for your store? Start by:
- Analyzing your payment fraud and chargeback patterns
- Identifying high-risk order scenarios and thresholds
- Understanding which payment methods present the greatest risk in different contexts
- Creating your conditional payment gateway functions
- Monitoring the impact on both risk metrics and conversion rates
For personalized assistance with your payment risk management strategy, book a consultation with our team.
Ask in our community
Question not answered? Ask us and other customers in the Sway customer community.
Go to community
Contact support
Message our support team privately to discuss anything specific to your organization
Contact support