FoxSports.com first reported terms of the deal.
The Marlins have made locking up Stanton a priority this offseason, with president of baseball operations Mike Hill saying earlier this week that the team had begun discussions with agent Joel Wolfe regarding an agreement with the All-Star right fielder.
Stanton, who has 154 career homers at age 25, doesn't become a free agent until after the 2016 season.
Stanton's 2014 season ended Sept. 11 when he was hit in the face by a pitch. Despite missing the final 17 games, he led the NL with 37 homers and a .555 slugging percentage for the Marlins, who went 77-85 but ended a three-year streak of last-place finishes in the NL East.
Stanton finished second in NL MVP voting on Thursday.
The last time the historically thrifty Marlins spent big was before a poor 2012 season, the first in their new ballpark. Their 2014 payroll of $52.3 million was the lowest in the majors. That figure is expected to rise next year, but Hill declined to offer specifics earlier this week.
Information from ESPN's Enrique Rojas and The Associated Press was used in this report.