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
periodStart- Type
Date- Description
The start date of the current billing period.
- Name
periodEnd- Type
Date | null- Description
The end date of the current billing period, or
nullif not set.
- Name
canceledAt- Type
Date | null- Description
The date when the subscription item was canceled, or
nullif it's not canceled.
- 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