Transaction Payer Fee Calculation Examples

1. Use Transaction Fee Endpoint To Calculate Payer Fee

This is the most common use case. Used by Agencies who want to pass the Epay fee on to the payer. Our default behavior assumes the fee is included in the Amount. In this case, the Transaction fees endpoint is first used to pre-calculate fees.

Amount Due $100
Credit Card Payer Fee @ 3.25% (returned from TransactionFees Endpoint) $3.25
Amount (In Transaction Post) $103.25
Payer Fee (In Transaction Post) $3.25
Amount Charged to Payer $103.25
Net Funded Amount $100
Fee Paid to EpayPolicy @ 3.25% $3.25
curl -X POST --header "Content-Type: application/json" --header "Accept: application/json" --header "Authorization: Basic [Your Auth]" -d "{
  \"payer\": \"string\",
  \"amount\": 103.25,
  \"payerFee\": 3.25,
  \"emailAddress\": \"John@example.com\",
  \"creditCardInformation\": {
    \"accountHolder\": \"John Tester\",
    \"cardNumber\": \"4242424242424242\",
    \"cvc\": \"123\",
    \"month\": \"01\",
    \"year\": 2022,
    \"postalCode\": \"78632\"
  }
}" "https://api.epay3.com/api/v1/transactions"

If the account used for fee calculations is configured to have different rates for payer fee and base fee, the request will have fees calculated as a custom fee. (Section 2, below)


2. Use Custom Fee

This is the second most common use case. It allows users to set a custom payer fee different from the Epay fees. Either subsidizing some of the cost or adding an additional fee.

It should be noted that if the desired payer fee is 0, one of these extra criteria must be met, in order to avoid the fee being implied, as in use case #3.

  • Use the Transaction/Authorization endpoint to authorize the amount, passing the authorization id with the transaction
  • Use an impersonation key
  • Charge an Initiation fee

If an impersonation key is provided by the caller, the PayerFee and Fee used for the calculations will be that of the impersonated account. Please be aware that if the account used for fee calculations has a different rate for the payer fee than the regular fee, ePayPolicy’s portion of the transaction will instead be based on the total:

Amount Due $100
Amount (In Transaction Post) $100
Amount Charged to Payer $100
Net Funded Amount $96.75
Fee Paid to EpayPolicy @ 3.25% $3.25
curl -X POST --header "Content-Type: application/json" --header "Accept: application/json" --header "impersonationAccountKey: [your key]" --header "Authorization: Basic [Your Auth]" -d "{
  \"payer\": \"string\",
  \"amount\": 100,
  \"emailAddress\": \"John@example.com\",
  \"creditCardInformation\": {
    \"accountHolder\": \"John Tester\",
    \"cardNumber\": \"4242424242424242\",
    \"cvc\": \"123\",
    \"month\": \"01\",
    \"year\": 2022,
    \"postalCode\": \"78632\"
  }
}" "https://api.epay3.com/api/v1/transactions"

In this example, the agency wishes to charge a fee higher than that being charged by Epay.

Amount Due $100
Payer Fee $10
Amount (In Transaction Post) $110
Payer Fee (In Transaction Post) $10
Amount Charged to Payer $110
Net Funded Amount $106.42
Fee Paid to EpayPolicy @ 3.25% $3.58
curl -X POST --header "Content-Type: application/json" --header "Accept: application/json" --header "Authorization: Basic [Your Auth]" -d "{
  \"payer\": \"string\",
  \"amount\": 110,
  \"payerFee\": 10,
  \"emailAddress\": \"John@example.com\",
  \"creditCardInformation\": {
    \"accountHolder\": \"John Tester\",
    \"cardNumber\": \"4242424242424242\",
    \"cvc\": \"123\",
    \"month\": \"01\",
    \"year\": 2022,
    \"postalCode\": \"78632\"
  }
}" "https://api.epay3.com/api/v1/transactions"

3. Calculate no fees (Deprecated)

This is the least common use case. No fee is passed in so one is implicitly calculated by us. This increases the transaction amount by the calculated payer fee after we receive it. It does not support the use of the transaction/authorization endpoint, impersonation, or Initiation fee. The use of any of those features will result in the agency subsidizing the payer fee as in the first example in the custom fee section (#2).

Amount Due $100
Amount (In Transaction Post) $100
Amount Charged to Payer $103.25
Net Funded Amount $100
Fee Paid to EpayPolicy @ 3.25% $3.25
curl -X POST --header "Content-Type: application/json" --header "Accept: application/json" --header "Authorization: Basic [Your Auth]" -d "{
  \"payer\": \"string\",
  \"amount\": 100,
  \"emailAddress\": \"John@example.com\",
  \"creditCardInformation\": {
    \"accountHolder\": \"John Tester\",
    \"cardNumber\": \"4242424242424242\",
    \"cvc\": \"123\",
    \"month\": \"01\",
    \"year\": 2022,
    \"postalCode\": \"78632\"
  }
}" "https://api.epay3.com/api/v1/transactions"