Yes, you are obligated to repay the money. If you were to be paid a commission on net sales,  not gross, then that is all you are entitled to. An error in calcuating your commission and sending you too much does not entitle you to more money. It is like if you happened to overpay a contractor or mechanic for work they did--you would be entitled to get your money back and they would not have the right to keep the overpayment. Similarly, you are not entitled to keep the commission overpayment. You are only entitled to what you agreed to work for and what they agreed to pay you.