How to get a permaLink to a page

I’m working on a page with a button. On click the user should be redirected to the purchase page so I use wixLocation.to(URL_TO_PURCHASE);

const PURCHASE_PAGE = "/shop-url";
//...
//...
//...
function onSubmitClick() {
   $w("#subscribeButton").disable().then(() => {
      wixLocation.to(PURCHASE_PAGE);
   });
}

But what if my client (or his SEO team) change the page URL for whatever reason?

I know I could use a config file to store constant PURCHASE_PAGE or a collection but chances are they’ll forget about it.

I thought about using the site structure with wix-site-frontend - Velo API Reference - Wix.com

So I could retrieve page’s URL via its name but the problem remains the same; If someone decides to rename the page for any reason, It can’t retrieve the URL.

An ideal solution would be to know the page id and use like wixLocation.to(PAGE_ID)

Is this possible in another way?

Would this be a candidate feature request?

#FEATURE_REQUEST

Hi,
Currently, it’s not possible to link to the page by it’s ID.
You can contact Wix support here to request the feature.

If you wanted to do it yourself, I suppose you could create a backend loop that searches your collections for the correct item and returns a router path value.