mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02:00
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.
This commit is contained in:
@@ -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`,
|
||||
|
||||
Reference in New Issue
Block a user