CommerceSubscriptionItemResource
The CommerceSubscriptionItemResource type represents an item in a subscription.
Properties
- Name
 id- Type
 string- Description
 The unique identifier for the subscription item.
- Name
 paymentSourceId- Type
 string- Description
 The identifier of the payment source used for the subscription item.
- Name
 plan- Type
 - CommercePlanResource
 - Description
 The plan associated with the subscription item.
- Name
 planPeriod- Type
 'month' | 'annual'- Description
 The billing period of the subscription item.
- Name
 status- Type
 'active' | 'ended' | 'upcoming' | 'past_due'- Description
 The current status of the subscription item.
- Name
 createdAt- Type
 Date- Description
 The date when the subscription item was created.
- Name
 pastDueAt- Type
 Date | null- Description
 The date when the subscription item became past due, or
nullif it's not past due.
- Name
 periodStartDate- Type
 Date- Description
 The start date of the current billing period.
- Name
 periodEndDate- Type
 Date | null- Description
 The end date of the current billing period, or
nullif not set.
- Name
 canceledAtDate- Type
 Date | null- Description
 The date when the subscription item was canceled, or
nullif it's not canceled.
- Name
 periodStart- Type
 number- Description
 Deprecated. Use
periodStartDateinstead. The Unix timestamp for the start of the current billing period.
- Name
 periodEnd- Type
 number- Description
 Deprecated. Use
periodEndDateinstead. The Unix timestamp for the end of the current billing period.
- Name
 canceledAt- Type
 number | null- Description
 Deprecated. Use
canceledAtDateinstead. The Unix timestamp for when the item was canceled, ornull.
- Name
 amount- Type
 CommerceMoney | undefined- Description
 The amount charged for the subscription item.
- Name
 credit- Type
 { amount: CommerceMoney } | undefined- Description
 Credit info for the subscription item, if any.
- Name
 cancel- Type
 (params: CancelSubscriptionParams) => Promise<DeletedObjectResource>- Description
 A function to cancel the subscription item. Accepts the following parameters:
orgId?(string): The ID of the organization to cancel the subscription item for.
Feedback
Last updated on