This commit is contained in:
Karol Wypchlo 2021-03-03 17:43:15 +01:00
parent 72d8b452ac
commit 2d17ad0663
1 changed files with 1 additions and 1 deletions

View File

@ -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`,