Introducing the Better Auth Chargebee plugin: Use it to handle subscriptions, billing, and auth seamlessly.
Chargebeechargebee API

Logout a portal session

Idempotency Supported

Logs out the portal session. Typically this should be called when customers logout of your application.

If this API is called for a Portal Session that currently is in :

  • "created" status, the session status will be marked as "logged_out" and the access URL will become invalid.
  • "logged_in" status, the session status will be marked as "logged_out" and customer will not be able to use that session.
  • "logged_out" status, this will return normally without changing any attribute of this resource.

Sample Request

Sample Result[JSON]

URL Format

POST https://[site].chargebee.com/api/v2/portal_sessions/{portal-session-id}/logout

Returns

Portal session object
Resource object representing portal_session