diff --git a/packages/twenty-server/src/engine/core-modules/billing/services/billing-usage.service.ts b/packages/twenty-server/src/engine/core-modules/billing/services/billing-usage.service.ts index ffd79cea6f..4b78de2a15 100644 --- a/packages/twenty-server/src/engine/core-modules/billing/services/billing-usage.service.ts +++ b/packages/twenty-server/src/engine/core-modules/billing/services/billing-usage.service.ts @@ -67,12 +67,16 @@ export class BillingUsageService { } try { - await this.stripeBillingMeterEventService.sendBillingMeterEvent({ - eventName: billingEvents[0].eventName, - value: billingEvents[0].value, - stripeCustomerId: workspaceStripeCustomer.stripeCustomerId, - dimensions: billingEvents[0].dimensions, - }); + await Promise.all( + billingEvents.map((event) => + this.stripeBillingMeterEventService.sendBillingMeterEvent({ + eventName: event.eventName, + value: event.value, + stripeCustomerId: workspaceStripeCustomer.stripeCustomerId, + dimensions: event.dimensions, + }), + ), + ); } catch (error) { throw new BillingException( `Failed to send billing meter events to Stripe: ${error}`,