Who pays for recounts in presidential elections?

The rules around paying for recounts are not the same across the board. Who puts up the money for a recount typically depends upon whether the recount is automatic or requested.