Rakeback starts to accumulate when you play raked hands and pay rake.
Poker rooms have different ways of taking bonuses into account. Some rooms do not make any bonus deductions, and some do.
For example
PokerNordica rakeback is based on
Gross Rake, meaning that rakeback is paid from the gross rake you pay and any bonuses are on top of rakeback.
Full Tilt rakeback is based on your
Net Rake, which means that any bonuses that are credited to your poker account are deducted from your rake before rakeback is calculated. For example if you pay $150 rake and get a $50 bonus, your rakeback is 27% * ($150 - $50) = $27.