diff --git a/ghost/members-api/index.js b/ghost/members-api/index.js index d84b2665bb..36a32a5eb2 100644 --- a/ghost/members-api/index.js +++ b/ghost/members-api/index.js @@ -167,8 +167,7 @@ module.exports = function MembersApi({ stripeWebhookService.configure({ webhookSecret: process.env.WEBHOOK_SECRET, webhookHandlerUrl: stripeConfig.webhookHandlerUrl, - webhook: stripeConfig.webhook || {}, - mode: process.env.NODE_ENV || 'development' + webhook: stripeConfig.webhook || {} }) ]) : Promise.resolve(); diff --git a/ghost/members-api/lib/services/stripe-webhook/index.js b/ghost/members-api/lib/services/stripe-webhook/index.js index 6d08fa95f7..7483fa418e 100644 --- a/ghost/members-api/lib/services/stripe-webhook/index.js +++ b/ghost/members-api/lib/services/stripe-webhook/index.js @@ -44,12 +44,6 @@ module.exports = class StripeWebhookService { return; } - if (config.mode !== 'production') { - const error = new Error('Cannot use remote webhooks in development mode. Please use the WEBHOOK_SECRET environment variable.'); - error.fatal = true; - throw error; - } - /** @type {import('stripe').Stripe.WebhookEndpointCreateParams.EnabledEvent[]} */ const events = [ 'checkout.session.completed',