From 2d17ad066340b428a158778c69186ab645d1bf06 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Wed, 3 Mar 2021 17:43:15 +0100 Subject: [PATCH] payments --- .../dashboard/src/pages/api/stripe/createCheckoutSession.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dashboard/src/pages/api/stripe/createCheckoutSession.js b/packages/dashboard/src/pages/api/stripe/createCheckoutSession.js index a930e782..671dd07f 100644 --- a/packages/dashboard/src/pages/api/stripe/createCheckoutSession.js +++ b/packages/dashboard/src/pages/api/stripe/createCheckoutSession.js @@ -45,7 +45,7 @@ export default async (req, res) => { payment_method_types: ["card"], line_items: [{ price, quantity: 1 }], [stripeCustomerId ? "customer" : "customer_email"]: stripeCustomerId ? stripeCustomerId : user.email, - client_reference_id: user.id, + client_reference_id: user.sub, // ?session_id={CHECKOUT_SESSION_ID} means the redirect will have the session ID set as a query param success_url: `${process.env.SKYNET_DASHBOARD_URL}/payments?session_id={CHECKOUT_SESSION_ID}`, cancel_url: `${process.env.SKYNET_DASHBOARD_URL}/payments`,