Idempotency Supported
Try in API ExplorerCreates a portal session for a customer. The session resource in the response contains the access URL. Forward the customer to that access URL. If you would like to logout the customer later via API call, you need to store the id of the portal session resource returned by this API. While creating a session, you also need to pass the redirect URL to which your customers will be sent to upon logout from the portal UI.
Sample Request
URL Format
POST https://[site].chargebee.com/api/v2/portal_sessions
Input Parameters
Required if customer portal is not integrated via iframe, string, max chars=250
URL to redirect when the user logs out from the portal.
optional, string, max chars=250
By default access_url redirects the customer to the portal home page. If you would like to redirect the customer to a different URL, you can use this parameter to do so.
Note: This parameter is not applicable for in-app portal.
Returns
portal_sessionPortal session object
Resource object representing portal_session