Assuming you don't plan on doing additional work through company A, suing is an obvious option. If you can prove the terms of your agreement, even if through emails, you should be able to enforce your agreement. If company A goes bankrupt or becomes insolvent, it will be difficult to get any money - you'll have to stand in line with the other unsecured creditors they aren't paying. You're a corporation, so to file a lawsuit you would normally have to hire a lawyer.