sandywp / plugins / woocommerce-pay-for-payment

Pay for Payment for WooCommerce

4.7 out of 5 stars. 4.7 71 reviews

Setup individual charges for each payment method in WooCommerce.

Launch a sandbox with this plugin → No signup.
Ready in seconds.

v2.2.2 10,000+ installs WP 4.6+

your-sandbox.sandywp.com/wp-admin
Pay for Payment for WooCommerce running inside a SandyWP sandbox

What you get inside

2 screens
  • User interface. You can find this in every payment gateway configuration.

  • How to set up of WPML in String translation module.

About this plugin

Add individual charges for each payment method as a flat rate and/or as a percentage of the cart total. The plugin first calculates the percentage rate and then adds the fixed rate on top.

Now compatible with React-based payment gateways! Configure payment fees for all gateways (including WooCommerce Stripe) using the new centralized settings tab at WooCommerce > Settings > Pay for payment.

You can use placeholders in the payment item title:

  • [FIXED_AMOUNT]: Will print money-formatted fixed amount you entered.
  • [PERCENT_AMOUNT]: will print out percental amount you entered
  • [CART_TOTAL]: will print out money-formatted cart totals.
  • [MINIMUM_AMOUNT]: will print out money-formatted minimum amount you entered when calculating percentage fee.
  • [MAXIMUM_AMOUNT]: will print out money-formatted maximum amount you entered when calculating percentage fee.
  • Example: Payment Fee ([FIXED_AMOUNT] + [PERCENT_AMOUNT]% of [CART_TOTAL])

Requires at least WooCommerce 2.6, compatible with WooCommerce 3.2+ (recommended). The support for WC 2.6 will be dropped soon.

Features

  • Fixed charge and/or a percentage of cart total
  • Possibility to disable for free/zero shipping
  • Plugin API. See GitHub for details.

Compatibility

Limitations

  • It seems that Mercadopago gateway is not handling WC_Fee correctly. Get in touch with Mercadopago support (and I’m happy to help them fix the issue)
  • Better not use it with PayPal. (Legal issue, see FAQ as well.)
  • Doesn’t work on “Pay for order” pages (manually created orders or canceled payments), because of WC limitations

Special Credits

Questions

Can I use it with PayPal?

No. PayPal does not permit charging your customer for using PayPal. This is a legal issue rather than a technical one.
See PayPal User Agreement, > “4.6 No Surcharges” for details.
You have been warned.

WPML – How to translate?

If you need to localize Fee title and Fixed charge go to go to WPML > String translation and look for following type of text domain: woocommerce-pay-for-payment and than you should find a strings with name “{payment-method-slug} – charges fixed” or “{payment-method-slug} – item title”. See the second screenshot.

Can’t to setup my payment requirements in the user interface. The option I need is missing.

The plugin user interface only offers either a fixed amout or a percentage of the carts subtotal.
If you need to implement more complex calcuations like ‘no charges for orders above 100 Bucks’ or ‘2% of cart subtotal but at least 2 Bucks’,
you’ll have to use one of the filters. See Plugin API for details.

woocommerce_pay4pay_apply specifies if a charge will be applied.

woocommerce_pay4pay_applyfor_{$payment_gateway_id} specifies if a charge will be applied on a certain payment method.

woocommerce_pay4pay_{$payment_gateway_id}_amount allows you to alter the amount of the charge being added.

I want to use the latest files. How can I do this?

Use the GitHub Repo rather than the WordPress Plugin. Do as follows:

  1. If you haven’t already done: Install git

  2. In the console cd into Your ‘wp-content/plugins´ directory

  3. type git clone https://github.com/vyskoczilova/woocommerce-payforpayment or better type git fork https://github.com/vyskoczilova/woocommerce-payforpayment

  4. If you want to update to the latest files (be careful, might be untested on Your WP-Version) type `git pull´.

I found a bug. Where should I post it?

I personally prefer GitHub, to keep things straight. The plugin code is here: GitHub
But you may use the WordPress Forum as well.

I found a bug and fixed it. How can I contribute?

Either post it on GitHub or—if you are working on a cloned repository—send me a pull request.

4.7

71 reviews

  • 5 ★ 63
  • 4 ★ 2
  • 3 ★ 2
  • 2 ★ 1
  • 1 ★ 3

Ratings come from WordPress.org. SandyWP does not collect its own reviews.

sandywp / also on the shelf

Try another plugin

Spin up a real WordPress site in seconds.

Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.