Earlier on Thursday, it was reported that the two clubs had reached an agreement over the transfer of the Mexican international, who allegedly has a £13m release clause in his contract.
The Hammers have stopped short in revealing the fee, but they are now in a position to say that a deal should be completed in the coming days.
A statement read: "West Ham United and Bayer Leverkusen have agreed terms for the transfer of Javier Hernandez to London Stadium.
"The former Manchester United and Real Madrid striker will fly to London in the coming days to finalise personal terms and undergo a medical with the Hammers."
Hernandez has spent the last two seasons with the Bundesliga side, where he has scored 39 goals in 76 appearances in all competitions.
Earlier in his career, Hernandez netted a total of 59 strikes in 157 matches for Manchester United.