Introduction
The Polar API allows you to programmatically manage your payment infrastructure, including products, subscriptions, customers, orders, and more.Base URL
All API requests should be made to:Authentication
Polar supports multiple authentication methods:Personal Access Tokens
Create a Personal Access Token (PAT) from your Polar dashboard and include it in theAuthorization header:
Organization Access Tokens
For organization-scoped operations, use an Organization Access Token:OAuth 2.0
Polar supports OAuth 2.0 for third-party integrations. See our OAuth documentation for details.Request Format
Content Type
All POST, PATCH, and PUT requests should use JSON:Query Parameters
GET requests use query parameters for filtering:Response Format
Success Responses
Successful responses return JSON with the requested data:List Responses
List endpoints return paginated results:Pagination
List endpoints support pagination via query parameters:Page number (1-indexed)
Number of items per page (max 100)
Sorting
Many list endpoints support sorting:Array of sort criteria. Prefix with
- for descending order.Filtering
List endpoints support various filters specific to each resource. Common filters include:organization_id- Filter by organizationquery- Text searchis_archived- Include/exclude archived items
Metadata
Many resources support custom metadata for storing additional key-value pairs:Error Responses
Errors return appropriate HTTP status codes and a JSON response:Common Status Codes
Request successful
Resource created successfully
Request successful, no content returned
Invalid request parameters
Missing or invalid authentication
Insufficient permissions
Resource not found
Resource conflict (e.g., duplicate)
Validation error
Rate limit exceeded
Server error
Rate Limiting
The Polar API implements rate limiting to ensure fair usage. Rate limit information is included in response headers:X-RateLimit-Limit- Maximum requests allowedX-RateLimit-Remaining- Requests remainingX-RateLimit-Reset- Time when limit resets (Unix timestamp)
429 response. Implement exponential backoff in your applications.
Idempotency
For safe retries of mutating requests (POST, PATCH, DELETE), use theIdempotency-Key header:
Webhooks
Polar can send webhook notifications for important events. See the Webhooks documentation for setup and event types.SDKs
Official SDKs are available for popular languages:- Python:
pip install polar-sdk - TypeScript/JavaScript:
npm install @polar-sh/sdk - Go:
go get github.com/polarsource/polar-go
OpenAPI Specification
The complete OpenAPI specification is available at:Support
For API support:- Documentation: docs.polar.sh
- Community: Discord
- Email: [email protected]