Home Forums Pre-Sales Add flat fee to transaction

Add flat fee to transaction

Posted: May 6, 2016 at 1:52 pm


May 6, 2016 at 1:52 pm

I’ve been researching the ability to do this with EE, and found this function:

I just wanted to check that this would work if included in functions.php, therefore making it possible to add a ‘per transaction’ fee to a group of events that a customer registers for, instead of charging a ‘per event’ fee.

Also, If I purchase Events Espresso, do I need to renew the license each year to continue using the product, or renew it just for support?


  • Support Staff

May 9, 2016 at 1:51 am

Hi there,

Yes, that function will work from functions.php however it will only add a transaction fee (yes it adds a per transaction fee rather than per event 🙂 ) for the Invoice payment method. It will not work for ANY of the current ‘live’ payment methods such as PayPal, Stripe, etc.

We do not currently support add surcharges onto specific payment methods, is that what you are trying to do with the above or you just want to add a surcharge for Invoice?

Also, If I purchase Events Espresso, do I need to renew the license each year to continue using the product, or renew it just for support?

The license key provides support and updates for 1 year.

If you do not renew your license Event Espresso will continue to work with the version you have installed.


May 9, 2016 at 11:53 am

thanks for your reply. We need to add a registration fee to each transaction. Registrants pay individual instructors for their classes/events, so they won’t be making those payments on this website, but we need the ability to charge a flat registration fee for each transactions, no matter how many events/classes the customer signs up for. Unfortunately without this ability, I don’t think we’ll be able to use event espresso.


May 9, 2016 at 12:20 pm

Also, FYI, we would need to add that fee for every transaction, no matter what payment method the customer uses.


  • Support Staff

May 9, 2016 at 3:41 pm

If they aren’t paying on the website which payment methods will you have active?

The above will work if you are using the Invoice payment method to finalize the registration.

All registrations must be finalized, to do this the user must select a payment method, this can be one of the ‘offline’ payment methods such as Invoice which you could also rename name to show as ‘Cash on arrival’ or similar.

However note that the above function adds the surcharge after the registration has been finalized. The user will not see that surcharge until after the complete their registration and select ‘Invoice’, so you would need to note the surcharge on the page earlier.


May 9, 2016 at 4:10 pm

Customers will pay instructors individually throughout the year for classes, the studio owner incurs the registration fee, so we just need to give customers the ability to register for classes online without paying for them (they will pay their individual instructor later in the year) and pay the registration fee while registering online through the Event Espresso plugin.

We will not be using the invoice method, we will be using either the paypal or braintree add on for payments. In a support thread that recommended the github add to cart modifier, it was indicated that it would work for other payment methods by adding the methods into an array on line 14 of the function.

If there’s no way we could add on that fee it would be a bummer because the ‘multiple registration’ add-on combined with ‘table’ format add on are perfect for our application. I have a demo set up here that shows what we have in mind.

Is there a way perhaps to add another ticket/product that is the flat registration fee and somehow make that a required product that the customer puts in their cart before checkout?

gitub script at it was indic

No, we won’t be using the invoice method, we will be using either


May 9, 2016 at 4:21 pm

Sorry I didn’t delete the last two sentences of my last post – just disregard those – I forgot to edit them out.


  • Support Staff

May 9, 2016 at 8:30 pm

You’d follow this code example instead:


May 10, 2016 at 10:58 am

Thanks, that is very helpful. I’ve read in other posts that there are functions to do the following items – can you please confirm that all of these will be possible?
* customize the email notification templates?
* change the default ‘return to events list’ button that appears after ‘adding to cart’ to point to a custom page?
* displaying the number of tickets left or openings available?


  • Support Staff

May 10, 2016 at 12:02 pm

Yes those are possible, and the last point you asked about for displaying tickets left is controlled by a setting.

The support post ‘Add flat fee to transaction’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso