chore: update dokploy version to v0.26.5 and modify Stripe session creation logic to conditionally set customer or customer_email

This commit is contained in:
Mauricio Siu
2026-01-15 09:18:00 -06:00
parent b965dedd7d
commit 2b9231dcd1
2 changed files with 4 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "dokploy", "name": "dokploy",
"version": "v0.26.4", "version": "v0.26.5",
"private": true, "private": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"type": "module", "type": "module",

View File

@@ -75,13 +75,12 @@ export const stripeRouter = createTRPCRouter({
const session = await stripe.checkout.sessions.create({ const session = await stripe.checkout.sessions.create({
mode: "subscription", mode: "subscription",
line_items: items, line_items: items,
...(stripeCustomerId && { ...(stripeCustomerId
customer: stripeCustomerId, ? { customer: stripeCustomerId }
}), : { customer_email: owner.email }),
metadata: { metadata: {
adminId: owner.id, adminId: owner.id,
}, },
customer_email: owner.email,
allow_promotion_codes: true, allow_promotion_codes: true,
success_url: `${WEBSITE_URL}/dashboard/settings/servers?success=true`, success_url: `${WEBSITE_URL}/dashboard/settings/servers?success=true`,
cancel_url: `${WEBSITE_URL}/dashboard/settings/billing`, cancel_url: `${WEBSITE_URL}/dashboard/settings/billing`,