diff --git a/ghost/stripe/lib/WebhookController.js b/ghost/stripe/lib/WebhookController.js index b6519d7944..b13973677c 100644 --- a/ghost/stripe/lib/WebhookController.js +++ b/ghost/stripe/lib/WebhookController.js @@ -152,6 +152,10 @@ module.exports = class WebhookController { customer_id: setupIntent.metadata.customer_id }); + if (!member) { + return; + } + await this.api.attachPaymentMethodToCustomer( setupIntent.metadata.customer_id, setupIntent.payment_method