Notifications - Order invoice - 404 Error

When sending customers a custom invoice directly to their email. The email appears fine but when clicking pay invoice from the email the customer get sent to the website with a 404 error. The website is hosted on duda and we are using the buy now popup buttons to display products and cart checkout. We are no longer using the web store site for the front end but it is still active. I am getting some domain errors that the domain is not connected, but the site is showing live. If we change the cname it won’t go to the new front end site.