@whop/sdk 0.0.3 → 0.0.5

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 (165) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/client.d.mts +14 -8
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +14 -8
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +8 -2
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/access-tokens.d.mts +58 -0
  12. package/resources/access-tokens.d.mts.map +1 -0
  13. package/resources/access-tokens.d.ts +58 -0
  14. package/resources/access-tokens.d.ts.map +1 -0
  15. package/resources/access-tokens.js +25 -0
  16. package/resources/access-tokens.js.map +1 -0
  17. package/resources/access-tokens.mjs +21 -0
  18. package/resources/access-tokens.mjs.map +1 -0
  19. package/resources/app-builds.d.mts +16 -13
  20. package/resources/app-builds.d.mts.map +1 -1
  21. package/resources/app-builds.d.ts +16 -13
  22. package/resources/app-builds.d.ts.map +1 -1
  23. package/resources/app-builds.js +1 -1
  24. package/resources/app-builds.mjs +1 -1
  25. package/resources/apps.d.mts +15 -10
  26. package/resources/apps.d.mts.map +1 -1
  27. package/resources/apps.d.ts +15 -10
  28. package/resources/apps.d.ts.map +1 -1
  29. package/resources/checkout-configurations.d.mts +221 -183
  30. package/resources/checkout-configurations.d.mts.map +1 -1
  31. package/resources/checkout-configurations.d.ts +221 -183
  32. package/resources/checkout-configurations.d.ts.map +1 -1
  33. package/resources/checkout-configurations.js +4 -20
  34. package/resources/checkout-configurations.js.map +1 -1
  35. package/resources/checkout-configurations.mjs +4 -20
  36. package/resources/checkout-configurations.mjs.map +1 -1
  37. package/resources/companies.d.mts +157 -0
  38. package/resources/companies.d.mts.map +1 -1
  39. package/resources/companies.d.ts +157 -0
  40. package/resources/companies.d.ts.map +1 -1
  41. package/resources/companies.js +22 -0
  42. package/resources/companies.js.map +1 -1
  43. package/resources/companies.mjs +22 -0
  44. package/resources/companies.mjs.map +1 -1
  45. package/resources/course-lesson-interactions.d.mts +2 -2
  46. package/resources/course-lesson-interactions.d.ts +2 -2
  47. package/resources/course-lesson-interactions.js +2 -2
  48. package/resources/course-lesson-interactions.mjs +2 -2
  49. package/resources/course-lessons.d.mts +184 -24
  50. package/resources/course-lessons.d.mts.map +1 -1
  51. package/resources/course-lessons.d.ts +184 -24
  52. package/resources/course-lessons.d.ts.map +1 -1
  53. package/resources/course-students.d.mts +187 -0
  54. package/resources/course-students.d.mts.map +1 -0
  55. package/resources/course-students.d.ts +187 -0
  56. package/resources/course-students.d.ts.map +1 -0
  57. package/resources/course-students.js +36 -0
  58. package/resources/course-students.js.map +1 -0
  59. package/resources/course-students.mjs +32 -0
  60. package/resources/course-students.mjs.map +1 -0
  61. package/resources/courses.d.mts +85 -21
  62. package/resources/courses.d.mts.map +1 -1
  63. package/resources/courses.d.ts +85 -21
  64. package/resources/courses.d.ts.map +1 -1
  65. package/resources/entries.d.mts +2 -2
  66. package/resources/entries.d.ts +2 -2
  67. package/resources/experiences.d.mts +15 -10
  68. package/resources/experiences.d.mts.map +1 -1
  69. package/resources/experiences.d.ts +15 -10
  70. package/resources/experiences.d.ts.map +1 -1
  71. package/resources/forum-posts.d.mts +29 -19
  72. package/resources/forum-posts.d.mts.map +1 -1
  73. package/resources/forum-posts.d.ts +29 -19
  74. package/resources/forum-posts.d.ts.map +1 -1
  75. package/resources/index.d.mts +6 -4
  76. package/resources/index.d.mts.map +1 -1
  77. package/resources/index.d.ts +6 -4
  78. package/resources/index.d.ts.map +1 -1
  79. package/resources/index.js +5 -1
  80. package/resources/index.js.map +1 -1
  81. package/resources/index.mjs +3 -1
  82. package/resources/index.mjs.map +1 -1
  83. package/resources/invoices.d.mts +539 -167
  84. package/resources/invoices.d.mts.map +1 -1
  85. package/resources/invoices.d.ts +539 -167
  86. package/resources/invoices.d.ts.map +1 -1
  87. package/resources/invoices.js +2 -24
  88. package/resources/invoices.js.map +1 -1
  89. package/resources/invoices.mjs +2 -24
  90. package/resources/invoices.mjs.map +1 -1
  91. package/resources/ledger-accounts.d.mts +1 -1
  92. package/resources/ledger-accounts.d.ts +1 -1
  93. package/resources/ledger-accounts.js +1 -1
  94. package/resources/ledger-accounts.mjs +1 -1
  95. package/resources/members.d.mts +11 -11
  96. package/resources/members.d.mts.map +1 -1
  97. package/resources/members.d.ts +11 -11
  98. package/resources/members.d.ts.map +1 -1
  99. package/resources/memberships.d.mts +4 -4
  100. package/resources/memberships.d.mts.map +1 -1
  101. package/resources/memberships.d.ts +4 -4
  102. package/resources/memberships.d.ts.map +1 -1
  103. package/resources/messages.d.mts +29 -19
  104. package/resources/messages.d.mts.map +1 -1
  105. package/resources/messages.d.ts +29 -19
  106. package/resources/messages.d.ts.map +1 -1
  107. package/resources/payments.d.mts +10 -3
  108. package/resources/payments.d.mts.map +1 -1
  109. package/resources/payments.d.ts +10 -3
  110. package/resources/payments.d.ts.map +1 -1
  111. package/resources/plans.d.mts +118 -20
  112. package/resources/plans.d.mts.map +1 -1
  113. package/resources/plans.d.ts +118 -20
  114. package/resources/plans.d.ts.map +1 -1
  115. package/resources/plans.js.map +1 -1
  116. package/resources/plans.mjs.map +1 -1
  117. package/resources/products.d.mts +20 -15
  118. package/resources/products.d.mts.map +1 -1
  119. package/resources/products.d.ts +20 -15
  120. package/resources/products.d.ts.map +1 -1
  121. package/resources/promo-codes.d.mts +4 -4
  122. package/resources/promo-codes.d.ts +4 -4
  123. package/resources/shared.d.mts +69 -20
  124. package/resources/shared.d.mts.map +1 -1
  125. package/resources/shared.d.ts +69 -20
  126. package/resources/shared.d.ts.map +1 -1
  127. package/resources/transfers.d.mts +12 -0
  128. package/resources/transfers.d.mts.map +1 -1
  129. package/resources/transfers.d.ts +12 -0
  130. package/resources/transfers.d.ts.map +1 -1
  131. package/resources/users.d.mts +3 -0
  132. package/resources/users.d.mts.map +1 -1
  133. package/resources/users.d.ts +3 -0
  134. package/resources/users.d.ts.map +1 -1
  135. package/src/client.ts +45 -10
  136. package/src/resources/access-tokens.ts +72 -0
  137. package/src/resources/app-builds.ts +19 -14
  138. package/src/resources/apps.ts +16 -11
  139. package/src/resources/checkout-configurations.ts +245 -199
  140. package/src/resources/companies.ts +196 -0
  141. package/src/resources/course-lesson-interactions.ts +2 -2
  142. package/src/resources/course-lessons.ts +223 -24
  143. package/src/resources/course-students.ts +238 -0
  144. package/src/resources/courses.ts +104 -22
  145. package/src/resources/entries.ts +2 -2
  146. package/src/resources/experiences.ts +19 -11
  147. package/src/resources/forum-posts.ts +35 -21
  148. package/src/resources/index.ts +17 -2
  149. package/src/resources/invoices.ts +630 -171
  150. package/src/resources/ledger-accounts.ts +1 -1
  151. package/src/resources/members.ts +12 -12
  152. package/src/resources/memberships.ts +5 -5
  153. package/src/resources/messages.ts +35 -21
  154. package/src/resources/payments.ts +10 -3
  155. package/src/resources/plans.ts +130 -20
  156. package/src/resources/products.ts +24 -16
  157. package/src/resources/promo-codes.ts +4 -4
  158. package/src/resources/shared.ts +70 -20
  159. package/src/resources/transfers.ts +10 -0
  160. package/src/resources/users.ts +3 -0
  161. package/src/version.ts +1 -1
  162. package/version.d.mts +1 -1
  163. package/version.d.ts +1 -1
  164. package/version.js +1 -1
  165. package/version.mjs +1 -1
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
+ import * as PaymentsAPI from './payments';
4
5
  import * as Shared from './shared';
