In this paper we have studied from first-principles the effect of magnetism on the hydrogen-metal interaction and the binding properties of palladium with 3d-alloying atoms in the presence of vacancies induced during hydrogenation process. Our first-principles calculations were carried out by means of state of the art ab-initio method based on density functional theory and all-electron PAW-potentials. We have analyzed the changes of the atomic and electronic structures of palladium crystal induced by the presence of substitutional 3d-alloying atoms, interstitial hydrogen and structural defect (palladium vacancy). The obtained results have shown that magnetism can strongly affect the hydrogen-metal interaction in palladium based alloys. We have also demonstrated that the presence of vacancies in the palladium matrix can alter the interaction energy between hydrogen and alloying transition metal atoms.