v49

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-081445491.8 MB
Customer

Create portal session

Creates a portal session for the customer, returning a short-lived URL that provides authenticated access to the customer's billing portal. The session expires after expires_in_minutes (default 60, max 180). By default, creating a new session invalidates any other active portal sessions for the customer; pass invalidate_existing=false to allow concurrent sessions.

post/customers/{customer_id}/portal_sessions

Path parameters

customer_idstring nullable required

Request body

expires_in_minutesinteger

Duration in minutes until the portal session expires. Defaults to 60. Maximum 180.

invalidate_existingboolean

When true (default), creating this session soft-deletes any other active portal sessions for the customer. Set to false to allow concurrent sessions — useful when minting portal links for multiple authenticated end-users at once. The customer's permanent portal link (if any) is never invalidated by this.

Response

Created

idstring required
customer_idstring required
created_atstring date-time required
expires_atstring date-time nullable required
urlstring required