Skip to main content
Docs

CommerceSubscription

Warning

This API is experimental and subject to change while Clerk Billing is under Beta. To mitigate potential disruptions, we recommend pinning your SDK and clerk-js package versions.

The CommerceSubscription object is similar to the object as it holds information about a subscription, as well as methods for managing it. However, the CommerceSubscription object is different in that it is used in the Backend API and is not directly accessible from the Frontend API.

Properties

  • Name
    id
    Type
    string
    Description

    The unique identifier for the commerce subscription.

  • Name
    status
    Type
    "abandoned" | "active" | "ended" | "canceled" | "incomplete" | "past_due"
    Description

    The current status of the subscription.

  • Name
    payerId
    Type
    string
    Description

    The ID of the payer for this subscription.

  • Name
    createdAt
    Type
    number
    Description

    Unix timestamp (milliseconds) of when the subscription was created.

  • Name
    updatedAt
    Type
    number
    Description

    Unix timestamp (milliseconds) of when the subscription was last updated.

  • Name
    activeAt
    Type
    number | null
    Description

    Unix timestamp (milliseconds) of when the subscription became active.

  • Name
    pastDueAt
    Type
    number | null
    Description

    Unix timestamp (milliseconds) of when the subscription became past due.

  • Name
    subscriptionItems
    Type
    CommerceSubscriptionItem[]
    Description

    Array of subscription items in this subscription.

  • Name
    nextPayment
    Type
    null | { amount: ; date: number; }
    Description

    Information about the next scheduled payment.

  • Name
    eligibleForFreeTrial
    Type
    boolean
    Description

    Whether the payer is eligible for a free trial.

Feedback

What did you think of this content?

Last updated on