Essentially you can STOP searching if the score before generating any moves is >= beta, but even if that is not the case you STILL have the option to STOP searching if you don't like any of the captures.
So the FIRST move you should try is the "stand pat" move, in other words NO move and treat this as if it were a searched subtree - a fully searched move that returned the stand pat score and can be accepted if it's "better" than the other real captures. Which also means that it can update alpha if appropriate.
My guess is that this is what you have been missing. You can stand pat if it gives you a beta cutoff, but you can also stand pat even if it doesn't (if that is better than trying other moves.)
Don
hgm wrote:Something seems wrong here:
[d]rnbqk2r/ppp1bpp1/3p1n1p/4p1B1/3PP3/2N2N2/PPP2PPP/R2QKB1R w KQkq - 0 6
Pd4xe5 Nf6xe4 Bg5xe7 Ne4xc3 Be7xd8 Nc3xd1 Bd8xc7 Pd6xe5 Bc7xb8 Nd1xf2 Bb8xa7
Upto d6xe5 everything makes sense, because both sides have been capturing equal value on each move. White took the lead each time, so that black had to recapture and could not afford to stand pat without incurring a loss. After the recapture it was neutral again, so that white had to try something to see if he could do better.
But after Bxb8 Nxf2 black did not equalize, and captured a Pawn after losing a Knight. So white is at +2 here by standing pat, which should be above beta, and thus cause an immediate cuttoff. So it should never get to searching Bxa7.
[d]rBb1k2r/pp3pp1/7p/4p3/8/5N2/PPP2nPP/R3KB1R w KQkq - 0 11
Kxf2 is another move that should have been searched before Bxa7, and should also have produced a beta cutoff, if the stand pat had not done that already.