fix: correctly set stripe customer names (#1939)

Currently the Stripe customer name is set to the organisation name,
which in some cases is just the organisation name.

This update makes it so it uses the owner name instead.
This commit is contained in:
David Nguyen
2025-08-05 12:30:02 +10:00
committed by GitHub
parent 9b01a2318f
commit 2ee0d77870
2 changed files with 2 additions and 2 deletions

View File

@ -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,
});

View File

@ -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,
});