diff --git a/src/_staart/rest/group.ts b/src/_staart/rest/group.ts index a27f0f585..b0c30692f 100644 --- a/src/_staart/rest/group.ts +++ b/src/_staart/rest/group.ts @@ -212,8 +212,14 @@ export const updateGroupBillingForUser = async ( result = await createCustomer( groupId, data, - (groupId: number, data: groupsUpdateInput) => - prisma.groups.update({ where: { id: groupId }, data }) + async (groupId: number, data: { stripeCustomerId: string }) => { + const attributes = + typeof group.attributes === "object" ? group.attributes : {}; + return prisma.groups.update({ + where: { id: groupId }, + data: { attributes: { ...attributes, ...data } }, + }); + } ); } queueWebhook(groupId, Webhooks.UPDATE_ORGANIZATION_BILLING, data);