Firstly, if the company is already developing software for you or if money has already been paid then you are probably too late.
Penalty clauses are fairly common, but you will find that your success with introducing this one comes down to risk. In effect, what you are asking the company to do is accept all the risk of failing to deliver to requirements. The company will, rightly, want to protect themselves from this risk and will probably push back hard on inclusion of this clause.
The reason is that it is very difficult indeed to deliver 100% of requirements, usually because the requirements lack absolute clarity on every single point. So the company will ask you to specify with absolute clarity exactly what you want because, if they don't, they run the risk of you asserting after the fact that they did not deliver to your specification.
This means that not only will you get into a potentially damaging and costly analysis and specification cycle where every single detail and decision is considered, argued and documented up-front, the company will refuse to apply any kind of sensible initiative in the face of design problems that were not foreseen (and these are always present) - You will be asked to make an absolute decision on all design points, because if they don't ask you to do this they run the risk of not delivering "what you want"...
You will also get into a protracted discussion on definitions of Scope and Acceptance Criteria. For example as we all know, it is not possible to guarantee defect-free software, therefore it is possible and quite likely, that you will be expected to accept a level of defect in the system. This is quite normal. You will need to define exactly how much deviation from "perfect" you are willing to accept so that the company knows where they stand.
I believe that the only way you could achieve this would be to develop the specifications first then allow the company to estimate against the specifications. The only sensible arrangement for this is Fixed Price because otherwise you are agreeing to continue spending until the job is complete. However if you force them into Fixed Price they will assess the risk to their fee based on the clarity of the specification and you will likely face a heavily inflated cost to cover their uncertainty.
However, if you:
- can both agree on the specification
- never change your mind on any detail
- agree a cost for the entire job
- accept the cost of testing to the nth degree of detail to ensure compliance
... then they may agree to it. But I would never ever agree to this clause and I doubt they will!
To answer your original question, if you absolutely want to proceed then you will need to find yourself a contracts lawyer to put the contract together using the right words. If you try to do it yourself you run the risk of not protecting your interests properly and in any case the company will probably insist on a formal contract and their lawyers will pick it apart to ensure they are adequately protected from risk.