@whop/sdk 0.0.6 → 0.0.8

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.
Files changed (119) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/client.d.mts +19 -10
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +19 -10
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/access-tokens.d.mts +48 -26
  12. package/resources/access-tokens.d.mts.map +1 -1
  13. package/resources/access-tokens.d.ts +48 -26
  14. package/resources/access-tokens.d.ts.map +1 -1
  15. package/resources/access-tokens.js +5 -5
  16. package/resources/access-tokens.mjs +5 -5
  17. package/resources/apps.d.mts +17 -1
  18. package/resources/apps.d.mts.map +1 -1
  19. package/resources/apps.d.ts +17 -1
  20. package/resources/apps.d.ts.map +1 -1
  21. package/resources/checkout-configurations.d.mts +169 -12
  22. package/resources/checkout-configurations.d.mts.map +1 -1
  23. package/resources/checkout-configurations.d.ts +169 -12
  24. package/resources/checkout-configurations.d.ts.map +1 -1
  25. package/resources/checkout-configurations.js +1 -0
  26. package/resources/checkout-configurations.js.map +1 -1
  27. package/resources/checkout-configurations.mjs +1 -0
  28. package/resources/checkout-configurations.mjs.map +1 -1
  29. package/resources/course-lessons.d.mts +199 -1
  30. package/resources/course-lessons.d.mts.map +1 -1
  31. package/resources/course-lessons.d.ts +199 -1
  32. package/resources/course-lessons.d.ts.map +1 -1
  33. package/resources/course-lessons.js +40 -0
  34. package/resources/course-lessons.js.map +1 -1
  35. package/resources/course-lessons.mjs +40 -0
  36. package/resources/course-lessons.mjs.map +1 -1
  37. package/resources/courses.d.mts +8 -0
  38. package/resources/courses.d.mts.map +1 -1
  39. package/resources/courses.d.ts +8 -0
  40. package/resources/courses.d.ts.map +1 -1
  41. package/resources/disputes.d.mts +704 -0
  42. package/resources/disputes.d.mts.map +1 -0
  43. package/resources/disputes.d.ts +704 -0
  44. package/resources/disputes.d.ts.map +1 -0
  45. package/resources/disputes.js +77 -0
  46. package/resources/disputes.js.map +1 -0
  47. package/resources/disputes.mjs +73 -0
  48. package/resources/disputes.mjs.map +1 -0
  49. package/resources/forum-posts.d.mts +13 -1
  50. package/resources/forum-posts.d.mts.map +1 -1
  51. package/resources/forum-posts.d.ts +13 -1
  52. package/resources/forum-posts.d.ts.map +1 -1
  53. package/resources/index.d.mts +8 -5
  54. package/resources/index.d.mts.map +1 -1
  55. package/resources/index.d.ts +8 -5
  56. package/resources/index.d.ts.map +1 -1
  57. package/resources/index.js +7 -1
  58. package/resources/index.js.map +1 -1
  59. package/resources/index.mjs +3 -0
  60. package/resources/index.mjs.map +1 -1
  61. package/resources/ledger-accounts.d.mts +1 -1
  62. package/resources/ledger-accounts.d.mts.map +1 -1
  63. package/resources/ledger-accounts.d.ts +1 -1
  64. package/resources/ledger-accounts.d.ts.map +1 -1
  65. package/resources/payments.d.mts +1 -1
  66. package/resources/payments.d.mts.map +1 -1
  67. package/resources/payments.d.ts +1 -1
  68. package/resources/payments.d.ts.map +1 -1
  69. package/resources/refunds.d.mts +295 -0
  70. package/resources/refunds.d.mts.map +1 -0
  71. package/resources/refunds.d.ts +295 -0
  72. package/resources/refunds.d.ts.map +1 -0
  73. package/resources/refunds.js +34 -0
  74. package/resources/refunds.js.map +1 -0
  75. package/resources/refunds.mjs +30 -0
  76. package/resources/refunds.mjs.map +1 -0
  77. package/resources/shared.d.mts +46 -5
  78. package/resources/shared.d.mts.map +1 -1
  79. package/resources/shared.d.ts +46 -5
  80. package/resources/shared.d.ts.map +1 -1
  81. package/resources/shipments.d.mts +1 -1
  82. package/resources/shipments.d.mts.map +1 -1
  83. package/resources/shipments.d.ts +1 -1
  84. package/resources/shipments.d.ts.map +1 -1
  85. package/resources/webhooks.d.mts +427 -2
  86. package/resources/webhooks.d.mts.map +1 -1
  87. package/resources/webhooks.d.ts +427 -2
  88. package/resources/webhooks.d.ts.map +1 -1
  89. package/resources/webhooks.js.map +1 -1
  90. package/resources/webhooks.mjs.map +1 -1
  91. package/resources/withdrawals.d.mts +233 -0
  92. package/resources/withdrawals.d.mts.map +1 -0
  93. package/resources/withdrawals.d.ts +233 -0
  94. package/resources/withdrawals.d.ts.map +1 -0
  95. package/resources/withdrawals.js +31 -0
  96. package/resources/withdrawals.js.map +1 -0
  97. package/resources/withdrawals.mjs +27 -0
  98. package/resources/withdrawals.mjs.map +1 -0
  99. package/src/client.ts +93 -0
  100. package/src/resources/access-tokens.ts +53 -26
  101. package/src/resources/apps.ts +21 -0
  102. package/src/resources/checkout-configurations.ts +193 -12
  103. package/src/resources/course-lessons.ts +250 -0
  104. package/src/resources/courses.ts +10 -0
  105. package/src/resources/disputes.ts +873 -0
  106. package/src/resources/forum-posts.ts +16 -0
  107. package/src/resources/index.ts +42 -0
  108. package/src/resources/ledger-accounts.ts +1 -0
  109. package/src/resources/payments.ts +1 -0
  110. package/src/resources/refunds.ts +383 -0
  111. package/src/resources/shared.ts +62 -5
  112. package/src/resources/shipments.ts +1 -1
  113. package/src/resources/webhooks.ts +522 -1
  114. package/src/resources/withdrawals.ts +361 -0
  115. package/src/version.ts +1 -1
  116. package/version.d.mts +1 -1
  117. package/version.d.ts +1 -1
  118. package/version.js +1 -1
  119. package/version.mjs +1 -1
