If you would like to use Chargebee’s customer portal details to authenticate the customer in your application or to password protect your pages using customer portal username and password, you can make use of our Portal Sessions API for this use case.


This is how to set this up:

  • Upon successful authentication, a session is created for the user and Chargebee redirects the user to the return_url along with the following parameters:

  • Using the auth_session_id & auth_session_token, you should call Activate a Portal Session API to validate the session details. You would also receive another parameter called has_active_subscription which would tell you if the user has an Active subscription or not.  Based on this, you can create a session for that user in your website and provide them access to their content.


Note: The customer must be present in Chargebee and they must have already activated their portal account (By verifying their email address and setting their password) prior to this.