Real president Florentino Perez is prepared to meet Kepa's €20m buyout clause, with personal terms having been settled last month.
The Spain international will arrive to compete with Keylor Navas for the remainder of the season.
Kepa's signing will also see Kiko Casilla leave in the coming weeks. Real would prefer to send Casilla away on-loan.
A return to Espanyol has been mooted for the keeper.