Terminal
Terminal/Skill
Step-by-step wizard that sets up Polar payments in a new project, from MCP install and first product to checkout and webhook code.
By Polar
Works with
npx skills add polarsource/skills --skill setup-polarInteractive setup guide to get Polar payments working in your project.
Follow these steps in order:
First, check if the Polar MCP server is available. Try listing products or organizations using MCP tools.
If MCP tools work: Skip to Step 3.
If MCP not available: Continue to Step 2.
Guide the user to install the Polar MCP server based on their environment:
Claude Code:
# Production
claude mcp add --transport http "Polar" "https://mcp.polar.sh/mcp/polar-mcp"
# Sandbox (recommended for setup)
claude mcp add --transport http "Polar Sandbox" "https://mcp.polar.sh/mcp/polar-sandbox"
Cursor (.cursor/mcp.json):
{
"mcpServers": {
"Polar Sandbox": {
"url": "https://mcp.polar.sh/mcp/polar-sandbox"
}
}
}
After installation, the user must:
Once authenticated, verify MCP works by listing organizations.
Ask the user:
Framework: What framework are you using?
Environment: Start with sandbox or production?
Product type: What are you selling?
Use MCP to check if user has an organization. If not, guide them to create one at:
Use MCP to create a test product. Example for subscription:
Create a product with:
- Name: "Pro Plan"
- Monthly price: $29
- Organization: [user's org]
Store the returned product ID for checkout integration.
Hand off to the polar-integration skill to generate the Checkout, Customer Portal, and Webhooks endpoints for the framework selected in Step 3. That skill has the canonical, framework-agnostic recipes plus per-framework variations.
Before invoking it, make sure the user has these environment variables ready (use whatever loader their framework provides):
POLAR_ACCESS_TOKEN= # from polar.sh/settings (or sandbox)
POLAR_WEBHOOK_SECRET= # created in Step 7
POLAR_SERVER=sandbox # omit or set to "production" when going live
Pass along the product ID from Step 5 so checkout links can be tested in Step 8.
Use the Polar CLI to forward webhooks to the local dev server. It needs no tunnel and no dashboard endpoint. The polar-testing skill ("Local Webhook Testing") has the details.
curl -fsSL https://polar.sh/install.sh | bash) and ask the user to run polar auth login --sandbox, which opens a browser.secret=$(polar listen --print-secret) && echo "POLAR_WEBHOOK_SECRET=$secret" >> .env
polar listen <port>/<webhook-path> in the background, using the path from the route generated in Step 6, and keep it running.polar trigger order.paid. It prints the handler's response and exits with status 1 when the handler fails. Fix the handler and repeat until it exits with 0.When deploying, create a webhook endpoint for the public URL with MCP or in the dashboard (Settings → Webhooks), select order.paid, subscription.created and subscription.canceled, and use that endpoint's secret as POLAR_WEBHOOK_SECRET in the deployed environment.
4242 4242 4242 4242.polar listen shows order.paid with a 2xx status from the handler.Once basic setup works, suggest:
polar-integration).externalCustomerId in checkout.POLAR_SERVER from sandbox to production.