Creating Conditional Payment Gateway Availability Rules

Last updated
7th May 2025
Read time
8 mins

You love Afterpay and Klarna for boosting conversions, but they're making you nervous on big orders and international sales. BNPL options can turn risky fast when customers are buying $2,000 worth of skincare from overseas.

The smart move? Hide specific payment methods when things get risky. High order values, international shipping addresses, or other red flags should trigger different payment options.

Shopify's standard checkout doesn't do conditional payment rules, but Sway Functions does. You can evaluate order details and customer data to show exactly the right payment options.

Smart merchants control risk without killing conversions.

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

  1. From your Shopify admin, open the Sway Functions app
  2. You'll see Payment Functions card on the dashboard. Click Create.
  3. Select "Conditionally remove gateways" option

2. Create a New Payment Function

Screenshot showing the 'Create function' button and payment type selection

  1. Click "Create function"
  2. From the modal, select "Conditionally Remove Gateways"
  3. You'll be taken to the function editor

3. Configure Basic Settings

Screenshot showing the basic payment function configuration form

  1. Enter a descriptive campaign name (e.g., "High-Value Order Payment Restrictions")
  2. 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:

  1. Under "Cart Qualifier," select "Cart Total"
  2. Choose the condition "greater than or equal to"
  3. Enter your high-value threshold (e.g., "$1000.00")
  4. 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:

  1. Under "Payment Gateway Actions," select "Hide Gateways"
  2. Choose "Gateway Name Contains"
  3. Enter the payment method to restrict (e.g., "Afterpay", "Klarna", "Affirm")
  4. This hides BNPL options for orders over $1,000

6. Create a Second Function for International Orders

Screenshot showing international order function configuration

  1. Create a new payment function
  2. Name it "International Payment Method Restrictions"
  3. Under "Customer Qualifier," select "Shipping Address Country"
  4. Choose the condition "is not one of"
  5. Add your domestic market countries (e.g., "Australia", "New Zealand")
  6. Configure the same payment gateway hiding actions
  7. This ensures international customers don't see restricted payment methods

7. Save and Test

  1. Save both functions
  2. Test thoroughly with different order values and shipping addresses

Advanced Configuration Options

Combined Condition Rules

Want more sophisticated control?

  1. Create functions with multiple qualifiers using AND/OR relationships
  2. For example: Hide BNPL options when (Order Value > $1,000) OR (Customer is International)
  3. Set appropriate priority levels to ensure the correct rules apply

Multiple conditions give you better control.

Customer Risk Profile-Based Rules

Some customers are riskier than others:

  1. Add customer tag qualifiers to payment functions
  2. Tag customers based on purchase history and risk factors
  3. Create specific payment option sets for different risk profiles
  4. For example: Hide high-risk payment methods for customers tagged as "high_risk"

Past behaviour predicts future risk.

Product-Specific Payment Restrictions

Some products need special treatment:

  1. Add product tag or collection qualifiers to payment functions
  2. Create specific payment rules for different product types
  3. For example: Hide certain payment methods for "high-value" or "fragile" products that have higher return/chargeback risk

Expensive or delicate items deserve extra protection.

Implementation Example: Australian Beauty Retailer

Screenshot showing beauty retailer payment example

Here's a real-world example from an Australian beauty retailer:

  1. Standard Payment Options:

    • Credit/Debit Cards (Visa, Mastercard, Amex)
    • PayPal
    • Apple Pay / Google Pay
    • AfterPay / Klarna
    • Shop Pay Installments
  2. 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
  3. 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
  4. 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

Make your payment strategy work smarter:

Transparency beats confusion every time.

Real Results: Beauty Retailer Case Study

One beauty retailer got serious about payment risk:

Proof that smart restrictions protect profits.

Measuring Success

Watch these numbers to know if it's working:

Data tells the real story about payment controls.

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

Time to take control of payment risk? Start with:

  1. Analyzing your fraud and chargeback patterns
  2. Identifying high-risk scenarios and thresholds
  3. Understanding which payment methods are riskiest where
  4. Creating your conditional gateway functions
  5. Monitoring impact on both risk and conversions

Need help with payment risk management? 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