Barcelona paid Sao Paulo $1 million for first refusal rights to striker Gustavo Maia.
Barcelona will pay the Brazilian club an extra $4.2 million to sign the 19-year-old striker.
Maia was discovered on a South American scouting trip last summer.
The club have also recently signed young attackers in Pedri and Francisco Trincao.