We (subcontractor) obtain a signed, written contract with the General Contractor stating that we must be paid within 30 days of completion of our work on a job site, regardless of whether or not the General Contractor is paid by the owner. I think AZ law requires payment within x amount of days only after General Contractor has been paid by owner. Are the terms of the written contract legal, or does AZ law rule supreme?
Arizona law does not state that payments are due only after the GC has been paid. For a GC to provide for contingent payment, those provisions must meet various requirements to be enforceable.
In short, your contract controls and if you did not have contingent payment provisions then they must pay in the time provided in the contract or they could be in breach.