So, there's nothing criminal if you legitimately didn't realize that a company overpaid you — though you still need to give back money you didn't earn. If you knowingly keep money that you know should not have been sent to you, you are committing theft by deception.