WePay's API let's you manage this through the app_fee
parameter on /checkout/create
.
In your case, you'd create a request with the following parameters:
amount
= 100
app_fee
= 10
fee_payer
= "payee_from_app"
WePay will charge the payer the full amount
($100), and then will take out the app_fee
amount specified and split the transaction between you and the campaign. The campaign owner will see $90 in their account.
Now the last piece to this is the payment processing fees. Most payment processors default their rate to 2.9% + $.30. Using the "payee_from_app" option means that the app (you in this case) will cover the processing fees and those will be taken from the $10 that you took from the campaign owner.
So 2.9% + $.30 of a $100 transaction is $3.20. WePay will take that from the $10 app fee that you charged, and you will be left with $6.80.
There are several different "fee_payer" options and you should read the documentation carefully to understand each one. The nice part about payee_from_app
is if you are able to negotiate lower rates from the payment processor, you get to keep more of each transaction and there are no code changes that you have to do on your side to see that benefit. For example, if your rate goes down to 2.8% + $.30, the merchant will still only receive $90, but you will see the benefit and receive $6.90.
To summarize. If the transaction is $100, and you want to take 10% ($10) of that transaction for your website, and let's assume your processing rate is 2.9% + $.30, then:
- Money to campaign: $90
- Money to WePay: $3.20
- Money to website owner: $6.80
- Total Amount: $100