calculate the handling fee at the correct moment