The transfer reaction between two nuclei in the superfluid phase is studied with the Time-dependent Hartree-Fock-Bogoliubov (TDHFB) theory. In order to restore the symmetry of the relative gauge angle a set of independent TDHFB evolutions is done. Then the transfer probability is computed using a triple projection method. This method is first tested to determine the transfer probabilities on a toy model and compared to the exact solution. It is then applied to the reactions $^{20}$O+$^{20}$O and $^{14}$O+$^{20}$O in a realistic framework with a Gogny interaction.