Polar
Manage Polar products and customers, read billing data, and create checkout or portal sessions
Connect Polar when a project needs products, customers, subscriptions, orders, checkout, or customer portal access. Polar uses an organization access token, so a Swarmz administrator controls whether the connector is visible and each workspace supplies its own token. No Swarmz OAuth application is required.
Before you connect
Create an organization access token in Polar with the scopes required by the project. Keep the token in the secure connector form; don't place it in chat, project source, or client-side environment variables. Polar can revoke tokens found in public source repositories.
See Polar authentication for token creation and available authentication modes.
Available operations
| Operation | What it does | Limit per minute |
|---|---|---|
list_products, get_product | Lists products or reads one product | 30 |
create_product, update_product | Creates, updates, archives, or restores a product | 10 |
list_customers, get_customer | Lists, searches, or reads customers | 30 |
create_customer, update_customer | Creates or updates one customer | 10 |
list_subscriptions | Lists subscriptions by organization, product, customer, or status | 30 |
list_orders | Lists orders by organization, product, or customer | 30 |
create_checkout | Creates a checkout session for up to 20 products | 10 |
create_customer_session | Creates an authenticated customer portal session | 10 |
Checkout success URLs must use HTTPS. Swarmz limits list pages to 100 records and response bodies to 2 MB. Write operations pause for AI approval during a build.
Connect Polar
- Ask the AI for the billing workflow and name the Polar records it should use. For example: “Use our shared Polar connection to build a pricing page from active products and create checkout sessions for the selected plan.”
- In Settings > Integrations, select Polar, then select Connect new.
- Enter the Organization access token in the secure form.
- Link the connection to the project when prompted.
For a customer portal, ask: “Add a billing page that creates an authenticated Polar customer session for the current customer.” The AI will request the Polar connection before it adds the server call.
Use a Polar MCP server in personal AI chat
If your Polar setup exposes a compatible Streamable HTTP MCP server, add its HTTPS URL under Personal AI connectors. That connection is separate from the organization access token above and remains personal build context. Swarmz discovers the server's live tools and asks before running tools that are not marked read-only. See Custom MCP server.
Verify Polar
- List products and confirm a known active product.
- List customers and subscriptions in a test organization.
- Create a disposable product, update its description, then archive it.
- Create a checkout session and open the returned checkout URL in a private browser window.
- Create a customer portal session for a test customer and confirm that the returned portal shows that customer's orders and subscriptions.
If validation fails, create a new organization access token and confirm that it belongs to the intended Polar organization. If reads work but checkout or product changes fail, add the matching write scopes in Polar and reconnect. Revoke a leaked token in Polar before replacing it in Swarmz.