Charge app fees

Before reading this tutorial...

Platforms and marketplaces can make money by adding their own fees to the payments they facilitate through WePay.

Adding the app fee parameter

The /checkout/create call includes an optional app_fee parameter, which is the dollar amount you'd like to charge for facilitating a payment. Your app fees go directly to your application's WePay account.

App fee as percentage

As mentioned above, the app_fee is a dollar amount. However, in many cases your app might want to take a percentage of the total amount. WePay charges 2.9% + 30¢ for credit card payments and 1% + 30¢ for bank payments. The WePay fee is charged on the gross amount that end payer pays. WePay always rounds to the lower amount.

Payee pays the fees

Example: Your app wants to take 20% of the total amount charged to the customer. Part of this 20% is used to pay WePay fees, the rest is taken by your app. For percentage 'P' expressed as ratio (example 20% => P = 0.20) general formula would be as follows:

WePay fee for credit card or bank payments -

wepay_fee = 0.029 * amount + 0.30 //Round Lower

or

wepay_fee = 0.01 * amount + 0.30 //Round Lower

App fee calculation -

app_fee = P * amount - wepay_fee

Using above formula for 20% split and $100 amount credit card payment, we get the following:

Payer will pay $100

Payee (account holder) will get $80

Your app will get app_fee = $16.80

WePay will get wepay_fee = $3.20

Payer pays the fees

Example: Your app wants to add 20% fees to the total amount charged to the customer. Part of this 20% is used to pay WePay fees, the rest is taken by your app. In this case, the payer will pay gross = amount + app_fee. The WePay fee will be charged on the gross. For percentage 'P' expressed as ratio (example 20% => P = 0.20) general formula would be as follows:

WePay fee for credit card or bank payments -

App fee calculation -

1.029 * app_fee = (P - 0.029) * amount - 0.30 //Round Higher

or

1.01 * app_fee = (P - 0.01) * amount - 0.30 //Round Higher

wepay_fee = 0.029 * (amount + app_fee) + 0.30 //Round Lower

or

wepay_fee = 0.01 * (amount + app_fee) + 0.30 //Round Lower

Using above formula for 20% split and $100 amount credit card payment, we get the following: