The 25-year-old is scheduled to fly over to Spain on Wednesday to undergo his medical after both clubs agreed an initial fee of €58m (£49.2m) which could rise to €68m (£57.7m) with add-ons.
Raphinha is expected to sign a five-year contract with the Catalan giants until June 2027, and Xavi is hoping for the deal to be completed quickly so that he can add the Brazilian to his squad for the club's pre-season tour of the USA.
Jesse Marsch has recently revealed that Leeds are in talks with Barca over Raphinha's move to Catalonia, but the West Yorkshire club have now confirmed that an agreement has been reached between both parties.
A statement from Leeds' official website read: "We can confirm that an agreement in principle has been reached with FC Barcelona for the transfer of Raphinha. The player will now undergo a medical in Spain."
Meanwhile, Barcelona have also released a statement on their official website, adding: "FC Barcelona and Leeds United Football Club have reached an agreement in principle for the transfer of Raphael Dias Belloli, Raphinha, pending the player passing his medical.
Barcelona is believed to be Raphinha's dream destination and he has been holding out for a move to Camp Nou despite Chelsea having had a £55m bid accepted for the attacker at the end of last month.
Raphinha will leave Leeds after two years at Elland Road where he became an invaluable first-team asset, recording 17 goals and 12 assists in 67 appearances across all tournaments, including 11 Premier League goals last season.