The heirs can cancel the deceased's contracts. Below, we provide you with a standard text for these kinds of cancellation letters. You have to send them by registered mail.
First, we advise you to always check what legal options you have for cancelling a contract and what the notice periods are.
We also advise you to always enclose a copy of the death certificate as evidence of the death. You may subsequently be asked for proof that you are acting as the deceased's heir (for which you can use the certificate or deed of succession).