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

  1. From your Shopify admin, open the Sway Functions Generator app
  2. Click on "Functions" in the main navigation
  3. Select the "Payment" tab

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

For more nuanced payment controls:

  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

Customer Risk Profile-Based Rules

For payment options based on customer risk assessments:

  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"

Product-Specific Payment Restrictions

For items with unique payment requirements:

  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

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

To optimize your conditional payment approach:

  1. Add Payment Method Information Pages - Explain available payment options and conditions
  2. Create Market-Specific FAQs - Address common payment questions for different regions
  3. Highlight Available Options - Clearly display available payment methods on product and cart pages
  4. Use Pre-Checkout Messaging - Let customers know what payment options will be available
  5. 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:

Measuring Success

To evaluate the effectiveness of your conditional payment gateway strategy, monitor these metrics:

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:

  1. Analyzing your payment fraud and chargeback patterns
  2. Identifying high-risk order scenarios and thresholds
  3. Understanding which payment methods present the greatest risk in different contexts
  4. Creating your conditional payment gateway functions
  5. 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