On Friday, the United States Anti-Doping Agency (USADA) said both fighters must be available at all times for random urine and blood tests and provide an itinerary of their travels.
"It's a strong statement of the importance of clean and safe competition to have these two fighters voluntarily agree to have a WADA level anti-doping program implemented for this fight," said USADA chief executive Travis Tygart.
"We commend them for their stand for clean sport and the message it sends to all those who want to compete clean at the highest levels of all sport."
Tygart confirmed that the fighters have agreed to the random testing.
In 2010 when the two fighters and their people first tried to negotiate to face each other, Mayweather accused Pacquiao of using performance-enhancing drugs which Pacquiao denied. The Filipino boxer then sued Mayweather and the two settled out of court.