SubscriptionPeriod (v1.0.0)

Represents a single billing cycle or interval within a subscription's lifetime.

Overview

The SubscriptionPeriod entity tracks the state and details of a specific billing cycle within a Subscription. It links the subscription to the relevant invoice and payment for that interval and records the exact dates and amount billed.

Entity Properties

Name Type Required Description
subscriptionPeriodIdUUIDRequiredUnique identifier for this specific subscription period.
subscriptionIdUUIDRequiredIdentifier of the parent Subscription this period belongs to.
planIdUUIDRequiredIdentifier of the Plan active during this period.
startDateDateRequiredThe start date of this billing period.
endDateDateRequiredThe end date of this billing period.
invoiceIdUUIDOptionalIdentifier of the invoice created for this period's charge.
paymentIdUUIDOptionalIdentifier of the payment that settled the invoice for this period.
statusstringRequiredStatus specific to this period (reflects invoicing/payment state).
amountBilleddecimalOptionalThe actual amount billed for this period (could differ from plan due to promotions, usage, etc.).
currencystringOptionalCurrency of the billed amount.
createdAtDateTimeRequiredTimestamp when this period record was created (often at the start of the period).

Relationships

  • Subscription: A subscription period belongs to one Subscription.
  • Plan: Reflects the Plan active during this period.
  • Invoice: May be associated with one Invoice generated for this period.
  • Payment: May be associated with one Payment that settled the period’s invoice.

Examples

  • Period for Jane Doe’s ‘Pro Plan’ from 2024-05-01 to 2024-05-31, invoiced via #INV-00123, status Paid.
  • Period for Acme Corp’s ‘Enterprise Plan’ from 2024-04-15 to 2024-05-14, status Billed, awaiting payment.
  • The first period (trial) for a new subscription from 2024-05-20 to 2024-06-19, status Active, amountBilled $0.00.