@whop/sdk 0.0.26 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/client.d.mts +6 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -5
- package/client.d.ts.map +1 -1
- package/client.js +9 -2
- package/client.js.map +1 -1
- package/client.mjs +9 -2
- package/client.mjs.map +1 -1
- package/package.json +3 -3
- package/resources/access-tokens.d.mts +32 -51
- package/resources/access-tokens.d.mts.map +1 -1
- package/resources/access-tokens.d.ts +32 -51
- package/resources/access-tokens.d.ts.map +1 -1
- package/resources/access-tokens.js +6 -8
- package/resources/access-tokens.js.map +1 -1
- package/resources/access-tokens.mjs +6 -8
- package/resources/access-tokens.mjs.map +1 -1
- package/resources/ai-chats.d.mts +37 -9
- package/resources/ai-chats.d.mts.map +1 -1
- package/resources/ai-chats.d.ts +37 -9
- package/resources/ai-chats.d.ts.map +1 -1
- package/resources/ai-chats.js +1 -1
- package/resources/ai-chats.js.map +1 -1
- package/resources/ai-chats.mjs +1 -1
- package/resources/ai-chats.mjs.map +1 -1
- package/resources/app-builds.d.mts +2 -2
- package/resources/app-builds.d.ts +2 -2
- package/resources/apps.d.mts +5 -4
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +5 -4
- package/resources/apps.d.ts.map +1 -1
- package/resources/authorized-users.d.mts +6 -6
- package/resources/authorized-users.d.ts +6 -6
- package/resources/chat-channels.d.mts +1 -1
- package/resources/chat-channels.d.ts +1 -1
- package/resources/checkout-configurations.d.mts +24 -16
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +24 -16
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/companies.d.mts +38 -25
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +38 -25
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.js +7 -4
- package/resources/companies.js.map +1 -1
- package/resources/companies.mjs +7 -4
- package/resources/companies.mjs.map +1 -1
- package/resources/company-token-transactions.d.mts +10 -10
- package/resources/company-token-transactions.d.ts +10 -10
- package/resources/course-chapters.d.mts +3 -3
- package/resources/course-chapters.d.ts +3 -3
- package/resources/course-lessons.d.mts +15 -15
- package/resources/course-lessons.d.ts +15 -15
- package/resources/course-students.d.mts +6 -6
- package/resources/course-students.d.ts +6 -6
- package/resources/courses.d.mts +8 -8
- package/resources/courses.d.ts +8 -8
- package/resources/disputes.d.mts +20 -18
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +20 -18
- package/resources/disputes.d.ts.map +1 -1
- package/resources/entries.d.mts +6 -6
- package/resources/entries.d.ts +6 -6
- package/resources/experiences.d.mts +6 -5
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +6 -5
- package/resources/experiences.d.ts.map +1 -1
- package/resources/fee-markups.d.mts +6 -6
- package/resources/fee-markups.d.ts +6 -6
- package/resources/files.d.mts +2 -2
- package/resources/files.d.ts +2 -2
- package/resources/forum-posts.d.mts +8 -4
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +8 -4
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/forums.d.mts +1 -1
- package/resources/forums.d.ts +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +28 -20
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +28 -20
- package/resources/invoices.d.ts.map +1 -1
- package/resources/leads.d.mts +12 -12
- package/resources/leads.d.ts +12 -12
- package/resources/ledger-accounts.d.mts +9 -7
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +9 -7
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/members.d.mts +9 -9
- package/resources/members.d.ts +9 -9
- package/resources/memberships.d.mts +17 -12
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +17 -12
- package/resources/memberships.d.ts.map +1 -1
- package/resources/messages.d.mts +7 -3
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +7 -3
- package/resources/messages.d.ts.map +1 -1
- package/resources/payments.d.mts +27 -20
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +27 -20
- package/resources/payments.d.ts.map +1 -1
- package/resources/payout-methods.d.mts +6 -6
- package/resources/payout-methods.d.ts +6 -6
- package/resources/plans.d.mts +34 -24
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +34 -24
- package/resources/plans.d.ts.map +1 -1
- package/resources/products.d.mts +4 -2
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +4 -2
- package/resources/products.d.ts.map +1 -1
- package/resources/promo-codes.d.mts +22 -12
- package/resources/promo-codes.d.mts.map +1 -1
- package/resources/promo-codes.d.ts +22 -12
- package/resources/promo-codes.d.ts.map +1 -1
- package/resources/reactions.d.mts +1 -1
- package/resources/reactions.d.ts +1 -1
- package/resources/refunds.d.mts +19 -15
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +19 -15
- package/resources/refunds.d.ts.map +1 -1
- package/resources/reviews.d.mts +10 -10
- package/resources/reviews.d.ts +10 -10
- package/resources/setup-intents.d.mts +18 -20
- package/resources/setup-intents.d.mts.map +1 -1
- package/resources/setup-intents.d.ts +18 -20
- package/resources/setup-intents.d.ts.map +1 -1
- package/resources/shared.d.mts +175 -137
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +175 -137
- package/resources/shared.d.ts.map +1 -1
- package/resources/shipments.d.mts +4 -4
- package/resources/shipments.d.ts +4 -4
- package/resources/support-channels.d.mts +1 -1
- package/resources/support-channels.d.ts +1 -1
- package/resources/topups.d.mts +6 -4
- package/resources/topups.d.mts.map +1 -1
- package/resources/topups.d.ts +6 -4
- package/resources/topups.d.ts.map +1 -1
- package/resources/transfers.d.mts +8 -5
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +8 -5
- package/resources/transfers.d.ts.map +1 -1
- package/resources/users.d.mts +46 -8
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +46 -8
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +10 -0
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +10 -0
- package/resources/users.mjs.map +1 -1
- package/resources/verifications.d.mts +1 -1
- package/resources/verifications.d.ts +1 -1
- package/resources/webhooks.d.mts +71 -57
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +71 -57
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/withdrawals.d.mts +15 -11
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +15 -11
- package/resources/withdrawals.d.ts.map +1 -1
- package/src/client.ts +20 -8
- package/src/resources/access-tokens.ts +35 -56
- package/src/resources/ai-chats.ts +42 -9
- package/src/resources/app-builds.ts +2 -2
- package/src/resources/apps.ts +5 -4
- package/src/resources/authorized-users.ts +6 -6
- package/src/resources/chat-channels.ts +1 -1
- package/src/resources/checkout-configurations.ts +24 -16
- package/src/resources/companies.ts +41 -26
- package/src/resources/company-token-transactions.ts +10 -10
- package/src/resources/course-chapters.ts +3 -3
- package/src/resources/course-lessons.ts +15 -15
- package/src/resources/course-students.ts +6 -6
- package/src/resources/courses.ts +8 -8
- package/src/resources/disputes.ts +20 -18
- package/src/resources/entries.ts +6 -6
- package/src/resources/experiences.ts +6 -5
- package/src/resources/fee-markups.ts +6 -6
- package/src/resources/files.ts +2 -2
- package/src/resources/forum-posts.ts +8 -4
- package/src/resources/forums.ts +1 -1
- package/src/resources/index.ts +2 -1
- package/src/resources/invoices.ts +28 -20
- package/src/resources/leads.ts +12 -12
- package/src/resources/ledger-accounts.ts +9 -7
- package/src/resources/members.ts +9 -9
- package/src/resources/memberships.ts +18 -12
- package/src/resources/messages.ts +7 -3
- package/src/resources/payments.ts +28 -18
- package/src/resources/payout-methods.ts +6 -6
- package/src/resources/plans.ts +34 -24
- package/src/resources/products.ts +4 -2
- package/src/resources/promo-codes.ts +22 -12
- package/src/resources/reactions.ts +1 -1
- package/src/resources/refunds.ts +20 -15
- package/src/resources/reviews.ts +10 -10
- package/src/resources/setup-intents.ts +18 -20
- package/src/resources/shared.ts +176 -137
- package/src/resources/shipments.ts +4 -4
- package/src/resources/support-channels.ts +1 -1
- package/src/resources/topups.ts +6 -4
- package/src/resources/transfers.ts +8 -5
- package/src/resources/users.ts +58 -8
- package/src/resources/verifications.ts +1 -1
- package/src/resources/webhooks.ts +71 -57
- package/src/resources/withdrawals.ts +15 -11
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -130,12 +130,12 @@ export type CancelOptions =
|
|
|
130
130
|
| 'testing';
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
|
-
* A membership represents
|
|
134
|
-
*
|
|
133
|
+
* A membership represents an active relationship between a user and a product. It
|
|
134
|
+
* tracks the user's access, billing status, and renewal schedule.
|
|
135
135
|
*/
|
|
136
136
|
export interface MembershipListResponse {
|
|
137
137
|
/**
|
|
138
|
-
* The
|
|
138
|
+
* The unique identifier for the membership.
|
|
139
139
|
*/
|
|
140
140
|
id: string;
|
|
141
141
|
|
|
@@ -167,7 +167,7 @@ export interface MembershipListResponse {
|
|
|
167
167
|
company: MembershipListResponse.Company;
|
|
168
168
|
|
|
169
169
|
/**
|
|
170
|
-
* The
|
|
170
|
+
* The datetime the membership was created.
|
|
171
171
|
*/
|
|
172
172
|
created_at: string;
|
|
173
173
|
|
|
@@ -176,6 +176,11 @@ export interface MembershipListResponse {
|
|
|
176
176
|
*/
|
|
177
177
|
currency: Shared.Currency | null;
|
|
178
178
|
|
|
179
|
+
/**
|
|
180
|
+
* When the member joined the company.
|
|
181
|
+
*/
|
|
182
|
+
joined_at: string | null;
|
|
183
|
+
|
|
179
184
|
/**
|
|
180
185
|
* The license key for this Membership. This is only present if the membership
|
|
181
186
|
* grants access to an instance of the Whop Software app.
|
|
@@ -193,7 +198,8 @@ export interface MembershipListResponse {
|
|
|
193
198
|
member: MembershipListResponse.Member | null;
|
|
194
199
|
|
|
195
200
|
/**
|
|
196
|
-
*
|
|
201
|
+
* Custom key-value pairs for the membership (commonly used for software licensing,
|
|
202
|
+
* e.g., HWID). Max 50 keys, 500 chars per key, 5000 chars per value.
|
|
197
203
|
*/
|
|
198
204
|
metadata: { [key: string]: unknown };
|
|
199
205
|
|
|
@@ -235,7 +241,7 @@ export interface MembershipListResponse {
|
|
|
235
241
|
status: Shared.MembershipStatus;
|
|
236
242
|
|
|
237
243
|
/**
|
|
238
|
-
*
|
|
244
|
+
* The datetime the membership was last updated.
|
|
239
245
|
*/
|
|
240
246
|
updated_at: string;
|
|
241
247
|
|
|
@@ -251,7 +257,7 @@ export namespace MembershipListResponse {
|
|
|
251
257
|
*/
|
|
252
258
|
export interface Company {
|
|
253
259
|
/**
|
|
254
|
-
* The
|
|
260
|
+
* The unique identifier for the company.
|
|
255
261
|
*/
|
|
256
262
|
id: string;
|
|
257
263
|
|
|
@@ -266,7 +272,7 @@ export namespace MembershipListResponse {
|
|
|
266
272
|
*/
|
|
267
273
|
export interface Member {
|
|
268
274
|
/**
|
|
269
|
-
* The
|
|
275
|
+
* The unique identifier for the member.
|
|
270
276
|
*/
|
|
271
277
|
id: string;
|
|
272
278
|
}
|
|
@@ -276,7 +282,7 @@ export namespace MembershipListResponse {
|
|
|
276
282
|
*/
|
|
277
283
|
export interface Plan {
|
|
278
284
|
/**
|
|
279
|
-
* The
|
|
285
|
+
* The unique identifier for the plan.
|
|
280
286
|
*/
|
|
281
287
|
id: string;
|
|
282
288
|
}
|
|
@@ -286,7 +292,7 @@ export namespace MembershipListResponse {
|
|
|
286
292
|
*/
|
|
287
293
|
export interface Product {
|
|
288
294
|
/**
|
|
289
|
-
* The
|
|
295
|
+
* The unique identifier for the product.
|
|
290
296
|
*/
|
|
291
297
|
id: string;
|
|
292
298
|
|
|
@@ -301,7 +307,7 @@ export namespace MembershipListResponse {
|
|
|
301
307
|
*/
|
|
302
308
|
export interface PromoCode {
|
|
303
309
|
/**
|
|
304
|
-
* The
|
|
310
|
+
* The unique identifier for the promo code.
|
|
305
311
|
*/
|
|
306
312
|
id: string;
|
|
307
313
|
}
|
|
@@ -311,7 +317,7 @@ export namespace MembershipListResponse {
|
|
|
311
317
|
*/
|
|
312
318
|
export interface User {
|
|
313
319
|
/**
|
|
314
|
-
* The
|
|
320
|
+
* The unique identifier for the user.
|
|
315
321
|
*/
|
|
316
322
|
id: string;
|
|
317
323
|
|
|
@@ -74,7 +74,11 @@ export type MessageListResponsesCursorPage = CursorPage<MessageListResponse>;
|
|
|
74
74
|
*/
|
|
75
75
|
export interface MessageListResponse {
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* Represents a unique identifier that is Base64 obfuscated. It is often used to
|
|
78
|
+
* refetch an object or as key for a cache. The ID type appears in a JSON response
|
|
79
|
+
* as a String; however, it is not intended to be human-readable. When expected as
|
|
80
|
+
* an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`)
|
|
81
|
+
* input value will be accepted as an ID.
|
|
78
82
|
*/
|
|
79
83
|
id: string;
|
|
80
84
|
|
|
@@ -156,7 +160,7 @@ export namespace MessageListResponse {
|
|
|
156
160
|
*/
|
|
157
161
|
export interface Option {
|
|
158
162
|
/**
|
|
159
|
-
* The
|
|
163
|
+
* The unique identifier for the poll option.
|
|
160
164
|
*/
|
|
161
165
|
id: string;
|
|
162
166
|
|
|
@@ -202,7 +206,7 @@ export namespace MessageListResponse {
|
|
|
202
206
|
*/
|
|
203
207
|
export interface User {
|
|
204
208
|
/**
|
|
205
|
-
* The
|
|
209
|
+
* The unique identifier for the user.
|
|
206
210
|
*/
|
|
207
211
|
id: string;
|
|
208
212
|
|
|
@@ -253,6 +253,8 @@ export type CardBrands =
|
|
|
253
253
|
| 'fuel_card'
|
|
254
254
|
| 'dankort'
|
|
255
255
|
| 'carnet'
|
|
256
|
+
| 'atm_card'
|
|
257
|
+
| 'china_union_payuzcard'
|
|
256
258
|
| 'unknown';
|
|
257
259
|
|
|
258
260
|
/**
|
|
@@ -277,6 +279,7 @@ export type PaymentMethodTypes =
|
|
|
277
279
|
| 'capchase_pay'
|
|
278
280
|
| 'card'
|
|
279
281
|
| 'cashapp'
|
|
282
|
+
| 'claritypay'
|
|
280
283
|
| 'coinbase'
|
|
281
284
|
| 'crypto'
|
|
282
285
|
| 'custom'
|
|
@@ -349,11 +352,12 @@ export type PaymentMethodTypes =
|
|
|
349
352
|
| 'unknown';
|
|
350
353
|
|
|
351
354
|
/**
|
|
352
|
-
*
|
|
355
|
+
* A payment represents a completed or attempted charge for a membership. Payments
|
|
356
|
+
* track the amount, status, currency, and payment method used.
|
|
353
357
|
*/
|
|
354
358
|
export interface PaymentListResponse {
|
|
355
359
|
/**
|
|
356
|
-
* The payment
|
|
360
|
+
* The unique identifier for the payment.
|
|
357
361
|
*/
|
|
358
362
|
id: string;
|
|
359
363
|
|
|
@@ -398,7 +402,7 @@ export interface PaymentListResponse {
|
|
|
398
402
|
company: PaymentListResponse.Company | null;
|
|
399
403
|
|
|
400
404
|
/**
|
|
401
|
-
* The datetime the payment was created
|
|
405
|
+
* The datetime the payment was created.
|
|
402
406
|
*/
|
|
403
407
|
created_at: string;
|
|
404
408
|
|
|
@@ -564,7 +568,7 @@ export namespace PaymentListResponse {
|
|
|
564
568
|
amount_refunded: number;
|
|
565
569
|
|
|
566
570
|
/**
|
|
567
|
-
*
|
|
571
|
+
* The datetime the application fee was created.
|
|
568
572
|
*/
|
|
569
573
|
created_at: string;
|
|
570
574
|
|
|
@@ -619,7 +623,7 @@ export namespace PaymentListResponse {
|
|
|
619
623
|
*/
|
|
620
624
|
export interface Company {
|
|
621
625
|
/**
|
|
622
|
-
* The
|
|
626
|
+
* The unique identifier for the company.
|
|
623
627
|
*/
|
|
624
628
|
id: string;
|
|
625
629
|
|
|
@@ -639,7 +643,7 @@ export namespace PaymentListResponse {
|
|
|
639
643
|
*/
|
|
640
644
|
export interface Member {
|
|
641
645
|
/**
|
|
642
|
-
* The
|
|
646
|
+
* The unique identifier for the company member.
|
|
643
647
|
*/
|
|
644
648
|
id: string;
|
|
645
649
|
|
|
@@ -654,7 +658,7 @@ export namespace PaymentListResponse {
|
|
|
654
658
|
*/
|
|
655
659
|
export interface Membership {
|
|
656
660
|
/**
|
|
657
|
-
* The
|
|
661
|
+
* The unique identifier for the membership.
|
|
658
662
|
*/
|
|
659
663
|
id: string;
|
|
660
664
|
|
|
@@ -669,7 +673,7 @@ export namespace PaymentListResponse {
|
|
|
669
673
|
*/
|
|
670
674
|
export interface PaymentMethod {
|
|
671
675
|
/**
|
|
672
|
-
* The
|
|
676
|
+
* The unique identifier for the payment token.
|
|
673
677
|
*/
|
|
674
678
|
id: string;
|
|
675
679
|
|
|
@@ -679,7 +683,7 @@ export namespace PaymentListResponse {
|
|
|
679
683
|
card: PaymentMethod.Card | null;
|
|
680
684
|
|
|
681
685
|
/**
|
|
682
|
-
* The
|
|
686
|
+
* The datetime the payment token was created.
|
|
683
687
|
*/
|
|
684
688
|
created_at: string;
|
|
685
689
|
|
|
@@ -721,7 +725,7 @@ export namespace PaymentListResponse {
|
|
|
721
725
|
*/
|
|
722
726
|
export interface Plan {
|
|
723
727
|
/**
|
|
724
|
-
* The
|
|
728
|
+
* The unique identifier for the plan.
|
|
725
729
|
*/
|
|
726
730
|
id: string;
|
|
727
731
|
}
|
|
@@ -731,7 +735,7 @@ export namespace PaymentListResponse {
|
|
|
731
735
|
*/
|
|
732
736
|
export interface Product {
|
|
733
737
|
/**
|
|
734
|
-
* The
|
|
738
|
+
* The unique identifier for the product.
|
|
735
739
|
*/
|
|
736
740
|
id: string;
|
|
737
741
|
|
|
@@ -751,12 +755,14 @@ export namespace PaymentListResponse {
|
|
|
751
755
|
*/
|
|
752
756
|
export interface PromoCode {
|
|
753
757
|
/**
|
|
754
|
-
* The
|
|
758
|
+
* The unique identifier for the promo code.
|
|
755
759
|
*/
|
|
756
760
|
id: string;
|
|
757
761
|
|
|
758
762
|
/**
|
|
759
|
-
* The amount
|
|
763
|
+
* The discount amount. Interpretation depends on promo_type: if 'percentage', this
|
|
764
|
+
* is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars
|
|
765
|
+
* off (e.g., 10.00 means $10.00 off).
|
|
760
766
|
*/
|
|
761
767
|
amount_off: number;
|
|
762
768
|
|
|
@@ -786,7 +792,7 @@ export namespace PaymentListResponse {
|
|
|
786
792
|
*/
|
|
787
793
|
export interface User {
|
|
788
794
|
/**
|
|
789
|
-
* The
|
|
795
|
+
* The unique identifier for the user.
|
|
790
796
|
*/
|
|
791
797
|
id: string;
|
|
792
798
|
|
|
@@ -907,7 +913,8 @@ export declare namespace PaymentCreateParams {
|
|
|
907
913
|
currency: Shared.Currency;
|
|
908
914
|
|
|
909
915
|
/**
|
|
910
|
-
* The interval at which the plan charges (renewal plans).
|
|
916
|
+
* The interval in days at which the plan charges (renewal plans). For example, 30
|
|
917
|
+
* for monthly billing.
|
|
911
918
|
*/
|
|
912
919
|
billing_period?: number | null;
|
|
913
920
|
|
|
@@ -917,7 +924,8 @@ export declare namespace PaymentCreateParams {
|
|
|
917
924
|
description?: string | null;
|
|
918
925
|
|
|
919
926
|
/**
|
|
920
|
-
* The
|
|
927
|
+
* The number of days until the membership expires and revokes access (expiration
|
|
928
|
+
* plans). For example, 365 for one year.
|
|
921
929
|
*/
|
|
922
930
|
expiration_days?: number | null;
|
|
923
931
|
|
|
@@ -928,7 +936,8 @@ export declare namespace PaymentCreateParams {
|
|
|
928
936
|
force_create_new_plan?: boolean | null;
|
|
929
937
|
|
|
930
938
|
/**
|
|
931
|
-
* An additional amount charged upon first purchase.
|
|
939
|
+
* An additional amount charged upon first purchase. Provided as a number in the
|
|
940
|
+
* specified currency. Eg: 10.43 for $10.43 USD.
|
|
932
941
|
*/
|
|
933
942
|
initial_price?: number | null;
|
|
934
943
|
|
|
@@ -954,7 +963,8 @@ export declare namespace PaymentCreateParams {
|
|
|
954
963
|
product_id?: string | null;
|
|
955
964
|
|
|
956
965
|
/**
|
|
957
|
-
* The amount the customer is charged every billing period.
|
|
966
|
+
* The amount the customer is charged every billing period. Provided as a number in
|
|
967
|
+
* the specified currency. Eg: 10.43 for $10.43 USD.
|
|
958
968
|
*/
|
|
959
969
|
renewal_price?: number | null;
|
|
960
970
|
|
|
@@ -55,7 +55,7 @@ export type PayoutDestinationCategory =
|
|
|
55
55
|
*/
|
|
56
56
|
export interface PayoutMethodRetrieveResponse {
|
|
57
57
|
/**
|
|
58
|
-
* The
|
|
58
|
+
* The unique identifier for the payout token.
|
|
59
59
|
*/
|
|
60
60
|
id: string;
|
|
61
61
|
|
|
@@ -71,7 +71,7 @@ export interface PayoutMethodRetrieveResponse {
|
|
|
71
71
|
company: PayoutMethodRetrieveResponse.Company | null;
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
* The
|
|
74
|
+
* The datetime the payout token was created.
|
|
75
75
|
*/
|
|
76
76
|
created_at: string;
|
|
77
77
|
|
|
@@ -109,7 +109,7 @@ export namespace PayoutMethodRetrieveResponse {
|
|
|
109
109
|
*/
|
|
110
110
|
export interface Company {
|
|
111
111
|
/**
|
|
112
|
-
* The
|
|
112
|
+
* The unique identifier for the company.
|
|
113
113
|
*/
|
|
114
114
|
id: string;
|
|
115
115
|
}
|
|
@@ -140,7 +140,7 @@ export namespace PayoutMethodRetrieveResponse {
|
|
|
140
140
|
*/
|
|
141
141
|
export interface PayoutMethodListResponse {
|
|
142
142
|
/**
|
|
143
|
-
* The
|
|
143
|
+
* The unique identifier for the payout token.
|
|
144
144
|
*/
|
|
145
145
|
id: string;
|
|
146
146
|
|
|
@@ -156,7 +156,7 @@ export interface PayoutMethodListResponse {
|
|
|
156
156
|
company: PayoutMethodListResponse.Company | null;
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
|
-
* The
|
|
159
|
+
* The datetime the payout token was created.
|
|
160
160
|
*/
|
|
161
161
|
created_at: string;
|
|
162
162
|
|
|
@@ -194,7 +194,7 @@ export namespace PayoutMethodListResponse {
|
|
|
194
194
|
*/
|
|
195
195
|
export interface Company {
|
|
196
196
|
/**
|
|
197
|
-
* The
|
|
197
|
+
* The unique identifier for the company.
|
|
198
198
|
*/
|
|
199
199
|
id: string;
|
|
200
200
|
}
|
package/src/resources/plans.ts
CHANGED
|
@@ -118,18 +118,18 @@ export class Plans extends APIResource {
|
|
|
118
118
|
export type PlanListResponsesCursorPage = CursorPage<PlanListResponse>;
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
* A plan
|
|
122
|
-
*
|
|
123
|
-
*
|
|
121
|
+
* A plan defines pricing and billing terms for a product. Each product can have
|
|
122
|
+
* multiple plans representing different pricing options, such as one-time
|
|
123
|
+
* payments, recurring subscriptions, or free trials.
|
|
124
124
|
*/
|
|
125
125
|
export interface PlanListResponse {
|
|
126
126
|
/**
|
|
127
|
-
* The
|
|
127
|
+
* The unique identifier for the plan.
|
|
128
128
|
*/
|
|
129
129
|
id: string;
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
|
-
* The interval at which the plan charges (renewal plans).
|
|
132
|
+
* The interval in days at which the plan charges (renewal plans).
|
|
133
133
|
*/
|
|
134
134
|
billing_period: number | null;
|
|
135
135
|
|
|
@@ -139,7 +139,7 @@ export interface PlanListResponse {
|
|
|
139
139
|
company: PlanListResponse.Company | null;
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
|
-
*
|
|
142
|
+
* The datetime the plan was created.
|
|
143
143
|
*/
|
|
144
144
|
created_at: string;
|
|
145
145
|
|
|
@@ -154,12 +154,15 @@ export interface PlanListResponse {
|
|
|
154
154
|
description: string | null;
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
|
-
* The
|
|
157
|
+
* The number of days until the membership expires (for expiration-based plans).
|
|
158
|
+
* For example, 365 for a one-year access pass.
|
|
158
159
|
*/
|
|
159
160
|
expiration_days: number | null;
|
|
160
161
|
|
|
161
162
|
/**
|
|
162
|
-
* The
|
|
163
|
+
* The initial purchase price in the plan's base_currency (e.g., 49.99 for $49.99).
|
|
164
|
+
* For one-time plans, this is the full price. For renewal plans, this is charged
|
|
165
|
+
* on top of the first renewal_price.
|
|
163
166
|
*/
|
|
164
167
|
initial_price: number;
|
|
165
168
|
|
|
@@ -204,7 +207,8 @@ export interface PlanListResponse {
|
|
|
204
207
|
release_method: Shared.ReleaseMethod;
|
|
205
208
|
|
|
206
209
|
/**
|
|
207
|
-
* The price
|
|
210
|
+
* The recurring price charged every billing_period in the plan's base_currency
|
|
211
|
+
* (e.g., 9.99 for $9.99/period). Zero for one-time plans.
|
|
208
212
|
*/
|
|
209
213
|
renewal_price: number;
|
|
210
214
|
|
|
@@ -229,12 +233,13 @@ export interface PlanListResponse {
|
|
|
229
233
|
trial_period_days: number | null;
|
|
230
234
|
|
|
231
235
|
/**
|
|
232
|
-
*
|
|
236
|
+
* When true, the plan has unlimited stock (stock field is ignored). When false,
|
|
237
|
+
* purchases are limited by the stock field.
|
|
233
238
|
*/
|
|
234
239
|
unlimited_stock: boolean;
|
|
235
240
|
|
|
236
241
|
/**
|
|
237
|
-
*
|
|
242
|
+
* The datetime the plan was last updated.
|
|
238
243
|
*/
|
|
239
244
|
updated_at: string;
|
|
240
245
|
|
|
@@ -250,7 +255,7 @@ export namespace PlanListResponse {
|
|
|
250
255
|
*/
|
|
251
256
|
export interface Company {
|
|
252
257
|
/**
|
|
253
|
-
* The
|
|
258
|
+
* The unique identifier for the company.
|
|
254
259
|
*/
|
|
255
260
|
id: string;
|
|
256
261
|
|
|
@@ -265,7 +270,7 @@ export namespace PlanListResponse {
|
|
|
265
270
|
*/
|
|
266
271
|
export interface Invoice {
|
|
267
272
|
/**
|
|
268
|
-
* The
|
|
273
|
+
* The unique identifier for the invoice.
|
|
269
274
|
*/
|
|
270
275
|
id: string;
|
|
271
276
|
}
|
|
@@ -301,7 +306,7 @@ export namespace PlanListResponse {
|
|
|
301
306
|
*/
|
|
302
307
|
export interface Product {
|
|
303
308
|
/**
|
|
304
|
-
* The
|
|
309
|
+
* The unique identifier for the product.
|
|
305
310
|
*/
|
|
306
311
|
id: string;
|
|
307
312
|
|
|
@@ -361,7 +366,7 @@ export interface PlanCreateParams {
|
|
|
361
366
|
/**
|
|
362
367
|
* An additional amount charged upon first purchase. Use only if a one time payment
|
|
363
368
|
* OR you want to charge an additional amount on top of the renewal price. Provided
|
|
364
|
-
* as a number in
|
|
369
|
+
* as a number in the specified currency. Eg: 10.43 for $10.43
|
|
365
370
|
*/
|
|
366
371
|
initial_price?: number | null;
|
|
367
372
|
|
|
@@ -399,7 +404,7 @@ export interface PlanCreateParams {
|
|
|
399
404
|
|
|
400
405
|
/**
|
|
401
406
|
* The amount the customer is charged every billing period. Use only if a recurring
|
|
402
|
-
* payment. Provided as a number in
|
|
407
|
+
* payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43
|
|
403
408
|
*/
|
|
404
409
|
renewal_price?: number | null;
|
|
405
410
|
|
|
@@ -424,7 +429,8 @@ export interface PlanCreateParams {
|
|
|
424
429
|
trial_period_days?: number | null;
|
|
425
430
|
|
|
426
431
|
/**
|
|
427
|
-
*
|
|
432
|
+
* When true, the plan has unlimited stock (stock field is ignored). When false,
|
|
433
|
+
* purchases are limited by the stock field.
|
|
428
434
|
*/
|
|
429
435
|
unlimited_stock?: boolean | null;
|
|
430
436
|
|
|
@@ -507,7 +513,7 @@ export namespace PlanCreateParams {
|
|
|
507
513
|
|
|
508
514
|
export interface PlanUpdateParams {
|
|
509
515
|
/**
|
|
510
|
-
* The interval at which the plan charges (renewal plans).
|
|
516
|
+
* The interval in days at which the plan charges (renewal plans).
|
|
511
517
|
*/
|
|
512
518
|
billing_period?: number | null;
|
|
513
519
|
|
|
@@ -527,7 +533,8 @@ export interface PlanUpdateParams {
|
|
|
527
533
|
description?: string | null;
|
|
528
534
|
|
|
529
535
|
/**
|
|
530
|
-
* The
|
|
536
|
+
* The number of days until the membership expires (for expiration-based plans).
|
|
537
|
+
* For example, 365 for a one-year access pass.
|
|
531
538
|
*/
|
|
532
539
|
expiration_days?: number | null;
|
|
533
540
|
|
|
@@ -537,7 +544,8 @@ export interface PlanUpdateParams {
|
|
|
537
544
|
image?: PlanUpdateParams.Image | null;
|
|
538
545
|
|
|
539
546
|
/**
|
|
540
|
-
* An additional amount charged upon first purchase.
|
|
547
|
+
* An additional amount charged upon first purchase. Provided as a number in the
|
|
548
|
+
* specified currency. Eg: 10.43 for $10.43 USD.
|
|
541
549
|
*/
|
|
542
550
|
initial_price?: number | null;
|
|
543
551
|
|
|
@@ -569,7 +577,8 @@ export interface PlanUpdateParams {
|
|
|
569
577
|
payment_method_configuration?: PlanUpdateParams.PaymentMethodConfiguration | null;
|
|
570
578
|
|
|
571
579
|
/**
|
|
572
|
-
* The amount the customer is charged every billing period.
|
|
580
|
+
* The amount the customer is charged every billing period. Provided as a number in
|
|
581
|
+
* the specified currency. Eg: 10.43 for $10.43 USD.
|
|
573
582
|
*/
|
|
574
583
|
renewal_price?: number | null;
|
|
575
584
|
|
|
@@ -580,13 +589,13 @@ export interface PlanUpdateParams {
|
|
|
580
589
|
|
|
581
590
|
/**
|
|
582
591
|
* The price to display with a strikethrough for the initial price. Provided as a
|
|
583
|
-
* number in
|
|
592
|
+
* number in the specified currency. Eg: 19.99 for $19.99
|
|
584
593
|
*/
|
|
585
594
|
strike_through_initial_price?: number | null;
|
|
586
595
|
|
|
587
596
|
/**
|
|
588
597
|
* The price to display with a strikethrough for the renewal price. Provided as a
|
|
589
|
-
* number in
|
|
598
|
+
* number in the specified currency. Eg: 19.99 for $19.99
|
|
590
599
|
*/
|
|
591
600
|
strike_through_renewal_price?: number | null;
|
|
592
601
|
|
|
@@ -601,7 +610,8 @@ export interface PlanUpdateParams {
|
|
|
601
610
|
trial_period_days?: number | null;
|
|
602
611
|
|
|
603
612
|
/**
|
|
604
|
-
*
|
|
613
|
+
* When true, the plan has unlimited stock (stock field is ignored). When false,
|
|
614
|
+
* purchases are limited by the stock field.
|
|
605
615
|
*/
|
|
606
616
|
unlimited_stock?: boolean | null;
|
|
607
617
|
|
|
@@ -248,7 +248,8 @@ export namespace ProductCreateParams {
|
|
|
248
248
|
custom_fields?: Array<PlanOptions.CustomField> | null;
|
|
249
249
|
|
|
250
250
|
/**
|
|
251
|
-
* An additional amount charged upon first purchase.
|
|
251
|
+
* An additional amount charged upon first purchase. Provided as a number in the
|
|
252
|
+
* specified currency. Eg: 10.43 for $10.43 USD.
|
|
252
253
|
*/
|
|
253
254
|
initial_price?: number | null;
|
|
254
255
|
|
|
@@ -263,7 +264,8 @@ export namespace ProductCreateParams {
|
|
|
263
264
|
release_method?: Shared.ReleaseMethod | null;
|
|
264
265
|
|
|
265
266
|
/**
|
|
266
|
-
* The amount the customer is charged every billing period.
|
|
267
|
+
* The amount the customer is charged every billing period. Provided as a number in
|
|
268
|
+
* the specified currency. Eg: 10.43 for $10.43 USD.
|
|
267
269
|
*/
|
|
268
270
|
renewal_price?: number | null;
|
|
269
271
|
|
|
@@ -99,16 +99,20 @@ export class PromoCodes extends APIResource {
|
|
|
99
99
|
export type PromoCodeListResponsesCursorPage = CursorPage<PromoCodeListResponse>;
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
|
-
*
|
|
102
|
+
* A promo code applies a discount to a plan during checkout. Promo codes can be
|
|
103
|
+
* percentage-based or fixed-amount, and can have usage limits and expiration
|
|
104
|
+
* dates.
|
|
103
105
|
*/
|
|
104
106
|
export interface PromoCode {
|
|
105
107
|
/**
|
|
106
|
-
* The
|
|
108
|
+
* The unique identifier for the promo code.
|
|
107
109
|
*/
|
|
108
110
|
id: string;
|
|
109
111
|
|
|
110
112
|
/**
|
|
111
|
-
* The amount
|
|
113
|
+
* The discount amount. Interpretation depends on promo_type: if 'percentage', this
|
|
114
|
+
* is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars
|
|
115
|
+
* off (e.g., 10.00 means $10.00 off).
|
|
112
116
|
*/
|
|
113
117
|
amount_off: number;
|
|
114
118
|
|
|
@@ -128,7 +132,7 @@ export interface PromoCode {
|
|
|
128
132
|
company: PromoCode.Company;
|
|
129
133
|
|
|
130
134
|
/**
|
|
131
|
-
* The
|
|
135
|
+
* The datetime the promo code was created.
|
|
132
136
|
*/
|
|
133
137
|
created_at: string;
|
|
134
138
|
|
|
@@ -205,7 +209,7 @@ export namespace PromoCode {
|
|
|
205
209
|
*/
|
|
206
210
|
export interface Company {
|
|
207
211
|
/**
|
|
208
|
-
* The
|
|
212
|
+
* The unique identifier for the company.
|
|
209
213
|
*/
|
|
210
214
|
id: string;
|
|
211
215
|
|
|
@@ -220,7 +224,7 @@ export namespace PromoCode {
|
|
|
220
224
|
*/
|
|
221
225
|
export interface Product {
|
|
222
226
|
/**
|
|
223
|
-
* The
|
|
227
|
+
* The unique identifier for the product.
|
|
224
228
|
*/
|
|
225
229
|
id: string;
|
|
226
230
|
|
|
@@ -242,16 +246,20 @@ export type PromoCodeStatus = 'active' | 'inactive' | 'archived';
|
|
|
242
246
|
export type PromoDuration = 'forever' | 'once' | 'repeating';
|
|
243
247
|
|
|
244
248
|
/**
|
|
245
|
-
*
|
|
249
|
+
* A promo code applies a discount to a plan during checkout. Promo codes can be
|
|
250
|
+
* percentage-based or fixed-amount, and can have usage limits and expiration
|
|
251
|
+
* dates.
|
|
246
252
|
*/
|
|
247
253
|
export interface PromoCodeListResponse {
|
|
248
254
|
/**
|
|
249
|
-
* The
|
|
255
|
+
* The unique identifier for the promo code.
|
|
250
256
|
*/
|
|
251
257
|
id: string;
|
|
252
258
|
|
|
253
259
|
/**
|
|
254
|
-
* The amount
|
|
260
|
+
* The discount amount. Interpretation depends on promo_type: if 'percentage', this
|
|
261
|
+
* is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars
|
|
262
|
+
* off (e.g., 10.00 means $10.00 off).
|
|
255
263
|
*/
|
|
256
264
|
amount_off: number;
|
|
257
265
|
|
|
@@ -266,7 +274,7 @@ export interface PromoCodeListResponse {
|
|
|
266
274
|
code: string | null;
|
|
267
275
|
|
|
268
276
|
/**
|
|
269
|
-
* The
|
|
277
|
+
* The datetime the promo code was created.
|
|
270
278
|
*/
|
|
271
279
|
created_at: string;
|
|
272
280
|
|
|
@@ -343,7 +351,7 @@ export namespace PromoCodeListResponse {
|
|
|
343
351
|
*/
|
|
344
352
|
export interface Product {
|
|
345
353
|
/**
|
|
346
|
-
* The
|
|
354
|
+
* The unique identifier for the product.
|
|
347
355
|
*/
|
|
348
356
|
id: string;
|
|
349
357
|
|
|
@@ -361,7 +369,9 @@ export type PromoCodeDeleteResponse = boolean;
|
|
|
361
369
|
|
|
362
370
|
export interface PromoCodeCreateParams {
|
|
363
371
|
/**
|
|
364
|
-
* The amount
|
|
372
|
+
* The discount amount. Interpretation depends on promo_type: if 'percentage', this
|
|
373
|
+
* is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars
|
|
374
|
+
* off (e.g., 10.00 means $10.00 off).
|
|
365
375
|
*/
|
|
366
376
|
amount_off: number;
|
|
367
377
|
|