I had a discussion many years ago at the Paris air show with a former university mate working for Airbus sales. I did not get details, but he mentioned that the contract could be over a hundred pages long. Boeing and Airbus have a boiler plate contract, but airlines negotiate many terms and details. EK is famous for adding all kinds of constraints on the manufacturer and opt out clauses if not satisfied.. Scenarios of delivery by the manufacturer and postponement by the airline are outlined with corresponding penalties. These contracts and financial deals are so secret that very few people must be in the know.
As an Australian aside (you quote Qantas), would be fun to see what will happen on Virgin Australia order of 48 737Max. Will Boeing have to refund deposit and pay penalty because they cancel the MAX series, or will bankrupt Virgin Australia increase its liability by cancelling the orders?.