diff --git a/packages/dashboard/src/pages/api/stripe/activeSubscription.js b/packages/dashboard/src/pages/api/stripe/activeSubscription.js index 23f13737..459c7136 100644 --- a/packages/dashboard/src/pages/api/stripe/activeSubscription.js +++ b/packages/dashboard/src/pages/api/stripe/activeSubscription.js @@ -8,7 +8,7 @@ export default async (req, res) => { try { const authorization = req.headers.authorization; // authorization header from request const { stripeCustomerId } = await got("http://accounts:3000/user", { headers: { authorization } }).json(); - const stripeCustomer = await stripe.customers.retrieve(stripeCustomerId); + const stripeCustomer = await stripe.customers.retrieve(stripeCustomerId, { expand: ["subscriptions"] }); // const { subscriptions } = stripeCustomer; res.json(stripeCustomer);