It is possible you can file a mechanic's lien on the property and get paid for your services. In most states, this process is a little complicated and very time sensitive. I recommend that you consult with a local construction law attorney who can help you with the nuances and the forms.
Actively practicing law in Texas. Inactive licenses in Arizona and Georgia. All answers are general in nature and no attorney/client relationship exists in this forum.
You have to be very careful with liens in this situation. Most likely, your contract and the sub's contract with the Prime prohibit the filing of liens. Additionally, you might have a privity of contract issue with the ultimate property owner since it never hired you. That being said, an attorney might be able to help you against the prime.
Mr. Andersen's answers are not intended to create an attorney-client relationship and are based on only the limited information provided in the question. Thus, his answers should not be considered as legal advice, and persons seeking legal advice should contact Mr. Andersen directly and/or another attorney with a law license in the state in which your situation arose. Mr. Andersen is licensed to practice law in Ohio.
More information is needed. However, you may have public project lien rights as well as contract rights. And, Ohio's Fairness in Contracting Act (prompt pay) may give you an opportunity to recover a high interest rate and attorney's fees. It all depends on the circumstances. And, time is ticking on the lien claim, if you have one. Please feel free to contact me for an initial review and consultation.
This response does not constitute legal advice and does not create an attorney-client relationship.