Under the terms of the deal Costa will plead guilty to tax evasion and pay €1.1m in back taxes and be sentenced to six months in jail. To avoid time behind bars he will pay a fine of €600,000. The agreement will be made official in October.
Costa left Chelsea to return to Spain Atletico Madrid last year.
Footballers and the football industry have increasingly fallen foul of tax authorities in recent years, with Rangers going bust, Cristiano Ronaldo and Lionel Messi among others found guilty of tax evasion, Glenn Murray being arrested in relation to tax fraud, and Wayne Rooney being fined over a tax avoidance scheme.