Using the quasi-Maxwell formalism, we derive the necessary and sufficient conditions for the matching of two stationary spacetimes along a stationary timelike hypersurface, expressed in terms of the gravitational and gravitomagnetic fields and the 2-dimensional matching surface on the space manifold. We prove existence and uniqueness results to the matching problem for stationary perfect fluid spacetimes with spherical, planar, hyperbolic and cylindrical symmetry. Finally, we find an explicit interior for the cylindrical analogue of the NUT spacetime.