The Subscription object

The representation of an activated plan.

  • id

    string

    The system-assigned identifier of the subscription.

  • state

    enum

    The status of the subscription.

    Possible values:
    ACTIVECANCELEDCREATINGTRIALINGPAST_DUEPAUSED
  • stateReason

    string

    The code that best describes the reason for the state.

  • connection

    Connection

    The billing connection.

  • externalId

    string

    The external identifier of the subscription.

  • plan

    Plan

    The plan.

  • currencyCode

    string

    The currency code for the subscription (e.g. USD).

  • items

    SubscriptionItem[]

    The subscription items.

  • seats

    SubscriptionSeatInfo[]

    The seat information.

  • paymentMethod

    PaymentMethod

    The payment method.

  • cancelPeriodEnd

    boolean

    Whether the subscription is scheduled to be canceled at the end of the current billing period.

  • anchorTime

    date-time

    The anchor time for the billing cycle.

  • startTime

    date-time

    The time the subscription started.

  • endTime

    date-time

    The time the subscription ends/ended.

  • trial

    SubscriptionTrial

    The trial information for the subscription.

  • currentPeriod

    SubscriptionCurrentPeriod

    The current billing period for the subscription.

  • organization

    Organization

    The organization owner of the subscription.

    The ID field of this object must be populated if if user isn't specified.

  • user

    User

    The user owner of the subscription.

    The ID field of this object must be populated if if organization isn't specified.

  • default

    boolean

    Whether the subscription is the default for the account.

  • pullTime

    date-time

    The last time the subscription was pulled from the connection.

  • pushTime

    date-time

    The last time the subscription was pushed to the connection.

  • createTime

    date-time

    The creation time of the subscription.

  • updateTime

    date-time

    The last update time of the subscription.

PreviousSubscriptions
NextList subscriptions

Turn users intorevenue
$

Subscribe to monthly product updates

© 2024 UserHub

Integrations

    UserHub & Auth0UserHub & Stripe BillingUserHub & Google CloudUserHub & FirebaseUserHub & custom auth