The company A could pay you the money even you are out of status since the money is for your job a few months ago. During that period, you worked in company A legally. Just they pay you a little late.