5
6
  import { APIPromise } from '../core/api-promise';
6
7
  import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
@@ -21,11 +22,13 @@ export class CheckoutConfigurations extends APIResource {
21
22
  * @example
22
23
  * ```ts
23
24
  * const checkoutConfiguration =
24
- * await client.checkoutConfigurations.create();
25
+ * await client.checkoutConfigurations.create({
26
+ * plan_id: 'plan_xxxxxxxxxxxxx',
27
+ * });
25
28
  * ```
26
29
  */
27
30
  create(
28
- body: CheckoutConfigurationCreateParams | null | undefined = {},
31
+ body: CheckoutConfigurationCreateParams,
29
32
  options?: RequestOptions,
30
33
  ): APIPromise<Shared.CheckoutConfiguration> {
31
34
  return this._client.post('/checkout_configurations', { body, ...options });
@@ -37,14 +40,6 @@ export class CheckoutConfigurations extends APIResource {
37
40
  * Required permissions:
38
41
  *
39
42
  * - `checkout_configuration:basic:read`
40
- *
41
- * @example
42
- * ```ts
43
- * const checkoutConfiguration =
44
- * await client.checkoutConfigurations.retrieve(
45
- * 'ch_xxxxxxxxxxxxxxx',
46
- * );
47
- * ```
48
43
  */
49
44
  retrieve(id: string, options?: RequestOptions): APIPromise<Shared.CheckoutConfiguration> {
50
45
  return this._client.get(path`/checkout_configurations/${id}`, options);
@@ -56,16 +51,6 @@ export class CheckoutConfigurations extends APIResource {
56
51
  * Required permissions:
57
52
  *
58
53
  * - `checkout_configuration:basic:read`
59
- *
60
- * @example
61
- * ```ts
62
- * // Automatically fetches more pages as needed.
63
- * for await (const checkoutConfigurationListResponse of client.checkoutConfigurations.list(
64
- * { company_id: 'biz_xxxxxxxxxxxxxx' },
65
- * )) {
66
- * // ...
67
- * }
68
- * ```
69
54
  */
70
55
  list(
71
56
  query: CheckoutConfigurationListParams,
@@ -182,269 +167,330 @@ export namespace CheckoutConfigurationListResponse {
182
167
  }
183
168
  }
184
169
 
185
- export interface CheckoutConfigurationCreateParams {
186
- /**
187
- * The affiliate code to use for the checkout configuration
188
- */
189
- affiliate_code?: string | null;
190
-
191
- /**
192
- * The metadata to use for the checkout configuration
193
- */
194
- metadata?: { [key: string]: unknown } | null;
195
-
196
- /**
197
- * Pass this object to create a new plan for this checkout configuration
198
- */
199
- plan?: CheckoutConfigurationCreateParams.Plan | null;
200
-
201
- /**
202
- * The ID of the plan to use for the checkout configuration
203
- */
204
- plan_id?: string | null;
205
-
206
- /**
207
- * The URL to redirect the user to after the checkout configuration is created
208
- */
209
- redirect_url?: string | null;
210
- }
211
-
212
- export namespace CheckoutConfigurationCreateParams {
213
- /**
214
- * Pass this object to create a new plan for this checkout configuration
215
- */
216
- export interface Plan {
217
- /**
218
- * The company the plan should be created for.
219
- */
220
- company_id: string;
221
-
222
- /**
223
- * The interval at which the plan charges (renewal plans).
224
- */
225
- billing_period?: number | null;
226
-
227
- /**
228
- * The available currencies on the platform
229
- */
230
- currency?: Shared.Currency | null;
231
-
232
- /**
233
- * An array of custom field objects.
234
- */
235
- custom_fields?: Array<Plan.CustomField> | null;
236
-
237
- /**
238
- * The description of the plan.
239
- */
240
- description?: string | null;
241
-
242
- /**
243
- * The interval at which the plan charges (expiration plans).
244
- */
245
- expiration_days?: number | null;
246
-
247
- /**
248
- * Whether to force the creation of a new plan even if one with the same attributes
249
- * already exists.
250
- */
251
- force_create_new_plan?: boolean | null;
252
-
253
- /**
254
- * An image for the plan. This will be visible on the product page to customers.
255
- */
256
- image?: Plan.Image | null;
257
-
258
- /**
259
- * An additional amount charged upon first purchase.
260
- */
261
- initial_price?: number | null;
262
-
263
- /**
264
- * A personal description or notes section for the business.
265
- */
266
- internal_notes?: string | null;
170
+ export type CheckoutConfigurationCreateParams =
171
+ | CheckoutConfigurationCreateParams.CreateCheckoutSessionInputWithPlan
172
+ | CheckoutConfigurationCreateParams.CreateCheckoutSessionInputWithPlanID;
267
173
 
174
+ export declare namespace CheckoutConfigurationCreateParams {
175
+ export interface CreateCheckoutSessionInputWithPlan {
268
176
  /**
269
- * Whether or not the tax is included in a plan's price (or if it hasn't been set
270
- * up)
177
+ * Pass this object to create a new plan for this checkout configuration
271
178
  */
272
- override_tax_type?: Shared.TaxType | null;
179
+ plan: CreateCheckoutSessionInputWithPlan.Plan;
273
180
 
274
181
  /**
275
- * The type of plan that can be attached to an access pass
182
+ * The affiliate code to use for the checkout configuration
276
183
  */
277
- plan_type?: Shared.PlanType | null;
184
+ affiliate_code?: string | null;
278
185
 
279
186
  /**
280
- * Pass this object to create a new product for this plan. We will use the product
281
- * external identifier to find or create an existing product.
187
+ * The metadata to use for the checkout configuration
282
188
  */
283
- product?: Plan.Product | null;
189
+ metadata?: { [key: string]: unknown } | null;
284
190
 
285
191
  /**
286
- * The product the plan is related to. Either this or product is required.
192
+ * The URL to redirect the user to after the checkout configuration is created
287
193
  */
288
- product_id?: string | null;
289
-
290
- /**
291
- * The methods of how a plan can be released.
292
- */
293
- release_method?: Shared.ReleaseMethod | null;
294
-
295
- /**
296
- * The amount the customer is charged every billing period.
297
- */
298
- renewal_price?: number | null;
299
-
300
- /**
301
- * The title of the plan. This will be visible on the product page to customers.
302
- */
303
- title?: string | null;
194
+ redirect_url?: string | null;
195
+ }
304
196
 
197
+ export namespace CreateCheckoutSessionInputWithPlan {
305
198
  /**
306
- * The number of free trial days added before a renewal plan.
199
+ * Pass this object to create a new plan for this checkout configuration
307
200
  */
308
- trial_period_days?: number | null;
201
+ export interface Plan {
202
+ /**
203
+ * The company the plan should be created for.
204
+ */
205
+ company_id: string;
309
206
 
310
- /**
311
- * Visibility of a resource
312
- */
313
- visibility?: Shared.Visibility | null;
314
- }
207
+ /**
208
+ * The interval at which the plan charges (renewal plans).
209
+ */
210
+ billing_period?: number | null;
315
211
 
316
- export namespace Plan {
317
- export interface CustomField {
318
212
  /**
319
- * The type of the custom field.
213
+ * The available currencies on the platform
320
214
  */
321
- field_type: 'text';
215
+ currency?: Shared.Currency | null;
322
216
 
323
217
  /**
324
- * The name of the custom field.
218
+ * An array of custom field objects.
325
219
  */
326
- name: string;
220
+ custom_fields?: Array<Plan.CustomField> | null;
327
221
 
328
222
  /**
329
- * The ID of the custom field (if being updated)
223
+ * The description of the plan.
330
224
  */
331
- id?: string | null;
225
+ description?: string | null;
332
226
 
333
227
  /**
334
- * The order of the field.
228
+ * The interval at which the plan charges (expiration plans).
335
229
  */
336
- order?: number | null;
230
+ expiration_days?: number | null;
337
231
 
338
232
  /**
339
- * The placeholder value of the field.
233
+ * Whether to force the creation of a new plan even if one with the same attributes
234
+ * already exists.
340
235
  */
341
- placeholder?: string | null;
236
+ force_create_new_plan?: boolean | null;
342
237
 
343
238
  /**
344
- * Whether or not the field is required.
239
+ * An image for the plan. This will be visible on the product page to customers.
345
240
  */
346
- required?: boolean | null;
347
- }
241
+ image?: Plan.AttachmentInputWithDirectUploadID | Plan.AttachmentInputWithID | null;
348
242
 
349
- /**
350
- * An image for the plan. This will be visible on the product page to customers.
351
- */
352
- export interface Image {
353
243
  /**
354
- * The ID of an existing attachment object. Use this when updating a resource and
355
- * keeping a subset of the attachments. Don't use this unless you know what you're
356
- * doing.
244
+ * An additional amount charged upon first purchase.
357
245
  */
358
- id?: string | null;
246
+ initial_price?: number | null;
359
247
 
360
248
  /**
361
- * This ID should be used the first time you upload an attachment. It is the ID of
362
- * the direct upload that was created when uploading the file to S3 via the
363
- * mediaDirectUpload mutation.
249
+ * A personal description or notes section for the business.
364
250
  */
365
- direct_upload_id?: string | null;
366
- }
251
+ internal_notes?: string | null;
367
252
 
368
- /**
369
- * Pass this object to create a new product for this plan. We will use the product
370
- * external identifier to find or create an existing product.
371
- */
372
- export interface Product {
373
253
  /**
374
- * A unique ID used to find or create a product. When provided during creation, we
375
- * will look for an existing product with this external identifier — if found, it
376
- * will be updated; otherwise, a new product will be created.
254
+ * Whether or not the tax is included in a plan's price (or if it hasn't been set
255
+ * up)
377
256
  */
378
- external_identifier: string;
257
+ override_tax_type?: Shared.TaxType | null;
379
258
 
380
259
  /**
381
- * The title of the product.
260
+ * The explicit payment method configuration for the plan. If not provided, the
261
+ * platform or company's defaults will apply.
382
262
  */
383
- title: string;
263
+ payment_method_configuration?: Plan.PaymentMethodConfiguration | null;
384
264
 
385
265
  /**
386
- * The different business types a company can be.
266
+ * The type of plan that can be attached to a product
387
267
  */
388
- business_type?: Shared.BusinessTypes | null;
268
+ plan_type?: Shared.PlanType | null;
389
269
 
390
270
  /**
391
- * Whether or not to collect shipping information at checkout from the customer.
271
+ * Pass this object to create a new product for this plan. We will use the product
272
+ * external identifier to find or create an existing product.
392
273
  */
393
- collect_shipping_address?: boolean | null;
274
+ product?: Plan.Product | null;
394
275
 
395
276
  /**
396
- * The custom statement descriptor for the product i.e. WHOP\*SPORTS, must be
397
- * between 5 and 22 characters, contain at least one letter, and not contain any of
398
- * the following characters: <, >, \, ', "
277
+ * The product the plan is related to. Either this or product is required.
399
278
  */
400
- custom_statement_descriptor?: string | null;
279
+ product_id?: string | null;
401
280
 
402
281
  /**
403
- * A written description of the product.
282
+ * The methods of how a plan can be released.
404
283
  */
405
- description?: string | null;
284
+ release_method?: Shared.ReleaseMethod | null;
406
285
 
407
286
  /**
408
- * The percentage of the revenue that goes to the global affiliate program.
287
+ * The amount the customer is charged every billing period.
409
288
  */
410
- global_affiliate_percentage?: number | null;
289
+ renewal_price?: number | null;
411
290
 
412
291
  /**
413
- * The different statuses of the global affiliate program for an access pass.
292
+ * The title of the plan. This will be visible on the product page to customers.
414
293
  */
415
- global_affiliate_status?: Shared.GlobalAffiliateStatus | null;
294
+ title?: string | null;
416
295
 
417
296
  /**
418
- * The headline of the product.
297
+ * The number of free trial days added before a renewal plan.
419
298
  */
420
- headline?: string | null;
299
+ trial_period_days?: number | null;
421
300
 
422
301
  /**
423
- * The different industry types a company can be in.
302
+ * Visibility of a resource
424
303
  */
425
- industry_type?: Shared.IndustryTypes | null;
304
+ visibility?: Shared.Visibility | null;
305
+ }
306
+
307
+ export namespace Plan {
308
+ export interface CustomField {
309
+ /**
310
+ * The type of the custom field.
311
+ */
312
+ field_type: 'text';
313
+
314
+ /**
315
+ * The name of the custom field.
316
+ */
317
+ name: string;
318
+
319
+ /**
320
+ * The ID of the custom field (if being updated)
321
+ */
322
+ id?: string | null;
323
+
324
+ /**
325
+ * The order of the field.
326
+ */
327
+ order?: number | null;
328
+
329
+ /**
330
+ * The placeholder value of the field.
331
+ */
332
+ placeholder?: string | null;
333
+
334
+ /**
335
+ * Whether or not the field is required.
336
+ */
337
+ required?: boolean | null;
338
+ }
426
339
 
427
340
  /**
428
- * The ID of the product tax code to apply to this product.
341
+ * Input for an attachment
429
342
  */
430
- product_tax_code_id?: string | null;
343
+ export interface AttachmentInputWithDirectUploadID {
344
+ /**
345
+ * This ID should be used the first time you upload an attachment. It is the ID of
346
+ * the direct upload that was created when uploading the file to S3 via the
347
+ * mediaDirectUpload mutation.
348
+ */
349
+ direct_upload_id: string;
350
+ }
431
351
 
432
352
  /**
433
- * The URL to redirect the customer to after a purchase.
353
+ * Input for an attachment
434
354
  */
435
- redirect_purchase_url?: string | null;
355
+ export interface AttachmentInputWithID {
356
+ /**
357
+ * The ID of an existing attachment object. Use this when updating a resource and
358
+ * keeping a subset of the attachments. Don't use this unless you know what you're
359
+ * doing.
360
+ */
361
+ id: string;
362
+ }
436
363
 
437
364
  /**
438
- * The route of the product.
365
+ * The explicit payment method configuration for the plan. If not provided, the
366
+ * platform or company's defaults will apply.
439
367
  */
440
- route?: string | null;
368
+ export interface PaymentMethodConfiguration {
369
+ /**
370
+ * An array of payment method identifiers that are explicitly disabled. Only
371
+ * applies if the include_platform_defaults is true.
372
+ */
373
+ disabled: Array<PaymentsAPI.PaymentMethodTypes>;
374
+
375
+ /**
376
+ * An array of payment method identifiers that are explicitly enabled. This means
377
+ * these payment methods will be shown on checkout. Example use case is to only
378
+ * enable a specific payment method like cashapp, or extending the platform
379
+ * defaults with additional methods.
380
+ */
381
+ enabled: Array<PaymentsAPI.PaymentMethodTypes>;
382
+
383
+ /**
384
+ * Whether Whop's platform default payment method enablement settings are included
385
+ * in this configuration. The full list of default payment methods can be found in
386
+ * the documentation at docs.whop.com/payments.
387
+ */
388
+ include_platform_defaults: boolean;
389
+ }
441
390
 
442
391
  /**
443
- * Visibility of a resource
392
+ * Pass this object to create a new product for this plan. We will use the product
393
+ * external identifier to find or create an existing product.
444
394
  */
445
- visibility?: Shared.Visibility | null;
395
+ export interface Product {
396
+ /**
397
+ * A unique ID used to find or create a product. When provided during creation, we
398
+ * will look for an existing product with this external identifier — if found, it
399
+ * will be updated; otherwise, a new product will be created.
400
+ */
401
+ external_identifier: string;
402
+
403
+ /**
404
+ * The title of the product.
405
+ */
406
+ title: string;
407
+
408
+ /**
409
+ * The different business types a company can be.
410
+ */
411
+ business_type?: Shared.BusinessTypes | null;
412
+
413
+ /**
414
+ * Whether or not to collect shipping information at checkout from the customer.
415
+ */
416
+ collect_shipping_address?: boolean | null;
417
+
418
+ /**
419
+ * The custom statement descriptor for the product i.e. WHOP\*SPORTS, must be
420
+ * between 5 and 22 characters, contain at least one letter, and not contain any of
421
+ * the following characters: <, >, \, ', "
422
+ */
423
+ custom_statement_descriptor?: string | null;
424
+
425
+ /**
426
+ * A written description of the product.
427
+ */
428
+ description?: string | null;
429
+
430
+ /**
431
+ * The percentage of the revenue that goes to the global affiliate program.
432
+ */
433
+ global_affiliate_percentage?: number | null;
434
+
435
+ /**
436
+ * The different statuses of the global affiliate program for a product.
437
+ */
438
+ global_affiliate_status?: Shared.GlobalAffiliateStatus | null;
439
+
440
+ /**
441
+ * The headline of the product.
442
+ */
443
+ headline?: string | null;
444
+
445
+ /**
446
+ * The different industry types a company can be in.
447
+ */
448
+ industry_type?: Shared.IndustryTypes | null;
449
+
450
+ /**
451
+ * The ID of the product tax code to apply to this product.
452
+ */
453
+ product_tax_code_id?: string | null;
454
+
455
+ /**
456
+ * The URL to redirect the customer to after a purchase.
457
+ */
458
+ redirect_purchase_url?: string | null;
459
+
460
+ /**
461
+ * The route of the product.
462
+ */
463
+ route?: string | null;
464
+
465
+ /**
466
+ * Visibility of a resource
467
+ */
468
+ visibility?: Shared.Visibility | null;
469
+ }
446
470
  }
447
471
  }
472
+
473
+ export interface CreateCheckoutSessionInputWithPlanID {
474
+ /**
475
+ * The ID of the plan to use for the checkout configuration
476
+ */
477
+ plan_id: string;
478
+
479
+ /**
480
+ * The affiliate code to use for the checkout configuration
481
+ */
482
+ affiliate_code?: string | null;
483
+
484
+ /**
485
+ * The metadata to use for the checkout configuration
486
+ */
487
+ metadata?: { [key: string]: unknown } | null;
488
+
489
+ /**
490
+ * The URL to redirect the user to after the checkout configuration is created
491
+ */
492
+ redirect_url?: string | null;
493
+ }
448
494
  }
449
495
 
450
496
  export interface CheckoutConfigurationListParams extends CursorPageParams {