diff --git a/packages/trpc/server/enterprise-router/create-subscription.ts b/packages/trpc/server/enterprise-router/create-subscription.ts index db0ab302d..ddaf603aa 100644 --- a/packages/trpc/server/enterprise-router/create-subscription.ts +++ b/packages/trpc/server/enterprise-router/create-subscription.ts @@ -54,7 +54,7 @@ export const createSubscriptionRoute = authenticatedProcedure if (!customerId) { const customer = await createCustomer({ - name: organisation.name, + name: organisation.owner.name || organisation.owner.email, email: organisation.owner.email, }); diff --git a/packages/trpc/server/enterprise-router/manage-subscription.ts b/packages/trpc/server/enterprise-router/manage-subscription.ts index de621ad06..2a66ebd9e 100644 --- a/packages/trpc/server/enterprise-router/manage-subscription.ts +++ b/packages/trpc/server/enterprise-router/manage-subscription.ts @@ -77,7 +77,7 @@ export const manageSubscriptionRoute = authenticatedProcedure // If the customer ID is still missing create a new customer. if (!customerId) { const customer = await createCustomer({ - name: organisation.name, + name: organisation.owner.name || organisation.owner.email, email: organisation.owner.email, });