Spanish outlet El Mundo reports the Brazilian forward pleaded guilty to a tax offense amounting to €1.1m.
He is accused of defrauding the state of more than £900,000 by not declaring payments of more than €5.15m (£4.63m) after his move to Chelsea in 2014.
The tax agency denounced Costa for defrauding the authorities regarding €1m (£890,000) in image rights.
The Spanish treasury added another fiscal crime to Costa before withdrawing and halving the fine.
However, they did give the striker an advance on his wages, meaning he could pay the fine in full. The fee is said to be around €500,000 (£450,000).
The 31-year-old was spotted arriving in court today for a short period of time, donning a protective face mask.
An Atletico spokesman said on Wednesday: “Diego Costa reached an agreement a few months ago with the prosecutor and has already paid the corresponding fine plus interest and the request for a prison sentence was withdrawn.
“This week it is expected that agreement will be ratified in court, as is mandatory.”
Get the latest transfer news straight into your inbox!
Sign up for the brilliant new Daily Star Sport email newsletter!
From the latest transfer news to the agenda-setting stories, get it all in your email inbox.
Put your email in the box at the top of this article or you can follow instructions on this link here.
Costa’s Chelsea stint ended in tears after a public fallout with Antonio Conte.
Reflecting on his time working with Conte at Stamford Bridge, Costa told ESPN: “[Conte and I] had problems off the pitch, but I think he is a really good manager.
“I have no hard feelings towards Conte, but to be a top, top manager, he needs to change the human side of his management. He is very suspicious. At a team like, say, Real Madrid, he would never last a season.”