To pass the Stripe processing fee to customers in WooCommerce, you will need to add a surcharge to the customer’s total at checkout. We will show you how to calculate the surcharge and add it to the order total using either a plugin or custom code, starting with the WooCommerce pass stripe fee to customer process.
Work Out the Surcharge Before You Touch Any Settings
Passing the fee means adding a surcharge to the customer’s total at checkout so the merchant keeps the full order amount. Stripe’s standard US card rate is 2.9% plus $0.30 per transaction, but rates differ by country and product, so check your own Stripe dashboard. The surcharge is calculated using the formula: surcharge = (order amount x 0.029 + 0.30) / 0.971, because Stripe also charges its fee on the surcharge itself. ACH is cited at 0.8% per transaction capped at $5.00, so a card-only surcharge should not apply to bank debits.
Option One: Use a Fee Plugin for Stripe Surcharges
For stores that want no code, plugins like Checkout Fees for WooCommerce, WooCommerce Booster, and Stripe Surcharge for WooCommerce can add a fee based on the selected payment method. Settings for these plugins can be found in WooCommerce > Settings > Checkout Fees, WooCommerce > Settings > Gateways Fees and Discounts, and WooCommerce > Settings > Stripe Surcharge, respectively. Be sure to check plugin compatibility with your WooCommerce and Stripe plugin versions before installing, and note that Easy Digital Downloads and WP Simple Pay are not WooCommerce tools and do not apply here.


Option Two: Add the Fee in Code with add_fee()
Using the woocommerce_cart_calculate_fees action and WC_Cart::add_fee(), developers can add a custom fee to the order total. The steps include hooking the action, reading the chosen payment method from WC()->session, calculating the fee with (subtotal x 0.029 + 0.30) / 0.971, and calling add_fee() with a clear label such as Card processing fee. This code must be tested on a staging site with the current WooCommerce version, and you can test with a real card in test mode to compare the Stripe fee to the surcharge.

Handle Tax, Refunds and Cent Rounding
A surcharge can leave you with wrong tax, a fee you forgot to refund, or totals that are a cent off. Check each of these before you go live.
Tax. Whether the surcharge is taxable depends on your jurisdiction, so confirm with an accountant. If you use custom code, the third argument of WC_Cart::add_fee() sets whether the fee is taxable, and the fourth sets the tax class. Review your rates under WooCommerce > Settings > Tax.
Refunds. To return the fee:
- Go to WooCommerce > Orders and open the order.
- Click Refund.
- Enter the amount on the fee line, as well as the product lines.
- Click the refund button.
Rounding. Say you want to cover 2.9% + $0.30 on a $100.00 cart. Divide the cart plus $0.30 by 0.971, then subtract the cart: ($100.30 ÷ 0.971) − $100 = $3.2955, which rounds to $3.30. Use round( $fee, 2 ) and test a few carts on staging, including discounts and shipping.
Check Card Network Rules, Local Laws and Stripe Connect Setups
Card networks and some states or countries limit or ban surcharges, so confirm yours is allowed before it goes live. We can’t list current limits here, and they change, so check each source directly.
- Read Stripe’s terms and the card network rules linked from your Stripe Dashboard. Check whether surcharges are allowed on debit and prepaid cards, since networks often treat them differently from credit cards.
- Check consumer law for the regions you sell to. Some limit a surcharge to your actual cost of accepting the card.
- Label the fee clearly, for example “Card processing fee (3%)”. Use the same name in your plugin or your
add_fee()call. - Test a full checkout and a refund on staging before launch.
For Stripe Connect marketplaces, first decide who pays. With direct charges, Stripe’s fee is taken from the connected vendor’s account. With destination charges, it comes out of the platform’s balance.
For example, if the fee is about 3% and you split it evenly, add a 1.5% surcharge to the buyer’s cart and let the vendor absorb the rest through their commission. Whichever split you pick, set it in your plugin’s settings or your fee code, and tell vendors in writing.
Test the Checkout and Label the Fee Clearly
Test the checkout in Stripe test mode, switching between card and other gateways to confirm the fee appears only for card payments. Check the order total, the fee line on the order, and the Stripe balance transaction to match the numbers. Label the fee plainly at checkout, for example Card processing fee, and mention the fee in the order notes or terms. If you have checkout problems after changes, contact us for a quote or visit our website for a free website check.
If you’ve followed these steps and still have issues, review your settings and code, and consider getting help from our team to resolve any remaining problems.
Frequently asked questions
Is it legal to add a credit card surcharge in WooCommerce?
The legality of adding a credit card surcharge in WooCommerce depends on your location and the card network rules. Check your local consumer law and card network rules before turning on a surcharge.
How do I add a Stripe surcharge only for card payments?
You can add a Stripe surcharge only for card payments using a plugin like Stripe Surcharge for WooCommerce or by using custom code with the woocommerce_cart_calculate_fees action.
Do I have to charge tax on a payment processing fee?
Whether you have to charge tax on a payment processing fee depends on your local tax rules. Confirm with an accountant or tax adviser to determine the tax treatment of the surcharge in your area.
How do I refund a surcharge in WooCommerce?
To refund a surcharge in WooCommerce, you will need to refund the fee manually, as WooCommerce refunds may not automatically return the fee line. Handle partial refunds accordingly to ensure the correct amount is returned to the customer.



