What is the difference between invoice factoring and invoice discounting?

Basically, when we buy an invoice (factoring), we assume the credit risk, and when you draw money against the invoice (invoice discounting), you assume the credit risk yourself.