Payment FunctionsB2B CommerceCustomer Segmentation$285-$335180-230
Setting Up B2B vs. B2C Payment Option Filtering
Use this template
Here's the deal: you're selling to restaurants AND regular folks, and they want completely different payment options at checkout. Your wholesale customers need invoice terms and purchase orders. Your retail customers want credit cards and digital wallets. Show both groups everything? You've just created a confusing mess.
Step-by-step implementation
Access the Payment Functions Section
- From your Shopify admin, open the Sway Functions app
- You'll see Payment Functions card on the dashboard. Click Create.
- Select "Conditionally Remove Gateways" option
Access the Payment Functions Section
- From your Shopify admin, open the Sway Functions app
- You'll see Payment Functions card on the dashboard. Click Create.
- Select "Conditionally Remove Gateways" option

Create a New Payment Function for B2B Customers
- Click "Create function"
- From the modal, select "Conditionally Remove Gateways"
- You'll be taken to the function editor

Configure Basic Settings
- Enter a descriptive campaign name (e.g., "Wholesale Account Payment Options")
- Set the function status to "Active"

Define B2B Customer Segment
- Under "Customer Qualifier," select "Customer Tags"
- Choose the condition "contains"
- Enter tags that identify B2B customers (e.g., "wholesale", "b2b", "approved_account")
- This ensures the function only applies to tagged wholesale accounts

Configure B2B Payment Options
- Under "Payment Gateway Actions," select "Show Only"
- Choose "Gateway Name Contains"
- Add your B2B-appropriate payment options (e.g., "Invoice", "Purchase Order", "Net 30")
- This ensures B2B customers only see wholesale-appropriate payment methods

Create a Second Function for B2C Customers
- Create a new payment function
- Name it "Retail Customer Payment Options"
- Under "Customer Qualifier," select "Customer Tags"
- Choose the condition "does not contain"
- Enter the same B2B identifier tags
- Under "Payment Gateway Actions," configure to show only consumer payment methods
- Add consumer payment options (e.g., "Credit Card", "PayPal", "Shop Pay")
Company Logo
“The payment customization saved us so much hassle. Being able to hide and reorder payment methods boosted our conversions instantly.”

Marcus D.
Founder at Bold Threads

Here's the deal: you're selling to restaurants AND regular folks, and they want completely different payment options at checkout. Your wholesale customers need invoice terms and purchase orders. Your retail customers want credit cards and digital wallets. Show both groups everything? You've just created a confusing mess.
We solve this by filtering payment options based on who's buying. Standard Shopify checkout doesn't do customer-specific payments, but Sway Functions does. You can detect B2B versus B2C customers and show each group exactly what they need.
- From your Shopify admin, open the Sway Functions app
- You'll see Payment Functions card on the dashboard. Click Create.
- Select "Conditionally Remove Gateways" option
Here's the deal: you're selling to restaurants AND regular folks, and they want completely different payment options at checkout. Your wholesale customers need invoice terms and purchase orders. Your retail customers want credit cards and digital wallets. Show both groups everything? You've just created a confusing mess.
We solve this by filtering payment options based on who's buying. Standard Shopify checkout doesn't do customer-specific payments, but Sway Functions does. You can detect B2B versus B2C customers and show each group exactly what they need.
Related Templates

May 5, 2025
Setting Up Tiered Discounts for Bulk Purchases
Tiered Discount FunctionsBulk Purchases
May 5, 2025
Creating Conditional Discounts for First-Time Buyers
Discount FunctionsDirect-to-ConsumerCustomer Acquisition
May 5, 2025