The paper deals with the problem of the determination of the in-plane behavior of periodic masonry material. The masonry is considered as a composite material obtained as a regular distribution of blocks connected by horizontal and vertical mortar joints. The macromechanical equivalent Cosserat medium is derived by a rational homogenization procedure based on the Transformation Field Analysis. The micromechanical analysis is developed considering a Cauchy model for the masonry components. In particular, linear elastic constitutive relationship is considered for the blocks, while nonlinear constitutive law is adopted for the mortar joints, accounting for the damage and friction phenomena occurring during the loading history. Numerical applications are performed in order to assess the performances of the proposed procedure in reproducing the mechanical behavior of the masonry material.