Ties to be played on the 30th July and 6th August.
FC Astra are the more likely opponents after emerging with a 1-0 victory at Inverness in the first leg of their clash last night.
The Romanian side will be no push-overs, having defeated Lyon in last year's play-off round to reach the group stages, where they finished bottom despite holding Celtic to a goalless draw.
The Hammers eased past Andorra’s FC Lusitanos in the first round but found the going tougher last night against Birkirkara - needing a 90th minute James Collins goal to snatch victory against the Maltese minnows.
Slaven Bilic’s men will face Inverness or Astra - should they progress past the Maltese side next Thursday - and the prospect of competing in the Europa League group stages will start to become tantalisingly real.
It will have been a gruelling qualifying campaign, should West Ham make it all the way, with eight games in total before a Premier League ball has even been kicked, and it may harm the Hammers' form as the season wears on.
The pain will be deemed worth it, however, once European football, and the glory that comes with it, returns under the floodlights for the Boleyn Ground’s last year.