
By Maxime Hamou
A Strapi 5 plugin to manage Stripe products and subscriptions directly from the admin panel, and provide a simple front-end checkout integration via a ready-to-use JavaScript snippet.
released February 4, 2026
npm install strapi5-plugin-for-stripeA Strapi 5 plugin to manage Stripe products and subscriptions directly from the admin panel, and provide a simple front-end checkout integration via a ready-to-use JavaScript snippet.
npm i strapi5-plugin-for-stripeor
yarn add strapi5-plugin-for-stripeyarn developTo use the Strapi Stripe plugin, you need to configure some environment variables in your Strapi project .env file. These variables allow the plugin to connect to your Stripe account securely.
| Variable | Description |
|---|---|
STRAPI_ADMIN_TEST_STRIPE_SECRET_KEY | Your Stripe Test Secret Key. Used when the plugin is in test mode. |
STRAPI_ADMIN_LIVE_STRIPE_SECRET_KEY | Your Stripe Live Secret Key. Used when the plugin is in live mode. |
STRAPI_ADMIN_STRIPE_WEBHOOK_SECRET_KEY | Your Stripe Webhook Secret. Needed if you are using Stripe webhooks to handle events. |
.env fileSTRAPI_ADMIN_TEST_STRIPE_SECRET_KEY=sk_test_XXXXXXXXXXXXXXXXXXXXXXXX
STRAPI_ADMIN_LIVE_STRIPE_SECRET_KEY=sk_live_XXXXXXXXXXXXXXXXXXXXXXXX
STRAPI_ADMIN_STRIPE_WEBHOOK_SECRET_KEY=whsec_XXXXXXXXXXXXXXXXXXXXXXXXThis plugin can receive Stripe webhook events, verify the Stripe signature, and forward the authenticated event payload to your external API (your business logic stays outside the plugin).
β The plugin does not process Stripe events internally.
It only authenticates the event (signature check) and then forwards it.
Stripe signature verification requires the raw request body.
If Strapi parses the body first, verification will fail.
Edit your Strapi project middleware config:
config/middlewares.js
{
name: "strapi::body",
config: {
includeUnparsed: true,
},
},Then restart Strapi.
β Without this, Stripe verification will fail (invalid signature).
When you create the webhook in Stripe, Stripe needs an Endpoint URL (a public URL that Stripe can call).
In production, it should be your Strapi webhook route, for example: https://your-backend.com/api/strapi5-plugin-for-stripe/webhook
In local development, Stripe cannot call localhost directly. Use Stripe CLI instead (see below).
Open the Stripe Dashboard (Test or Live mode depending on your environment)
Go to Developers β Webhooks
Click Add endpoint
Select the events you want to receive (minimum recommended):
Depending on your use-case (subscriptions), you may also want:
Enter your Endpoint URL
Click Add endpoint
Open the created endpoint β find Signing secret
Click Reveal and copy the value (starting with whsec_...)
You can now paste this value to your .env file
Stripe canβt reach localhost from the internet. Use the Stripe CLI to forward events to your local Strapi server:
stripe login
stripe listen --forward-to localhost:1337/api/strapi5-plugin-for-stripe/webhookThe CLI will display a temporary signing secret: Your webhook signing secret is whsec_...
Use that value in your .env during local development: STRAPI_ADMIN_STRIPE_WEBHOOK_SECRET_KEY=whsec_FROM_STRIPE_CLI
β οΈ The Stripe CLI signing secret changes every time you restart stripe listen.
Go to Admin Panel β Plugins β Stripe Settings and configure:
Save the settings once configured.
If you want to configure the allowed payment methods, you can do it directly in the Stripe Dashboard, by going to Settings β Payments β Payment methods.
The plugin allows you to manage Stripe products directly from the admin UI.
Supported product types
Available fields
Important Stripe behavior
Stripe prices are immutable. If you change the price or subscription interval, the plugin automatically:
This is handled transparently.
After creating a product in the Stripe plugin, click on the Embed Code icon next to the product.
A modal will open with a ready-to-use integration snippet and clear instructions to help you add a payment button to your website.
To integrate the payment button:
The product listing page is the page where your products are displayed and where customers can start the checkout process by clicking the payment button.
This plugin is licensed under the MIT license. See the COPYING file for details.
Β©2026 Maxime Hamou
Share your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.
Submit
