By using a Hamiltonian based on the coupling through flux lines, we have calculated the interaction energy between two fermions via massless bosons as well as via massive particles. In the case of interaction via massless bosons we obtain an equivalent expression for the Coulombs energy on the form, where is the fine structure constant. In the case of the interaction via massive particles we obtain that the interaction energy contains a term building the potential well. Taking into account the spin-spin interaction of the nucleons, we show that this interaction modulates the interaction potential through a cosine factor. The obtained results are in good agreement with experimental data, for example, of deuteron.