Price

Life Cycle

RouteCreateReadUpdateDelete
/pricing
/admin/settings/pricing
/admin/settings/pricing/new
/admin/settings/pricing/:id

Properties

NameTitleTypeDescription
subscriptionProductId *ProductSubscriptionProductParent Subscription Product
stripeId *Stripe IDStringStripe price ID
type *TypeSubscriptionPriceTypeRECURRING
billingPeriod *Billing PeriodSubscriptionBillingPeriodMONTHLY, or YEARLY
price *PriceDecimal
currency *CurrencyStringDefault: usd.
active *ActiveBoolean
tenantSubscriptions *Tenant SubscriptionsTenantSubscriptions

Model

model SubscriptionPrice {
  id                    String               @id @default(cuid())
  subscriptionProductId String
  subscriptionProduct   SubscriptionProduct  @relation(fields: [subscriptionProductId], references: [id], onDelete: Cascade)
  stripeId              String
  type                  Int // 0 = ONE_TIME, 1 = RECURRING
  billingPeriod         Int // 3 = MONTHLY, 4 = YEARLY
  price                 Int
  currency              String
  trialDays             Int
  active                Boolean
  tenantSubscriptions   TenantSubscription[]
}

cookies.titleSmall

cookies.descriptionSmall shared.learnMore.