diff --git a/packages/billing/core/src/schema/create-billing-checkout.schema.ts b/packages/billing/core/src/schema/create-billing-checkout.schema.ts index 3af9724e1..6194beda4 100644 --- a/packages/billing/core/src/schema/create-billing-checkout.schema.ts +++ b/packages/billing/core/src/schema/create-billing-checkout.schema.ts @@ -15,4 +15,5 @@ export const CreateBillingCheckoutSchema = z.object({ quantity: z.number(), }), ), + metadata: z.record(z.string()).optional(), }); diff --git a/packages/billing/stripe/src/services/create-stripe-checkout.ts b/packages/billing/stripe/src/services/create-stripe-checkout.ts index 8442e5175..afb2497c1 100644 --- a/packages/billing/stripe/src/services/create-stripe-checkout.ts +++ b/packages/billing/stripe/src/services/create-stripe-checkout.ts @@ -36,6 +36,7 @@ export async function createStripeCheckout( trial_period_days: params.plan.trialDays, metadata: { accountId: params.accountId, + ...(params.metadata ?? {}), }, } : {};