Janet is right. You pay at a counter inside the airport before exiting the airport. Don't make the mistake we did; we hiked all the way out to the dock and discovered we couldn't pay there (nor pay the driver directly). You can only pay inside the terminal and as Janet said, you will be given a voucher which you then present at the dock. The dock is a bit of a hike from the airport terminal and once at the dock, there was a bit of a wait (in August) but not too bad.
We also used a private water taxi to get from our hotel to Piazzale Roma which was a nice convenience and in that situation we did pay the driver directly but coming from the airport you must pay inside the terminal at a counter and I seem to remember being able to pay with a credit card and then I tipped the driver with cash.