Authentication
The Customer Portal API uses session-based authentication with magic link codes sent via email. Customers authenticate without needing a password.Authentication Flow
Request a session code
Call The customer receives an email with a 6-digit code.
POST /v1/customer-portal/customer-session/request with the customer’s email and organization ID.Authenticate with the code
Exchange the code for a session token using Returns a token:
POST /v1/customer-portal/customer-session/authenticate.Multiple Customers with Same Email
When multiple customers share the same email address across different products, the request will return a 409 status with customer selection options:customer_id:
Session Introspection
Retrieve information about the current session:Authenticated User Info
Get details about the authenticated customer or member:"member" with role information (owner, billing_manager, member).
Member vs Customer Sessions
Polar supports two authentication models:- Customer Sessions (legacy): Direct customer authentication
- Member Sessions: For organizations with team management enabled, where multiple members can access a customer account
- owner: Full access to all features
- billing_manager: Can manage billing, subscriptions, and payment methods
- member: Read-only access to purchases and benefits
Available Endpoints
The Customer Portal API provides the following resource endpoints:Sessions
Authenticate customers and manage portal sessions
Subscriptions
View and manage customer subscriptions
Orders
Access order history and invoices
Customer
Manage customer profile and payment methods
Benefit Grants
Access granted benefits from purchases
Seats
Manage seat assignments for team subscriptions
Error Handling
The API uses standard HTTP status codes:- 200: Success
- 201: Resource created
- 204: Success with no content
- 400: Bad request (validation error)
- 401: Authentication required or invalid token
- 403: Permission denied
- 404: Resource not found
- 409: Conflict (e.g., customer selection required)
- 422: Unprocessable entity (business logic error)
Rate Limiting
The Customer Portal API is subject to rate limiting to ensure service stability. Standard rate limits apply per customer session.Webhooks
While the Customer Portal API is customer-facing, you can receive webhooks for customer actions:subscription.updated: Customer modified their subscriptionsubscription.canceled: Customer canceled their subscriptionorder.updated: Customer updated order detailspayment_method.created: Customer added a payment methodpayment_method.deleted: Customer removed a payment method