@@ -85,6 +85,11 @@ export class ForumPosts extends APIResource {
85
85
 
86
86
  export type ForumPostListResponsesCursorPage = CursorPage<ForumPostListResponse>;
87
87
 
88
+ /**
89
+ * The visibility types for forum posts
90
+ */
91
+ export type ForumPostVisibilityType = 'members_only' | 'globally_visible';
92
+
88
93
  /**
89
94
  * Represents a post in forum
90
95
  */
@@ -234,6 +239,11 @@ export interface ForumPostCreateParams {
234
239
  * The title of the post. Only visible if paywalled.
235
240
  */
236
241
  title?: string | null;
242
+
243
+ /**
244
+ * The visibility types for forum posts
245
+ */
246
+ visibility?: ForumPostVisibilityType | null;
237
247
  }
238
248
 
239
249
  export namespace ForumPostCreateParams {
@@ -312,6 +322,11 @@ export interface ForumPostUpdateParams {
312
322
  * The title of the post. Only visible if paywalled.
313
323
  */
314
324
  title?: string | null;
325
+
326
+ /**
327
+ * The visibility types for forum posts
328
+ */
329
+ visibility?: ForumPostVisibilityType | null;
315
330
  }
316
331
 
317
332
  export namespace ForumPostUpdateParams {
@@ -374,6 +389,7 @@ export interface ForumPostListParams extends CursorPageParams {
374
389
 
375
390
  export declare namespace ForumPosts {
376
391
  export {
392
+ type ForumPostVisibilityType as ForumPostVisibilityType,
377
393
  type ForumPostListResponse as ForumPostListResponse,
378
394
  type ForumPostListResponsesCursorPage as ForumPostListResponsesCursorPage,
379
395
  type ForumPostCreateParams as ForumPostCreateParams,
@@ -11,6 +11,7 @@ export {
11
11
  } from './app-builds';
12
12
  export {
13
13
  Apps,
14
+ type AppType,
14
15
  type AppListResponse,
15
16
  type AppCreateParams,
16
17
  type AppUpdateParams,
@@ -33,6 +34,7 @@ export {
33
34
  } from './chat-channels';
34
35
  export {
35
36
  CheckoutConfigurations,
37
+ type CheckoutModes,
36
38
  type CheckoutConfigurationListResponse,
37
39
  type CheckoutConfigurationCreateParams,
38
40
  type CheckoutConfigurationListParams,
@@ -68,9 +70,13 @@ export {
68
70
  type LessonVisibilities,
69
71
  type CourseLessonListResponse,
70
72
  type CourseLessonDeleteResponse,
73
+ type CourseLessonMarkAsCompletedResponse,
74
+ type CourseLessonStartResponse,
75
+ type CourseLessonSubmitAssessmentResponse,
71
76
  type CourseLessonCreateParams,
72
77
  type CourseLessonUpdateParams,
73
78
  type CourseLessonListParams,
79
+ type CourseLessonSubmitAssessmentParams,
74
80
  type CourseLessonListResponsesCursorPage,
75
81
  } from './course-lessons';
76
82
  export {
@@ -92,6 +98,15 @@ export {
92
98
  type CourseListParams,
93
99
  type CourseListResponsesCursorPage,
94
100
  } from './courses';
101
+ export {
102
+ Disputes,
103
+ type Dispute,
104
+ type DisputeStatuses,
105
+ type DisputeListResponse,
106
+ type DisputeListParams,
107
+ type DisputeUpdateEvidenceParams,
108
+ type DisputeListResponsesCursorPage,
109
+ } from './disputes';
95
110
  export {
96
111
  Entries,
97
112
  type EntryListResponse,
@@ -113,6 +128,7 @@ export {
113
128
  } from './experiences';
114
129
  export {
115
130
  ForumPosts,
131
+ type ForumPostVisibilityType,
116
132
  type ForumPostListResponse,
117
133
  type ForumPostCreateParams,
118
134
  type ForumPostUpdateParams,
@@ -206,6 +222,17 @@ export {
206
222
  type ReactionListParams,
207
223
  type ReactionListResponsesCursorPage,
208
224
  } from './reactions';
225
+ export {
226
+ Refunds,
227
+ type PaymentProvider,
228
+ type RefundReferenceStatus,
229
+ type RefundReferenceType,
230
+ type RefundStatus,
231
+ type RefundRetrieveResponse,
232
+ type RefundListResponse,
233
+ type RefundListParams,
234
+ type RefundListResponsesCursorPage,
235
+ } from './refunds';
209
236
  export {
210
237
  Reviews,
211
238
  type ReviewStatus,
@@ -257,5 +284,20 @@ export {
257
284
  type PaymentSucceededWebhookEvent,
258
285
  type PaymentFailedWebhookEvent,
259
286
  type PaymentPendingWebhookEvent,
287
+ type DisputeCreatedWebhookEvent,
288
+ type DisputeUpdatedWebhookEvent,
289
+ type RefundCreatedWebhookEvent,
290
+ type RefundUpdatedWebhookEvent,
260
291
  type UnwrapWebhookEvent,
261
292
  } from './webhooks';
293
+ export {
294
+ Withdrawals,
295
+ type WithdrawalFeeTypes,
296
+ type WithdrawalSpeeds,
297
+ type WithdrawalStatus,
298
+ type WithdrawalTypes,
299
+ type WithdrawalRetrieveResponse,
300
+ type WithdrawalListResponse,
301
+ type WithdrawalListParams,
302
+ type WithdrawalListResponsesCursorPage,
303
+ } from './withdrawals';
@@ -38,6 +38,7 @@ export interface LedgerAccountRetrieveResponse {
38
38
  */
39
39
  ledger_account_audit_status:
40
40
  | 'pending'
41
+ | 'pending_ai_review'
41
42
  | 'approved'
42
43
  | 'reserves_imposed'
43
44
  | 'suspended'
@@ -171,6 +171,7 @@ export type CardBrands =
171
171
  | 'rupay'
172
172
  | 'jcbrupay'
173
173
  | 'elo'
174
+ | 'maestro'
174
175
  | 'unknown';
175
176
 
176
177
  /**
@@ -0,0 +1,383 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import * as PaymentsAPI from './payments';
5
+ import * as Shared from './shared';
6
+ import { APIPromise } from '../core/api-promise';
7
+ import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
8
+ import { RequestOptions } from '../internal/request-options';
9
+ import { path } from '../internal/utils/path';
10
+
11
+ export class Refunds extends APIResource {
12
+ /**
13
+ * Retrieves a Refund by ID
14
+ *
15
+ * Required permissions:
16
+ *
17
+ * - `payment:basic:read`
18
+ * - `member:email:read`
19
+ * - `member:basic:read`
20
+ * - `member:phone:read`
21
+ */
22
+ retrieve(id: string, options?: RequestOptions): APIPromise<RefundRetrieveResponse> {
23
+ return this._client.get(path`/refunds/${id}`, options);
24
+ }
25
+
26
+ /**
27
+ * Lists Refunds for a payment.
28
+ *
29
+ * Required permissions:
30
+ *
31
+ * - `payment:basic:read`
32
+ */
33
+ list(
34
+ query: RefundListParams,
35
+ options?: RequestOptions,
36
+ ): PagePromise<RefundListResponsesCursorPage, RefundListResponse> {
37
+ return this._client.getAPIList('/refunds', CursorPage<RefundListResponse>, { query, ...options });
38
+ }
39
+ }
40
+
41
+ export type RefundListResponsesCursorPage = CursorPage<RefundListResponse>;
42
+
43
+ /**
44
+ * The different payment providers.
45
+ */
46
+ export type PaymentProvider =
47
+ | 'stripe'
48
+ | 'coinbase'
49
+ | 'paypal'
50
+ | 'apple'
51
+ | 'sezzle'
52
+ | 'splitit'
53
+ | 'platform_balance'
54
+ | 'multi_psp';
55
+
56
+ /**
57
+ * The status of the refund reference.
58
+ */
59
+ export type RefundReferenceStatus = 'available' | 'pending' | 'unavailable';
60
+
61
+ /**
62
+ * The type of refund reference that was made available by the payment provider.
63
+ */
64
+ export type RefundReferenceType =
65
+ | 'acquirer_reference_number'
66
+ | 'retrieval_reference_number'
67
+ | 'system_trace_audit_number';
68
+
69
+ /**
70
+ * The different statuses for a Refund object
71
+ */
72
+ export type RefundStatus = 'pending' | 'requires_action' | 'succeeded' | 'failed' | 'canceled';
73
+
74
+ /**
75
+ * An object representing a refund made on a payment.
76
+ */
77
+ export interface RefundRetrieveResponse {
78
+ /**
79
+ * The ID of the refund.
80
+ */
81
+ id: string;
82
+
83
+ /**
84
+ * The amount of the refund.
85
+ */
86
+ amount: number;
87
+
88
+ /**
89
+ * The time the refund was created.
90
+ */
91
+ created_at: string;
92
+
93
+ /**
94
+ * The currency of the refund.
95
+ */
96
+ currency: Shared.Currency;
97
+
98
+ /**
99
+ * The payment associated with the refund.
100
+ */
101
+ payment: RefundRetrieveResponse.Payment | null;
102
+
103
+ /**
104
+ * The provider of the refund.
105
+ */
106
+ provider: PaymentProvider;
107
+
108
+ /**
109
+ * The time the refund was created by the provider.
110
+ */
111
+ provider_created_at: string | null;
112
+
113
+ /**
114
+ * The status of the refund reference.
115
+ */
116
+ reference_status: RefundReferenceStatus | null;
117
+
118
+ /**
119
+ * The type of refund reference that was made available by the payment provider.
120
+ */
121
+ reference_type: RefundReferenceType | null;
122
+
123
+ /**
124
+ * The value of the reference.
125
+ */
126
+ reference_value: string | null;
127
+
128
+ /**
129
+ * The status of the refund.
130
+ */
131
+ status: RefundStatus;
132
+ }
133
+
134
+ export namespace RefundRetrieveResponse {
135
+ /**
136
+ * The payment associated with the refund.
137
+ */
138
+ export interface Payment {
139
+ /**
140
+ * The payment ID
141
+ */
142
+ id: string;
143
+
144
+ /**
145
+ * The reason why a specific payment was billed
146
+ */
147
+ billing_reason: PaymentsAPI.BillingReasons | null;
148
+
149
+ /**
150
+ * Possible card brands that a payment token can have
151
+ */
152
+ card_brand: PaymentsAPI.CardBrands | null;
153
+
154
+ /**
155
+ * The last 4 digits of the card used to make the payment.
156
+ */
157
+ card_last4: string | null;
158
+
159
+ /**
160
+ * The datetime the payment was created
161
+ */
162
+ created_at: string;
163
+
164
+ /**
165
+ * The available currencies on the platform
166
+ */
167
+ currency: Shared.Currency | null;
168
+
169
+ /**
170
+ * When an alert came in that this transaction will be disputed
171
+ */
172
+ dispute_alerted_at: string | null;
173
+
174
+ /**
175
+ * The member attached to this payment.
176
+ */
177
+ member: Payment.Member | null;
178
+
179
+ /**
180
+ * The membership attached to this payment.
181
+ */
182
+ membership: Payment.Membership | null;
183
+
184
+ /**
185
+ * The datetime the payment was paid
186
+ */
187
+ paid_at: string | null;
188
+
189
+ /**
190
+ * The different types of payment methods that can be used.
191
+ */
192
+ payment_method_type: PaymentsAPI.PaymentMethodTypes | null;
193
+
194
+ /**
195
+ * The subtotal to show to the creator (excluding buyer fees).
196
+ */
197
+ subtotal: number | null;
198
+
199
+ /**
200
+ * The total to show to the creator (excluding buyer fees).
201
+ */
202
+ total: number | null;
203
+
204
+ /**
205
+ * The total in USD to show to the creator (excluding buyer fees).
206
+ */
207
+ usd_total: number | null;
208
+
209
+ /**
210
+ * The user that made this payment.
211
+ */
212
+ user: Payment.User | null;
213
+ }
214
+
215
+ export namespace Payment {
216
+ /**
217
+ * The member attached to this payment.
218
+ */
219
+ export interface Member {
220
+ /**
221
+ * The ID of the member
222
+ */
223
+ id: string;
224
+
225
+ /**
226
+ * The phone number for the member, if available.
227
+ */
228
+ phone: string | null;
229
+ }
230
+
231
+ /**
232
+ * The membership attached to this payment.
233
+ */
234
+ export interface Membership {
235
+ /**
236
+ * The internal ID of the membership.
237
+ */
238
+ id: string;
239
+
240
+ /**
241
+ * The state of the membership.
242
+ */
243
+ status: Shared.MembershipStatus;
244
+ }
245
+
246
+ /**
247
+ * The user that made this payment.
248
+ */
249
+ export interface User {
250
+ /**
251
+ * The internal ID of the user.
252
+ */
253
+ id: string;
254
+
255
+ /**
256
+ * The email of the user
257
+ */
258
+ email: string | null;
259
+
260
+ /**
261
+ * The name of the user from their Whop account.
262
+ */
263
+ name: string | null;
264
+
265
+ /**
266
+ * The username of the user from their Whop account.
267
+ */
268
+ username: string;
269
+ }
270
+ }
271
+ }
272
+
273
+ /**
274
+ * An object representing a refund made on a payment.
275
+ */
276
+ export interface RefundListResponse {
277
+ /**
278
+ * The ID of the refund.
279
+ */
280
+ id: string;
281
+
282
+ /**
283
+ * The amount of the refund.
284
+ */
285
+ amount: number;
286
+
287
+ /**
288
+ * The time the refund was created.
289
+ */
290
+ created_at: string;
291
+
292
+ /**
293
+ * The currency of the refund.
294
+ */
295
+ currency: Shared.Currency;
296
+
297
+ /**
298
+ * The payment associated with the refund.
299
+ */
300
+ payment: RefundListResponse.Payment | null;
301
+
302
+ /**
303
+ * The provider of the refund.
304
+ */
305
+ provider: PaymentProvider;
306
+
307
+ /**
308
+ * The time the refund was created by the provider.
309
+ */
310
+ provider_created_at: string | null;
311
+
312
+ /**
313
+ * The status of the refund reference.
314
+ */
315
+ reference_status: RefundReferenceStatus | null;
316
+
317
+ /**
318
+ * The type of refund reference that was made available by the payment provider.
319
+ */
320
+ reference_type: RefundReferenceType | null;
321
+
322
+ /**
323
+ * The value of the reference.
324
+ */
325
+ reference_value: string | null;
326
+
327
+ /**
328
+ * The status of the refund.
329
+ */
330
+ status: RefundStatus;
331
+ }
332
+
333
+ export namespace RefundListResponse {
334
+ /**
335
+ * The payment associated with the refund.
336
+ */
337
+ export interface Payment {
338
+ /**
339
+ * The payment ID
340
+ */
341
+ id: string;
342
+ }
343
+ }
344
+
345
+ export interface RefundListParams extends CursorPageParams {
346
+ /**
347
+ * The ID of the payment to list refunds for
348
+ */
349
+ payment_id: string;
350
+
351
+ /**
352
+ * Returns the elements in the list that come before the specified cursor.
353
+ */
354
+ before?: string | null;
355
+
356
+ /**
357
+ * The direction of the sort.
358
+ */
359
+ direction?: Shared.Direction | null;
360
+
361
+ /**
362
+ * Returns the first _n_ elements from the list.
363
+ */
364
+ first?: number | null;
365
+
366
+ /**
367
+ * Returns the last _n_ elements from the list.
368
+ */
369
+ last?: number | null;
370
+ }
371
+
372
+ export declare namespace Refunds {
373
+ export {
374
+ type PaymentProvider as PaymentProvider,
375
+ type RefundReferenceStatus as RefundReferenceStatus,
376
+ type RefundReferenceType as RefundReferenceType,
377
+ type RefundStatus as RefundStatus,
378
+ type RefundRetrieveResponse as RefundRetrieveResponse,
379
+ type RefundListResponse as RefundListResponse,
380
+ type RefundListResponsesCursorPage as RefundListResponsesCursorPage,
381
+ type RefundListParams as RefundListParams,
382
+ };
383
+ }
@@ -1,6 +1,8 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import * as Shared from './shared';
4
+ import * as AppsAPI from './apps';
5
+ import * as CheckoutConfigurationsAPI from './checkout-configurations';
4
6
  import * as PaymentsAPI from './payments';
5
7
  import { CursorPage } from '../core/pagination';
6
8
 
@@ -29,6 +31,11 @@ export interface App {
29
31
  */
30
32
  api_key: App.APIKey | null;
31
33
 
34
+ /**
35
+ * The type of end-user an app is built for
36
+ */
37
+ app_type: AppsAPI.AppType;
38
+
32
39
  /**
33
40
  * The base url of the app
34
41
  */
@@ -438,12 +445,24 @@ export interface CheckoutConfiguration {
438
445
  /**
439
446
  * The metadata to use for the checkout configuration
440
447
  */
441
- metadata: { [key: string]: unknown };
448
+ metadata: { [key: string]: unknown } | null;
449
+
450
+ /**
451
+ * The mode of the checkout session.
452
+ */
453
+ mode: CheckoutConfigurationsAPI.CheckoutModes;
454
+
455
+ /**
456
+ * The explicit payment method configuration for the session, if any. This
457
+ * currently only works in 'setup' mode. Use the plan's
458
+ * payment_method_configuration for payment method.
459
+ */
460
+ payment_method_configuration: CheckoutConfiguration.PaymentMethodConfiguration | null;
442
461
 
443
462
  /**
444
463
  * The plan to use for the checkout configuration
445
464
  */
446
- plan: CheckoutConfiguration.Plan;
465
+ plan: CheckoutConfiguration.Plan | null;
447
466
 
448
467
  /**
449
468
  * A URL you can send to customers to complete a checkout. It looks like
@@ -458,6 +477,34 @@ export interface CheckoutConfiguration {
458
477
  }
459
478
 
460
479
  export namespace CheckoutConfiguration {
480
+ /**
481
+ * The explicit payment method configuration for the session, if any. This
482
+ * currently only works in 'setup' mode. Use the plan's
483
+ * payment_method_configuration for payment method.
484
+ */
485
+ export interface PaymentMethodConfiguration {
486
+ /**
487
+ * An array of payment method identifiers that are explicitly disabled. Only
488
+ * applies if the include_platform_defaults is true.
489
+ */
490
+ disabled: Array<PaymentsAPI.PaymentMethodTypes>;
491
+
492
+ /**
493
+ * An array of payment method identifiers that are explicitly enabled. This means
494
+ * these payment methods will be shown on checkout. Example use case is to only
495
+ * enable a specific payment method like cashapp, or extending the platform
496
+ * defaults with additional methods.
497
+ */
498
+ enabled: Array<PaymentsAPI.PaymentMethodTypes>;
499
+
500
+ /**
501
+ * Whether Whop's platform default payment method enablement settings are included
502
+ * in this configuration. The full list of default payment methods can be found in
503
+ * the documentation at docs.whop.com/payments.
504
+ */
505
+ include_platform_defaults: boolean;
506
+ }
507
+
461
508
  /**
462
509
  * The plan to use for the checkout configuration
463
510
  */
@@ -649,7 +696,16 @@ export namespace Company {
649
696
  /**
650
697
  * The website
651
698
  */
652
- website: 'x' | 'instagram' | 'facebook' | 'tiktok' | 'youtube' | 'linkedin' | 'twitch' | 'website';
699
+ website:
700
+ | 'x'
701
+ | 'instagram'
702
+ | 'facebook'
703
+ | 'tiktok'
704
+ | 'youtube'
705
+ | 'linkedin'
706
+ | 'twitch'
707
+ | 'website'
708
+ | 'custom';
653
709
  }
654
710
  }
655
711
 
@@ -911,7 +967,8 @@ export type Currency =
911
967
  | 'ttd'
912
968
  | 'uzs'
913
969
  | 'rub'
914
- | 'btc';
970
+ | 'btc'
971
+ | 'cny';
915
972
 
916
973
  /**
917
974
  * The different types of custom CTAs that can be selected.
@@ -2970,7 +3027,7 @@ export interface Shipment {
2970
3027
  /**
2971
3028
  * The payment of the shipment
2972
3029
  */
2973
- payment: Shipment.Payment;
3030
+ payment: Shipment.Payment | null;
2974
3031
 
2975
3032
  /**
2976
3033
  * The service of the shipment
@@ -101,7 +101,7 @@ export interface ShipmentListResponse {
101
101
  /**
102
102
  * The payment of the shipment
103
103
  */
104
- payment: ShipmentListResponse.Payment;
104
+ payment: ShipmentListResponse.Payment | null;
105
105
 
106
106
  /**
107
107
  * The service of the shipment