If you suspect a customer is headed towards bankruptcy, you may need to restructure your payment terms and take other steps to stop a trustee from clawing back recently received payments.
How to Get Paid and Keep Your Money When Your Client is Heading Towards Bankruptcy