They can only make you do this if the agreement between you pursuant to which you earned the commission specifically stated that in the event of termination (under these circumstances), you would have to repay the commissions. The relationship between an independent contractor and the company employing him or her is governed by contract or agreement; if you had agreed prior to earning these commissions that you'd have to repay them under like circumstances, then that agreement would be enforceable.