Thanks for your question.
A declaration of trust is the most appropriate arrangement for your circumstances. This can be a deed executed by both the purchasers and the contributers stating the circumstances (purchase, contribution, mortgage) and advising that following discharge of the mortgage either1) Parents to be paid a fixed sum first OR 2) purchasers/contributors to be paid fixed percentages.
This can be registered against he legal notice (if parents so wish) as a notice so that if the property comes to be sold then they will receive notice of the sale, although in practice they would hear about it a lot earlier as part of the pre-contract procedures.
Usually, they are independent of the mortgage, as it is subject to the mortgage. If you do not tell the mortgage company that the parents are contributing then you will be in breach of the mortgage conditions. You will also have to tell them about the declaration of trust, but they will most likely be fine with it (as opposed to with a charge).
Promissory notices are more like traditional loans in that they usually have a set date for repayment like a repayment loan and it would be a bit incongruous, in my opinion, to use one here.
If this is useful please kindly click accept so that I may be rewarded for my time. It will be gratefully received and you will be free to ask follow up questions.