diff --git a/ghost/members-api/lib/services/stripe-api/index.js b/ghost/members-api/lib/services/stripe-api/index.js index 4438238a2e..be6e8cab79 100644 --- a/ghost/members-api/lib/services/stripe-api/index.js +++ b/ghost/members-api/lib/services/stripe-api/index.js @@ -182,10 +182,9 @@ module.exports = class StripeAPIService { async getCustomerForMemberCheckoutSession(member) { await member.related('stripeCustomers').fetch(); const customers = member.related('stripeCustomers'); - - for (const data of customers) { + for (const data of customers.models) { try { - const customer = await this.getCustomer(data.customer_id); + const customer = await this.getCustomer(data.get('customer_id')); if (!customer.deleted) { return customer; }