The initial invention was this very quick algorithm for risk assessment.
What they do really quick is a credit check, based on what they know. They may also use third party suppliers the first time (or more?) if they do not have enough data.
I am not actually sure if they "buy" the invoices, but they collect a fee for reminders and handling if the payment is late.