From 7a986e5fb3f09351ed1258d97267a78daf3d3279 Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Sat, 11 Apr 2026 00:25:07 -0600 Subject: [PATCH] feat: enhance Stripe integration with customer updates and billing requirements - Added customer update fields for automatic name and address handling during subscription creation. - Enabled billing address collection and tax ID collection for improved compliance and billing accuracy. These changes enhance the Stripe payment process by ensuring necessary customer information is captured and managed effectively. --- apps/dokploy/server/api/routers/stripe.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/dokploy/server/api/routers/stripe.ts b/apps/dokploy/server/api/routers/stripe.ts index 5e76207c0..cf9adf37b 100644 --- a/apps/dokploy/server/api/routers/stripe.ts +++ b/apps/dokploy/server/api/routers/stripe.ts @@ -205,11 +205,13 @@ export const stripeRouter = createTRPCRouter({ mode: "subscription", line_items: items, ...(stripeCustomerId - ? { customer: stripeCustomerId } + ? { customer: stripeCustomerId, customer_update: { name: "auto", address: "auto" } } : { customer_email: owner.email }), metadata: { adminId: owner.id, }, + billing_address_collection: "required", + tax_id_collection: { enabled: true }, allow_promotion_codes: true, success_url: `${WEBSITE_URL}/dashboard/settings/servers?success=true`, cancel_url: `${WEBSITE_URL}/dashboard/settings/billing`,