Advance payment gateway - collect flat fee depending on total cost?

Hi I was wondering if its possible to collect a flat fee if the cost is over a certain amount.

For example, if the total cost is over $100 then collect $5 of each transaction, else use percentage.