If the trip is solely for political purposes the party is supposed to pay. However, in reality all the president has to do is call the trip official and it is payed for by the taxpayers.
When the trip is only political they only have to pay the cost of comparable first-class fare for each political traveler for each leg of the trip. In effect the taxpayers are paying for the trip.