The deal is one of the world’s largest shirt-sponsorship deals in world sport and will put the Rakuten logo on Barcelona players’ shirts.
Rakuten, already a household name in Japan, is looking to gain brand awareness in Europe by allying itself with a huge global sport brand.
Barcelona, the Spanish league champions, boasts some of the world’s most famous and celebrated players, including Lionel Messi, Neymar and Luis Suarez.
Manchester United boasts the biggest shirt sponsorship deal out of the English Premier League football team, after agreeing a seven-year contract with US carmaker Chevrolet worth £53m annually.
Hiroshi Mikitani, chairman and chief executive of Rakuten, said: "This partnership opportunity is set to power our global brand strategy and, more importantly, as the global innovation and entertainment partner, we are looking to bring the collective power of our brands like Viber, Wuaki, Ebates, Kobo, PriceMinister to build a cool innovation framework that will deliver innovative solutions and services to fans, members and players."