Atlanta-based home improvement chain The Home Depot will pay $27.25 million to settle multidistrict litigation brought by financial institutions following a massive data breach in 2014 that impacted more than 56 million Home Depot customers.

In approving the settlement agreement on Friday, U.S. District Chief Judge Thomas Thrash Jr. also ordered Home Depot to pay an additional $15.3 million in legal fees and $710,000 in expenses to attorneys representing the plaintiff financial institutions.