From Monday, all processors intending to buy milk in the next financial year will have to put their agreements online.
The deals will have to specify quality and quantity requirements and in most cases the supply period of the contract.
Price reductions will be banned except for extraordinary circumstances like a trade shock or unexpected tariffs in export markets.
The agreements will also establish the services processors have to deliver and their cost.
A dispute resolution procedure must also be agreed on, including an internal complaints mechanism and mediation.
The mandatory code of conduct is designed to help farmers receive fairer milk prices.
Major processors that break the code face $63,000 fines for every breach, while small businesses can cop fines of $21,000.