Description
Many WooCommerce stores charge different payment methods differently. For example, you might want to add a small handling fee for Cash on Delivery orders, encourage customers to pay by bank transfer with a discount, or recover the transaction fees charged by payment providers.
Payment Gateway-Based Fees and Discounts for WooCommerce lets you automatically add a fixed amount or percentage-based fee or offer a discount based on the payment method your customer selects during checkout. It works with WooCommerce’s built-in payment gateways, such as Cash on Delivery, Direct Bank Transfer (BACS), and third-party payment gateways such as PayPal, added by other WooCommerce extensions.
Key Features
Charge Extra or Offer Discounts Based on Payment Method
Different payment methods come with different costs. This plugin lets you automatically add an extra fee or offer a discount based on the payment option your customer selects during checkout.
Set Up Fee Rules That Match Your Store
Every store has different pricing needs, so the plugin gives you flexibility without making setup complicated.
You can:
* Charge a fixed amount or a percentage of the order total.
* Add extra fixed or percentage-based fees when required.
* Set minimum and maximum fee or discount values.
* Apply fees only when the cart total falls within a specific range.
* Combine multiple gateway fees into a single line at checkout.
* Limit the maximum total fee or discount applied to an order.
Show Clear Pricing at Checkout
Unexpected charges can confuse customers. The plugin lets you control how payment gateway fees and discounts are displayed throughout the shopping experience.
You can:
* Customize the fee or discount label shown during checkout.
* Hide fee information on the Cart page if preferred.
* Display payment method fee information on the product page so customers know what to expect before they checkout.
Configure Fees the Way Your Business Needs
Whether you include shipping costs in your calculations or need taxes applied to gateway fees, you can configure the plugin to match the way your store operates.
The Lite version allows you to:
* Apply taxes to payment gateway fees.
* Round calculated fee values automatically.
* Include or exclude shipping charges when calculating fees.
Works with WooCommerce Payment Gateways
The plugin supports WooCommerce’s default payment methods, including:
* Direct Bank Transfer (BACS)
* Cash on Delivery (COD)
* Cheque Payments
It also works with payment gateways added by third-party WooCommerce plugins, so you can apply the same fee or discount rules across your preferred payment methods.
Common Use Cases
Payment Gateway Based Fees and Discounts for WooCommerce is suitable for many different store types, including:
* Charge a handling fee for Cash on Delivery (COD) orders.
* Offer a discount for customers who choose Direct Bank Transfer (BACS).
* Recover payment processing costs by adding a percentage-based checkout surcharge.
* Add a fixed convenience fee for selected payment methods.
* Encourage customers to use lower-cost payment gateways by offering incentives.
* Display payment method fees before checkout to improve pricing transparency.
Documentation & Support
Need help getting started?
* Visit the WordPress support forums
* Check the documentation for common answers
* Try the live demo to see how the plugin works on the storefront.
If the plugin helps your business, consider leaving a ⭐⭐⭐⭐⭐ review. Your feedback helps other WooCommerce merchants discover the plugin.
Looking for More Advanced Features?
If you need more advanced pricing rules for different payment methods, the Pro version extends the Lite plugin with additional conditions and greater flexibility.
Upgrade to Payment Gateway Based Fees and Discounts for WooCommerce Pro to configure:
* Per-product payment gateway fees and discounts
* Customer country and state-based rules
* Product category restrictions
* Shipping method conditions
* Card-based fees using issuing country, bank, or card network
* Additional advanced fee calculation options
See the complete Lite vs Pro comparison: https://www.tychesoftwares.com/differences-between-pro-and-lite-versions-of-payment-gateway-based-fees-and-discounts-for-woocommerce-plugin/
About Tyche Softwares
Payment Gateway Based Fees and Discounts for WooCommerce is developed and maintained by Tyche Softwares, creators of WooCommerce extensions since 2012.
Our plugins help WooCommerce merchants manage pricing, deliveries, bookings, checkout customization, abandoned carts, and other day-to-day store operations. We actively maintain our plugins to keep them compatible with the latest versions of WooCommerce and WordPress.
Explore More WooCommerce Plugins
Tyche Softwares also develops plugins for abandoned cart recovery, order delivery scheduling, bookings, invoices and packing slips, custom order numbers, product input fields, BOGO offers, payment gateway fees, call for price, role-based pricing, currency management, and other WooCommerce enhancements.
Some of our Pro plugins:
Some of our other free plugins:
External Services
This plugin communicates with our tracking server to send usage data only if the user has explicitly opted in to usage tracking. For detailed information about what is tracked, please refer to our usage tracking documentation.
Installation
- Upload the entire plugin folder to the
/wp-content/plugins/directory. - Activate the plugin through the “Plugins” menu in WordPress.
- Go to “WooCommerce > Settings > Payment Gateway Based Fees and Discounts”.
FAQ
-
How do I add a Cash on Delivery (COD) fee in WooCommerce?
-
Enable a fee for the Cash on Delivery payment gateway and configure it as either a fixed amount or a percentage. The fee is automatically added to the order total when customers select the Cash on Delivery payment method during checkout.
-
Can I offer a discount for Direct Bank Transfer (BACS)?
-
Yes. You can configure a discount for the Direct Bank Transfer (BACS) payment gateway to encourage customers to use a lower-cost payment method.
-
Can I add both fixed and percentage-based fees?
-
Yes. The plugin supports both fixed amount and percentage-based fees and discounts, allowing you to choose the pricing method that best suits your business.
-
Can I limit when payment gateway fees are applied?
-
Yes. You can configure minimum and maximum cart amounts, as well as minimum and maximum fee values, to control when gateway fees or discounts are applied.
-
Does the plugin work with third-party payment gateways?
-
Yes. In addition to the standard WooCommerce payment gateways, the plugin also works with payment gateways added by other WooCommerce extensions.
-
Can I customize how the fee is displayed to customers?
-
Yes. You can set a custom title for each payment gateway fee or discount, making it easier for customers to understand any additional charges or savings during checkout.
-
Can I apply taxes to payment gateway fees?
-
Yes. The plugin lets you configure tax settings for payment gateway fees and discounts, along with rounding options to match your store’s pricing requirements.
-
Can I display payment gateway fee information before checkout?
-
Yes. The Lite version lets you display payment gateway fee or discount information on the product page, helping customers understand any additional charges or savings before they reach checkout.
-
When should I upgrade to the Pro version?
-
The Lite version is suitable if you want to apply payment gateway fees or discounts across your WooCommerce store.
Consider upgrading to the Pro version if you need additional conditions such as:
* Per-product payment gateway fees and discounts
* Rules based on customer country or state
* Product category-specific rules
* Shipping method-based conditions
* Card-specific fees based on issuing bank, network, or countryFor a complete feature comparison, see the Lite vs Pro comparison page.
Reviews
Contributors & Developers
“Payment Gateway Based Fees and Discounts for WooCommerce” is open source software. The following people have contributed to this plugin.
Contributors“Payment Gateway Based Fees and Discounts for WooCommerce” has been translated into 28 locales. Thank you to the translators for their contributions.
Translate “Payment Gateway Based Fees and Discounts for WooCommerce” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
3.2.0 – 07/07/2026
- New – React-based admin interface for General, Payment Gateways, Global Extra Fee, and Info pages.
- Dev – Introduced a REST API layer (pgbf-pro/v1) for plugin settings operations.
- Dev – Consolidated settings storage from individual alg_gateways_fees_* and alg_woocommerce_checkout_fees_* options into pgbf_pro_settings and pgbf_pro_gateway_settings JSON objects.
- Dev – Consolidated product fee meta keys into _pgbf_pro_product_fees JSON meta key.
- Fix – Fixed payment gateway fees not being applied or changed when the Pay for order page is visited in incognito mode.
- Update – Compatibility with WordPress 7.0.
- Update – Compatibility with WooCommerce 10.9.3.
3.1.0 – 02/06/2026
- Fix – Payment gateway fees are now correctly calculated on the deposit amount when using WooCommerce Deposits.
- Fix – Credit card payment charges were being added multiple times on the Pay for Order page after refreshing the Pay for Order page.
- Fix – Security vulnerability reported by Patchstack that allowed unauthenticated users to change the payment method for orders.
3.0.0 – 10/03/2026
- Fix – In Block Checkout, the Place Order button is now temporarily disabled while recalculating fees/discounts after switching payment gateways, preventing incorrect fee application.
- Fix – Issue where multiple taxes for payment gateway fees were not displayed correctly in Classic Cart and Checkout.
2.19.0 – 14/01/2026
- Fix – Added the alg_wc_gateway_fee_before_final_fee filter to modify the payment gateway final fees on checkout.
- Tweak – Updated for compatibility with WordPress 6.9.0
- Tweak – Updated for compatibility with WooCommerce 10.4.3
2.18.0 – 19/08/2025
- Fix – Mollie Payments for WooCommerce payment method labels not showing on the payment gateway settings page.
- Fix – Compatibility issue where default payment gateway settings tabs were not working with WooCommerce 10.1.0.
2.17.0 – 29/04/2025
- Fix – Issue where, if the fee title was left empty, the gateway fees were incorrectly added when changing the payment method or reloading the “Pay for Order” page.
- Fix – The “Reset Section” option is not working in the Payment Methods tab.
- Tweak – Updated for compatibility with WordPress 6.8.0
- Tweak – Updated for compatibility with WooCommerce 9.8.2
2.16.0 – 20/02/2025
- Fix – Titles of different payment gateways from the WooCommerce Payments plugin were not appearing on the payment gateway based settings page and under the per-product settings.
- Fix – The EveryPay payment gateway fees were not displayed on the checkout page, though the fees were still charged for the order.
- Fix – Percentage-based payment gateway fees did not account for Tip fees added via the WPC Order Tip for WooCommerce plugin. Added the ‘external_fee_include_in_gateway_fee’ filter to handle this.
- Fix – PHP Deprecated notice: Creation of dynamic property Alg_WC_Checkout_Fees::$fees is deprecated.
- Fix – The Global Extra Fee was not added on the checkout page when the WooCommerce Checkout Block was enabled and the WooCommerce Subscriptions plugin was active.
2.15.0 – 22/11/2024
- Fix – Translation loading was triggered too early, causing errors when changing the site language in WordPress 6.7.
- Tweak – Removed the call to our tracking server to fetch the deactivation reasons and added them in the plugin itself.
2.14.0 – 22/10/2024
- Fix – Deactivation survey request was being sent even though ‘Skip & deactivate’ was selected while deactivating the plugin.
- Fix – Compatibility issue with the WooCommerce Authorize.Net Gateway plugin.
- Fix – The payment gateway fees or discounts are not charged on the ‘Pay for this order’ page.
2.13.0 – 09/06/2024
- Fix – Added a nonce check for Cross-Site Request Forgery (CSRF) vulnerability on the reset button
- Fix – Payment Gateway fees did not update when the payment gateway was changed on WooCommerce Cart/Checkout blocks
- Fix – The maximum fee value option was not working as expected.
- Fix – A fatal error was shown when activating the ‘WooCommerce Table Rate Shipping’ plugin with our PGBF lite plugin.
2.12.2 – 01/04/2024
- Fix – Cross Site Request Forgery (CSRF) vulnerability.
2.12.1 – 21/03/2024
- Fix – Cross Site Request Forgery (CSRF) vulnerability.
2.12.0 – 27/02/2024
- Fix – The payment gateway fees are added twice when Woo Discount Rules plugins are activated.
- Fix – Payment gateway fees are not visible on the checkout block page.
- Fix – Compatibility with Woo Discount Rules plugins where the payment gateway fees are added twice.
- Fix – Compatibility with the Almapay payment plugin.
- Fix – Added hook/filter called ‘alg_wc_checkout_fees_after_fees_added’ & ‘alg_wc_checkout_fees_after_order_updated’ to customize fees.
- Fix – Payment gateway fees is not calculated for one of the Nexi XPay method.
2.11.0 – 21/11/2023
- Fix – Tax is being included for Discount.
- Fix – Option to show fees on cart page based on previously payment method was selected.
- Fix – Unable to remove fees from Edit Order Page.
- Fix – WooCommerce Fees is being removed when adding Order Fees in Admin Side.
- Dev – Percentage Fees option added for ‘Global Extra Fee’.
- Fix – Cross Site Request Forgery (CSRF) vulnerability.
2.10.3 – 13/07/2023
- Fix – Fees are not getting recalculated on the backend when the payment gateway is changed after placing the order.
- Fix – Fatal errors while processing a refund on the edit order page.
2.10.2 – 04/07/2023
- Fix – After an order has been placed, fees are being duplicated.
- Fix – Fatal Errors on the checkout page with PHP 8.1.12.
- Fix – Added deactivation survey v2.
- Fix – Payment methods are collapses a moment after the page loads on “Change Payment” button of Subscription order.
2.10.1 – 20/06/2023
- Fix – Fatal error when High-Performance Order Storage (HPOS) is enabled on store.
2.10.0 – 20/06/2023
- Fix – Compatibility with “zipMoney(Zip Co) Payments Plugin for WooCommerce” plugin.
- Fix – Compatibility with “iyzico WooCommerce” plugin.
- Fix – Compatibility with the “Bykea.Cash � Online Payments” plugin.
- Fix – Compatibility with “ECPay” plugin.
- Fix – Compatibility with “bSecure � Your Universal Checkout” plugin.
- Fix – Made some changes to solve the conflict with Germanized for WooCommerce plugin.
- Fix – Incorrect fees amount when the fees is set in negative value and tax is enabled.
- Fix – Not possible to select the Payment Gateway on the checkout page when our plugin is activated.
- Fix – Fees & Discounts are not getting applied for the individual product.
- Fix – When we access the link from the Invoice to pay the payment, stripe card details fields are hidden.
- Fix – Fees are not getting recalculated on the backend when the payment gateway is changed after placing the order.
- Fix – Fatal Errors on the checkout page with PHP 8.1.12.
- Fix – Fatal Errors on error message after activating the plugin with PHP 8.2.4.
2.9.0 – 17/01/2023
- Fix – Fatal Errors on the checkout page with PHP 8.
- Fix – Fees are getting multiplied when we try to repay the subscription order.
2.8.0 – 15/11/2022
- Enhancement – Introduced compatibility with WooCommerce High Performance Order Storage.
2.7.0 – 12/07/2022
- Fix – Plugin strings are not getting translated according to the User’s selected language.
- Fix – The fees should be applied after calculating the discounted price.
- Fix – Credit Card Details Fields are becoming invisible on the payment page.
- Fix – Compatibility with WooCommerce Subscriptions plugin.
- Fix – Discount is applied multiple times when customers try to pay for the order.
2.6.4 – 28/09/2021
- Fix – Zero priced products were showing the discount in the payment gateway info table on the product page. This is fixed now.
- Fix – When the order is created manually without any products in it and only WooCommerce fees are added at that time fees were not getting added. This is fixed now.
- Fix – Style and Script were loading all around admin side and not only on the particular page. This is fixed now.
- Fix – When taxes were enabled on the payment gateway fees, fatal error was coming on the pay for order page. This is fixed now.
2.6.3 – 12/05/2021
- Enhancement – Now the discount/fees will be added or removed on the “Pay for order” endpoint also.
- Fix – Compatibility with WooCommerce ERIP Gateway Payment plugin.
- Fix – Compatibility with Klarna payment gateway.
- Fix – HTML code was coming in the titles of payment gateway on settings page. This is fixed now.
2.6.2 – 12/11/2020
- Update compatibility with WooCommerce 4.7
- Fix – On backend the gateway fees were accepted only as whole numbers. This is fixed now.
- Fix – Getting errors in debug log when the option “Enable Tax” were enabled. This is fixed now.
- Fix – Includes string was not getting translated on the checkout page. This is fixed now.
- Fix – On checkout page taxname was not getting when the tax was included in the fees. This is fixed now.
2.6.1 – 20/03/2020
- Update compatibility with WooCommerce 4.0.0.
2.6 – 23/08/2019
- Made the plugin code compliant with WPCS standards.
- Added UTM tags for the Pro plugin links.
2.5.9 – 18/04/2019
- Fix – Fees are not being carried over from the Checkout page to the order.
- Fix – Discounts are not being applied to renewal orders for subscription products.
2.5.8 – 11/04/2019
- Added compatibility with WooCommerce Subscriptions.
- The plugin goes into continous loading of the cart at Checkout when precision is left blanks for rounding. Fixed the same.
- Added uninstall.php file to ensure the plugin data is deleted when the plugin is uninstalled.
2.5.7 – 01/02/2019
- Author name in the header has been changed.
2.5.6 – 16/11/2018
- Author name and URL updated due to handover of the plugins
2.5.5 – 31/10/2018
- Compatibility with WooCommerce 3.5.0 tested.
2.5.4 – 16/10/2018
- Dev – Current (i.e. chosen) payment gateway function rewritten (fixes the issue with 100% discount coupons on the checkout page – fees were not reapplied when coupon is removed).
2.5.3 – 12/10/2018
- Fix – Coupons usage with “WooCommerce Gift Certificates” plugin fixed.
- Fix – Settings hook priority increased, so gateways fees settings are not loaded too early (fixes the issue with “Mollie Payments for WooCommerce” plugin).
2.5.2 – 17/09/2018
- Dev – Code refactoring.
2.5.1 – 04/08/2018
- Fix – Product categories – Calculation type – Categories to exclude – Only for selected products – Option fixed.
- Dev – Admin settings descriptions updated.
- Dev – “States to include/exclude” options added.
2.5.0 – 04/08/2018
- Dev – Major code refactoring and clean up. Main plugin file and POT file renamed.
- Dev – Admin settings restyled and descriptions updated.
- Dev – “Reset section settings” options added.
- Dev – Raw input now allowed in all “Info” section templates.
2.4.0 – 30/07/2018
- Dev – “Merge All Fees” added to “General” section.
- Dev – “Global Extra Fee” added to “General” section.
- Dev – Current (i.e. chosen) payment gateway function rewritten (fixes the issue with “zipMoney” payment gateway).
- Dev – “Customer Countries” options added to both fees separately.
- Dev – “Europe”, “European Union”, “Europe excluding EU”, “Eurozone”, “Africa”, “Asia”, “Australia and Oceania”, “Central America”, “North America” and “South America” added as country selection.
- Dev – Eight more countries added to the list.
- Dev – “Info” admin settings section added (options moved from “General” section).
- Dev – Admin settings restyled.
- Dev – Plugin link updated from https://wpcodefactory.com to https://wpfactory.com.
- Dev – Code clean up.
2.3.3 – 07/01/2018
- Dev – Additional check added in
Alg_WC_Checkout_Fees_Settings_Gateways(prevents AJAX error on some servers).
2.3.2 – 02/01/2018
- Dev – WooCommerce 3.2 compatibility –
WC_Tax::get_tax_total()replaced withget_cart_contents_taxes()andget_shipping_taxes(). - Dev – Additional check for
WC()->payment_gatewaysto be set, added inadd_gateways_fees(). - Dev – Additional checks for tax class to exist added (in Core and Info).
- Dev – Additional checks if product’s price is zero added (in Info).
- Dev – Per products settings JS file updated.
- Dev – “WC tested up to” added to the plugin header.
2.3.1 – 26/08/2017
- Dev – Info –
%product_price_diff_percent%replaceable value added. - Dev – Wrapping div (class
alg_checkout_fees) added to meta box settings. - Dev – “General” settings restyled.
2.3.0 – 16/08/2017
- Dev – “Aelia Currency Switcher for WooCommerce” plugin currency conversion filter added to:
get_max_ranges(),min_cart_amount,max_cart_amount,min_fee,max_fee,min_fee_2,max_fee_2. - Dev – “Coupons Rule” options added.
- Dev – Code refactoring.
- Dev – Settings restyled.
2.2.2 – 27/07/2017
- Fix – Removed additional check if
add_gateways_fees()has already been executed (was added in v2.2.1). - Dev – “Delete All Plugin Data” option added.
- Dev – Code cleanup etc.
2.2.1 – 22/07/2017
- Fix – Per Product –
custom_attsfor fields (step etc.) fixed. - Fix – Additional check if
add_gateways_fees()has already been executed added (this prevents fees duplicating on some servers).
2.2.0 – 27/06/2017
- Dev – WooCommerce 3.x.x compatibility – Deprecated
get_price_excluding_tax(),get_price_including_tax(),get_display_price()notices fixed. - Dev – WooCommerce 3.x.x compatibility – Deprecated
get_formatted_variation_attributes()notice fixed. - Dev – WooCommerce 3.x.x compatibility – Deprecated
get_country()notice fixed. - Dev – “Add Taxes” option added for both global and per product fees.
- Dev –
load_plugin_textdomain()moved frominithook to constructor. - Dev – Plugin header updated (“Text Domain” and “Domain Path” added).
- Dev – Plugin link updated from http://coder.fm to https://wpcodefactory.com.
2.1.1 – 04/10/2016
- Fix – Bug when local and global fees have same title, fixed.
- Fix – Categories restrictions wrongly applied to per product fees, fixed.
- Dev – “Max Range Options” options section added to “General” settings.
- Dev – “Override Global Fee” (main and additional) option added to per product settings.
- Dev – “Minimum Fee Value”, “Maximum Fee Value”, “Minimum Additional Fee Value” and “Maximum Additional Fee Value” options added to both local and global fees.
- Dev – “Minimum Cart Amount” and “Maximum Cart Amount” options title modified.
2.1.0 – 20/08/2016
- Fix – Tax bug fixed when “Categories to include – Calculation type” is equal to “Only for selected products”.
- Fix – Tax bug fixed in info.
- Fix – “Categories to include – Calculation type” with value “Only for selected products” fixed when displaying info.
- Dev – “Categories to exclude – Calculation type.” option added.
- Dev – “Categories to include (additional fee).” and “Categories to exclude (additional fee).” options added.
- Dev – Version system added.
- Dev – Author changed.
- Dev – Plugin renamed.
2.0.2 – 06/08/2016
- Fix –
sanitize_title()added toadd_gateway_fees_settings_hook()and removed fromoutput_sections(). - Dev – Multisite support added.
- Dev – “Variable Products Info” option added.
- Dev – “Categories to include – Calculation type” option added to global fees.
- Dev – Language (POT) file added.
- Dev – Author changed.
2.0.1 – 10/03/2016
- Fix – Additional checks in
add_gateway_fees_settings_hook().
2.0.0 – 01/03/2016
- Fix – Checked tab in admin per product fees is marked now.
- Fix – Info on Single Product bugs fixed: for variable products; for percent fees.
- Fix – “General” section in admin settings menu is marked bold by default.
- Dev –
%product_title%,%product_variation_atts%added. - Dev – Info on Single Product –
[alg_show_checkout_fees_full_info]and[alg_show_checkout_fees_lowest_price_info]shortcodes added. - Dev – Info on Single Product – Lowest Price Info on Single Product Page added.
- Dev – Info on Single Product –
%gateway_fee_title%and%gateway_fee_value%removed from info. - Dev – “Add Product Title to Fee/Discount Title” option added to “General > Fees/Discounts per Product” settings.
- Dev – “Hide Gateways Fees and Discounts on Cart Page” option added to “General” settings.
- Dev – “Exclude Shipping” option added for both global and per product fees.
- Dev – “Title” option added for optional “Additional fee” (per product and global).
- Dev – “Customer Countries” (include / exclude) options added to global fees.
- Dev – “Product Categories” (include / exclude) options added to global fees.
- Dev – Compatibility with “Aelia Currency Switcher for WooCommerce” plugin added (for fixed fees; for percent fees compatibility was already there).
- Dev – “Fee Calculation (for Fixed Fees)” options (once / by product quantity) added to per product fees.
- Dev – “Fee Calculation (for Percent Fees)” options (for all cart / by product) added to per product fees.
1.3.0 – 27/10/2015
- Dev – Second optional fee added.
1.2.0 – 30/09/2015
- Dev – Checkout fees/discounts info on single product frontend page added.
1.1.0 – 04/09/2015
- Dev – Checkout fees/discounts on per product basis added.
1.0.0 – 29/08/2015
- Initial Release.


