Customer Portal using Chargebee's API
Chargebee provides a variety of options for your customers to help manage their accounts. Apart from offering a pre-built customer portal, Chargebee also provides the following options if you would require a self-service portal for your customers:
- Chargebee's pre-built Hosted Customer Portal with in-built Authentication
- Chargebee's Hosted Customer Portal with your website's authentication
- Customization to the existing customer portal - Open Source
1. Chargebee's Customer Portal with in-built Authentication
Chargebee provides a pre-built customer portal with in-built authentication. You could get started with the default portal right away, with 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
Let us assume customers already log into your website to access your application. Now, to manage their subscriptions, you wouldn't want them to sign in again to access Chargebee's customer portal.
In such 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.
- 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.
3. Customizing Chargebee's existing Customer Portal - Open Source
If you want to build additional features on top of Chargebee's pre-built customer portal, we have an open source code which can be forked.