Context. The H + 3 molecule has been detected in many lines of sight within the central molecular zone (CMZ) with exceptionally large column densities and unusual excitation properties compared to diffuse local clouds. The detection of the (3, 3) metastable level has been suggested to be the signature of warm and diffuse gas in the CMZ. Aims. We aim to determine the physical conditions and processes in the CMZ that explain the ubiquitous properties of H + 3 in this medium and to constrain the value of the cosmic-ray ionization rate. Methods. We use the Meudon photodissociation region (PDR) code in which H + 3 excitation has been implemented. We re-examine the relationship between the column density of H + 3 and the cosmic-ray ionization rate, ζ, up to large values of ζ in the frame of this full chemical model. We study the impact of the various mechanisms that can excite H + 3 in its metastable state. We produce grids of PDR models exploring different parameters (ζ, size of clouds, metallicity) and infer the physical conditions that best match the observations toward ten lines of sight in the CMZ. For one of them, Herschel observations of HF, OH + , H 2 O + , and H 3 O + can be used as additional constraints. We check that the results found for H + 3 also account for the observations of these molecules. Results. We find that the linear relationship between N(H + 3 ) and ζ only holds up to a certain value of the cosmic-ray ionization rate, which depends on the proton density. A value ζ ∼ 1−11 × 10 −14 s −1 explains both the large observed H + 3 column density and its excitation in the metastable level (3, 3). This ζ value agrees with that derived from synchrotron emission and Fe Kα line. It also reproduces N(OH + ), N(H 2 O + ) and N(H 3 O + ) detected toward Sgr B2(N). We confirm that the CMZ probed by H + 3 is diffuse, n H 100 cm −3 and warm, T ∼ 212−505 K. This warm medium is due to cosmic-ray heating. We also find that the diffuse component probed by H + 3 must fill a large fraction of the CMZ. Finally, we suggest the warm gas in the CMZ enables efficient H 2 formation via chemisorption sites as in PDRs. This contributes to enhance the abundance of H + 3 in this high cosmic-ray flux environment.