Chargebee provides several options for your customers to manage their accounts. In addition to a pre-built customer portal, Chargebee offers the following self-service portal options:
Chargebee's pre-built Hosted Customer Portal with built-in authentication
Chargebee's Hosted Customer Portal with your website's authentication
1. Chargebee's Customer Portal with in-built Authentication
Chargebee provides a pre-built customer portal with built-in authentication. You can get started with the default portal right away and make a few tweaks to suit your business needs. This option is discussed in detail here.
2. Chargebee's Customer Portal with your Website's Authentication
If your customers already log in to your website to access your application, you likely don't want them to sign in again to access Chargebee's customer portal.
In these cases, you can redirect customers directly to Chargebee's portal using the API. This is referred to as SSO (Single Sign-On).
Follow these steps to support portal access via SSO:
On the Chargebee UI, under Settings > Configure Chargebee > Checkout & Self-Serve Portal > Customers can access the self-serve portal choose Via Single Sign On API.
Include a link/button on your site that leads customers to the portal for managing their account.
When customers click the link, handle the link request at your server's end and create a portal session for the customer using Chargebee's "Create a portal session" API.
Redirect the user to the access URL present in the "Portal Session" resource returned by the API call that was made in the previous step.
Note:
The access URL will be valid for only an hour from the time it was created.
Once accessed, the session is valid until the user logs out from the portal or the Logout API is invoked from your application for that particular session.
The Access URL cannot be reused. So create a new Portal session each time you need to provide access to the portal.