A Strapi 5 plugin to manage Polar products and subscriptions from the admin panel, and to offer a simple front-end checkout using a small JavaScript snippet (content API).
released May 4, 2026
npm install strapi5-plugin-for-polarA Strapi 5 plugin to manage Polar products and subscriptions from the admin panel, and to offer a simple front-end checkout using a small JavaScript snippet (content API).
.env)npm i strapi5-plugin-for-polarnpm run develop.env)The plugin talks to Polarβs REST API with an Organization Access Token (OAT) and verifies Standard Webhooks using a shared secret.
| Variable | Description |
|---|---|
STRAPI_POLAR_SANDBOX_OAT | Polar sandbox OAT. Used when the plugin environment is Sandbox (https://sandbox-api.polar.sh). |
STRAPI_POLAR_LIVE_OAT | Polar live OAT. Used when the plugin environment is Production (https://api.polar.sh). |
You only need the token for the environment(s) you actually use. The admin Settings screen reflects which tokens are present.
| Variable | Description |
|---|---|
STRAPI_POLAR_WEBHOOK_SECRET | Secret Polar uses to sign webhook deliveries (Standard Webhooks). Required for the plugin to verify incoming webhooks. |
.env in your Strapi project# existing environment variables
# Polar API (use sandbox and/or live depending on your setup)
STRAPI_POLAR_SANDBOX_OAT="polar_oat_..."
STRAPI_POLAR_LIVE_OAT="polar_oat_..."
# Webhook verification (signing secret from Polar dashboard)
STRAPI_POLAR_WEBHOOK_SECRET="whsec_..."The plugin can receive Polar webhook events, verify the Standard Webhooks signature, and optionally forward the verified JSON payload to your own URL (configured in admin as Webhook forward URL).
The plugin does not implement your business logic for each event type. It authenticates the request and can forward the parsed event to your API.
When you create the webhook in Polar, use a public HTTPS URL that hits this pluginβs content API route:
Production-style URL:
https://your-deployed-strapi-instance.com/api/strapi5-plugin-for-polar/webhook
strapi5-plugin-for-polar is the plugin name / API namespace.STRAPI_POLAR_WEBHOOK_SECRET in your Strapi .env.Polar cannot call localhost directly. Use a tunnel (for example ngrok, Cloudflare Tunnel, etc.) to expose your local Strapi:
# Example: expose local Strapi on port 1337
ngrok http 1337Use the HTTPS URL ngrok gives you as the webhook base, for example:
https://abcd.ngrok.io/api/strapi5-plugin-for-polar/webhook
Rotate tunnel URLs and signing secrets when you change tooling; keep
.envin sync.
In the Strapi admin:
.env.Save when done.
From the pluginβs main admin page you can:
This plugin is a thin UI + API bridge to Polar.
The admin UI can show an embed snippet that posts to your Strapi content API checkout route:
POST /api/strapi5-plugin-for-polar/checkout
The snippet uses data-* attributes (product id, email, optional price id, optional success/return URLs, metadata). Adjust the example HTML/JS in the admin Embed dialog to match your site.
Checkout URLs: Success and return URLs can be set in plugin settings and/or passed per request from the snippet (success_url, return_url in the JSON body), depending on how you integrate.
This package is licensed under the MIT license. See the license field in package.json.
Β© 2026 Rishi Raj Jain
Share your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.
Submit
