When customers are led to your custom self-service portal from your website, redirect them to the Login URL: https://yourdomain.chargebeeportal.com/portal/login.
The following parameters should be passed along with the Login URL:
- return_url - The URL that users should be redirected to upon successful authentication.
- cancel_url - The URL that users should be redirected to when they want to go back to your website during login.
The domain name used in the Return/Cancel URL should be added as a 'Allow-list Domain' in Chargebee. Add just the domain name in Chargebee and not the entire URL: E.g. yourdomain.com.
Upon successful authentication, a portal session is created for the user and Chargebee redirects the user to the return_url along with the following parameters:
- auth_session_id - Identifier to the authenticated session.
- auth_session_token - Token for the session which should be sent later to activate this session.
With the auth_session_id & auth_session_token parameters, using Activate a Portal Session API, validate the session details and create a session for that user in your website.