Change PayPal Adaptive Payments Fee Distribution

By default, fees are shared between the receivers of payments when using PayPal Adaptive Payments and Parallel Payments. You may want to change this behavior, however, and this can be done with a simple code snippet to modify the arguments sent to PayPal.

Here’s an example:

function custom_woocommerce_paypal_ap_payment_args( $args ) {
$args['feesPayer'] = 'SENDER';
return $args;
add_filter( 'woocommerce_paypal_ap_payment_args', 'custom_woocommerce_paypal_ap_payment_args' );

view raw


hosted with ❤ by GitHub

Simply replace ‘SENDER’ with the fee payout type you wish to use. The acceptable values are as follows(taken from PayPal API docs):

  • SENDER – Sender pays all fees (for personal, implicit simple/parallel payments; do not use for chained or unilateral payments)
  • PRIMARYRECEIVER – Primary receiver pays all fees (chained payments only)
  • EACHRECEIVER – Each receiver pays their own fee (default, personal and unilateral payments)
  • SECONDARYONLY – Secondary receivers pay all fees (use only for chained payments with one secondary receiver)

Either add this code to your theme’s functions.php file or create a plugin containing the code snippet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s