You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
13
-
* It is advised to pin the SDK version to avoid breaking changes.
7
+
* The `CommercePlan` object is similar to the [`CommercePlanResource`](/docs/references/javascript/types/commerce-plan-resource) object as it holds information about a plan, as well as methods for managing it. However, the `CommercePlan` object is different in that it is used in the [Backend API](https://clerk.com/docs/reference/backend-api/tag/commerce/get/commerce/plans){{ target: '_blank' }} and is not directly accessible from the Frontend API.
8
+
*
9
+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to pin the SDK version to avoid breaking changes.
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
7
-
* It is advised to pin the SDK version to avoid breaking changes.
7
+
* The `CommerceSubscription` object is similar to the [`CommerceSubscriptionResource`](/docs/references/javascript/types/commerce-subscription-resource) 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](https://clerk.com/docs/reference/backend-api/tag/billing/get/organizations/%7Borganization_id%7D/billing/subscription){{ target: '_blank' }} and is not directly accessible from the Frontend API.
8
+
*
9
+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to pin the SDK version to avoid breaking changes.
8
10
*/
9
11
exportclassCommerceSubscription{
10
12
constructor(
@@ -21,19 +23,19 @@ export class CommerceSubscription {
21
23
*/
22
24
readonlypayerId: string,
23
25
/**
24
-
* Unix timestamp (milliseconds) of creation.
26
+
* Unix timestamp (milliseconds) of when the subscription was created.
25
27
*/
26
28
readonlycreatedAt: number,
27
29
/**
28
-
* Unix timestamp (milliseconds) of last update.
30
+
* Unix timestamp (milliseconds) of when the subscription was last updated.
29
31
*/
30
32
readonlyupdatedAt: number,
31
33
/**
32
-
* Unix timestamp (milliseconds) when the subscription became active.
34
+
* Unix timestamp (milliseconds) of when the subscription became active.
33
35
*/
34
36
readonlyactiveAt: number|null,
35
37
/**
36
-
* Unix timestamp (milliseconds) when the subscription became past due.
38
+
* Unix timestamp (milliseconds) of when the subscription became past due.
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
8
-
* It is advised to pin the SDK version to avoid breaking changes.
7
+
* The `CommerceSubscriptionItem` object is similar to the [`CommerceSubscriptionItemResource`](/docs/references/javascript/types/commerce-subscription-item-resource) 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](https://clerk.com/docs/reference/backend-api/tag/commerce/get/commerce/subscription_items){{ target: '_blank' }} and is not directly accessible from the Frontend API.
8
+
*
9
+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to pin the SDK version to avoid breaking changes.
9
10
*/
10
11
exportclassCommerceSubscriptionItem{
11
12
constructor(
@@ -22,14 +23,20 @@ export class CommerceSubscriptionItem {
22
23
*/
23
24
readonlyplanPeriod: 'month'|'annual',
24
25
/**
25
-
* The start of the current period.
26
+
* Unix timestamp (milliseconds) of when the current period starts.
26
27
*/
27
28
readonlyperiodStart: number,
28
29
/**
29
30
* The next payment information.
30
31
*/
31
32
readonlynextPayment: {
33
+
/**
34
+
* The amount of the next payment.
35
+
*/
32
36
amount: number;
37
+
/**
38
+
* Unix timestamp (milliseconds) of when the next payment is scheduled.
39
+
*/
33
40
date: number;
34
41
}|null,
35
42
/**
@@ -45,27 +52,27 @@ export class CommerceSubscriptionItem {
45
52
*/
46
53
readonlyplanId: string,
47
54
/**
48
-
* The date and time the subscription item was created.
55
+
* Unix timestamp (milliseconds) of when the subscription item was created.
49
56
*/
50
57
readonlycreatedAt: number,
51
58
/**
52
-
* The date and time the subscription item was last updated.
59
+
* Unix timestamp (milliseconds) of when the subscription item was last updated.
53
60
*/
54
61
readonlyupdatedAt: number,
55
62
/**
56
-
* The end of the current period.
63
+
* Unix timestamp (milliseconds) of when the current period ends.
57
64
*/
58
65
readonlyperiodEnd: number|null,
59
66
/**
60
-
* When the subscription item was canceled.
67
+
* Unix timestamp (milliseconds) of when the subscription item was canceled.
61
68
*/
62
69
readonlycanceledAt: number|null,
63
70
/**
64
-
* When the subscription item became past due.
71
+
* Unix timestamp (milliseconds) of when the subscription item became past due.
65
72
*/
66
73
readonlypastDueAt: number|null,
67
74
/**
68
-
* When the subscription item ended.
75
+
* Unix timestamp (milliseconds) of when the subscription item ended.
Copy file name to clipboardExpand all lines: packages/backend/src/api/resources/Feature.ts
+20Lines changed: 20 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,31 @@
1
1
importtype{FeatureJSON}from'./JSON';
2
2
3
+
/**
4
+
* The `Feature` object represents a feature of a subscription plan.
5
+
*
6
+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to pin the SDK version to avoid breaking changes.
0 commit comments