Disc fragmentation plays an important role in determining the number of primordial stars (Pop III stars), their masses, and hence the initial mass function. In this second paper of a series, we explore the effect of uniform FUV H$_2$-photodissociating and X-ray radiation backgrounds on the formation of Pop~III stars using a grid of high-resolution zoom-in simulations. We find that, in an X-ray background, protostellar discs have lower surface density and higher Toomre $Q$ parameter, so they are more stable. For this reason, X-ray irradiated discs undergo fewer fragmentations and typically produce either binary systems or low-multiplicity systems. In contrast, the cases with weak or no X-ray irradiation produce systems with a typical multiplicity of $6 pm 3$. In addition, the most massive protostar in each system is smaller by roughly a factor of two when the disc is irradiated by X-rays, due to lower accretion rate. With these two effects combined, the initial mass function of fragments becomes more top-heavy in a strong X-ray background and is well described by a power-law with slope $1.53$ and high-mass cutoff of $61$ M$_odot$. Without X-rays, we find a slope $0.49$ and cutoff mass of $229$ M$_odot$. Finally, protostars migrate outward after their formation due to the accretion of high-angular momentum gas from outside and the migration is more frequent and significant in absence of X-ray irradiation.