CommerceSubscriptionItem
The CommerceSubscriptionItem
object is similar to the object as it holds information about a subscription item, as well as methods for managing it. However, the CommerceSubscriptionItem
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 subscription item.
- Name
status
- Type
'active' | 'past_due' | 'upcoming' | 'canceled' | 'ended' | 'expired' | 'incomplete' | 'abandoned'
- Description
The status of the subscription item.
- Name
planPeriod
- Type
'month' | 'annual'
- Description
The plan period for the subscription item.
- Name
periodStart
- Type
number
- Description
Unix timestamp (milliseconds) of when the current period starts.
- Name
periodEnd
- Type
number | null
- Description
Unix timestamp (milliseconds) of when the current period ends.
- Name
nextPayment
- Type
null | { amount: number; date: number; }
- Description
The next payment information. If present, contains the amount of the next payment and the Unix timestamp (milliseconds) of when the next payment is scheduled.
- Name
amount
- Type
undefined | null |
- Description
The current amount for the subscription item.
- Name
plan
- Type
CommercePlan
- Description
The plan associated with this subscription item.
- Name
planId
- Type
string
- Description
The plan ID.
- Name
createdAt
- Type
number
- Description
Unix timestamp (milliseconds) of when the subscription item was created.
- Name
updatedAt
- Type
number
- Description
Unix timestamp (milliseconds) of when the subscription item was last updated.
- Name
canceledAt
- Type
number | null
- Description
Unix timestamp (milliseconds) of when the subscription item was canceled.
- Name
pastDueAt
- Type
number | null
- Description
Unix timestamp (milliseconds) of when the subscription item became past due.
- Name
endedAt
- Type
number | null
- Description
Unix timestamp (milliseconds) of when the subscription item ended.
- Name
payerId
- Type
string
- Description
The payer ID.
- Name
isFreeTrial?
- Type
boolean
- Description
Whether this subscription item is currently in a free trial period.
- Name
lifetimePaid?
- Type
null |
- Description
The lifetime amount paid for this subscription item.
Feedback
Last updated on