In each plan configuration page, we have options to configure a redirect URL and also add return variables. 

To configure a custom thank you page URL, navigate to Product catalog > Plans > Create new plan > Hosted pages > Redirect options > Use redirect URL.


Here’s a sample URL with mergevars for retrieving the subscription and invoice ids to be displayed in the thank you page:{{}}&invoice_id={{}}