Docs

Log in to read the version of docs relevant to your site, or use the dropdown versions

Retrieve Subscription details on custom thank you page.

This article covers:

I am using a custom thank you page in Chargebee and I would like to retrieve subscription details from the thank you page URL. How do I achieve this?

Getting subscription details from the redirect URL

With the Checkout pages V2, Chargebee offers a default Thank You page where customers are redirected after a successful checkout. Instead, you can also redirect them to a thank you page URL on your end by configuring a redirect URL for each plan.

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

With the Redirect URL, you can also retrieve subscription-related information to display to the customer or to store on your end. For this, you'd need to add subscription-related Mail Merge Fields with the redirect page URL.

Here's a sample URL with Merge Fields for retrieving the subscription and invoice IDs to be displayed in the thank you page: https://acmeinc.com/success.html?sub_id=subscription.id&invoice_id=invoice.id

Was this article helpful?