The bonus is paid immediately, when the player is signed. If it's a contract extension that starts next season, then it is paid immediately upon rollover by the signing team. If the player is traded or claimed before the extension takes effect, I'm pretty sure the signing team is still on the hook for the bonus, while the new team is on the hook for the salary.