This commit is contained in:
Karol Wypchlo 2021-02-25 15:24:00 +01:00
parent ce295d2330
commit 74851ae973
1 changed files with 1 additions and 1 deletions

View File

@ -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);