depends on many factors...how much you need cash flow? Can do without the extra income? consider a loan would be at least 5% so if you can do 5% discount then you're even. More than 5% and it's the same a taking a short term loan or a line of credit. Also you need to be careful not to blow the money if you suddenly feel like you have expendable cash.
We usually give our customers up to net 30 terms (orders of 50k+). Most are prepaid(smaller sales). The largest orders(150k +) have 50% up front and 50 percent at 30 days, we give them a 3% discount if they do 100% upfront.