@whop/sdk 0.0.25 → 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.
Files changed (271) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/client.d.mts +29 -25
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +29 -25
  5. package/client.d.ts.map +1 -1
  6. package/client.js +14 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +16 -5
  9. package/client.mjs.map +1 -1
  10. package/internal/parse.d.mts.map +1 -1
  11. package/internal/parse.d.ts.map +1 -1
  12. package/internal/parse.js +5 -0
  13. package/internal/parse.js.map +1 -1
  14. package/internal/parse.mjs +5 -0
  15. package/internal/parse.mjs.map +1 -1
  16. package/package.json +3 -3
  17. package/resources/access-tokens.d.mts +32 -51
  18. package/resources/access-tokens.d.mts.map +1 -1
  19. package/resources/access-tokens.d.ts +32 -51
  20. package/resources/access-tokens.d.ts.map +1 -1
  21. package/resources/access-tokens.js +6 -8
  22. package/resources/access-tokens.js.map +1 -1
  23. package/resources/access-tokens.mjs +6 -8
  24. package/resources/access-tokens.mjs.map +1 -1
  25. package/resources/ai-chats.d.mts +36 -104
  26. package/resources/ai-chats.d.mts.map +1 -1
  27. package/resources/ai-chats.d.ts +36 -104
  28. package/resources/ai-chats.d.ts.map +1 -1
  29. package/resources/ai-chats.js +1 -1
  30. package/resources/ai-chats.js.map +1 -1
  31. package/resources/ai-chats.mjs +1 -1
  32. package/resources/ai-chats.mjs.map +1 -1
  33. package/resources/app-builds.d.mts +2 -2
  34. package/resources/app-builds.d.ts +2 -2
  35. package/resources/apps.d.mts +5 -4
  36. package/resources/apps.d.mts.map +1 -1
  37. package/resources/apps.d.ts +5 -4
  38. package/resources/apps.d.ts.map +1 -1
  39. package/resources/authorized-users.d.mts +43 -9
  40. package/resources/authorized-users.d.mts.map +1 -1
  41. package/resources/authorized-users.d.ts +43 -9
  42. package/resources/authorized-users.d.ts.map +1 -1
  43. package/resources/authorized-users.js +1 -1
  44. package/resources/authorized-users.js.map +1 -1
  45. package/resources/authorized-users.mjs +1 -1
  46. package/resources/authorized-users.mjs.map +1 -1
  47. package/resources/chat-channels.d.mts +1 -1
  48. package/resources/chat-channels.d.ts +1 -1
  49. package/resources/checkout-configurations.d.mts +24 -16
  50. package/resources/checkout-configurations.d.mts.map +1 -1
  51. package/resources/checkout-configurations.d.ts +24 -16
  52. package/resources/checkout-configurations.d.ts.map +1 -1
  53. package/resources/companies.d.mts +38 -25
  54. package/resources/companies.d.mts.map +1 -1
  55. package/resources/companies.d.ts +38 -25
  56. package/resources/companies.d.ts.map +1 -1
  57. package/resources/companies.js +7 -4
  58. package/resources/companies.js.map +1 -1
  59. package/resources/companies.mjs +7 -4
  60. package/resources/companies.mjs.map +1 -1
  61. package/resources/company-token-transactions.d.mts +23 -109
  62. package/resources/company-token-transactions.d.mts.map +1 -1
  63. package/resources/company-token-transactions.d.ts +23 -109
  64. package/resources/company-token-transactions.d.ts.map +1 -1
  65. package/resources/course-chapters.d.mts +3 -3
  66. package/resources/course-chapters.d.ts +3 -3
  67. package/resources/course-lessons.d.mts +15 -15
  68. package/resources/course-lessons.d.ts +15 -15
  69. package/resources/course-students.d.mts +6 -6
  70. package/resources/course-students.d.ts +6 -6
  71. package/resources/courses.d.mts +8 -8
  72. package/resources/courses.d.ts +8 -8
  73. package/resources/disputes.d.mts +20 -18
  74. package/resources/disputes.d.mts.map +1 -1
  75. package/resources/disputes.d.ts +20 -18
  76. package/resources/disputes.d.ts.map +1 -1
  77. package/resources/dm-channels.d.mts +161 -0
  78. package/resources/dm-channels.d.mts.map +1 -0
  79. package/resources/dm-channels.d.ts +161 -0
  80. package/resources/dm-channels.d.ts.map +1 -0
  81. package/resources/dm-channels.js +87 -0
  82. package/resources/dm-channels.js.map +1 -0
  83. package/resources/dm-channels.mjs +83 -0
  84. package/resources/dm-channels.mjs.map +1 -0
  85. package/resources/dm-members.d.mts +14 -66
  86. package/resources/dm-members.d.mts.map +1 -1
  87. package/resources/dm-members.d.ts +14 -66
  88. package/resources/dm-members.d.ts.map +1 -1
  89. package/resources/entries.d.mts +6 -6
  90. package/resources/entries.d.ts +6 -6
  91. package/resources/experiences.d.mts +6 -5
  92. package/resources/experiences.d.mts.map +1 -1
  93. package/resources/experiences.d.ts +6 -5
  94. package/resources/experiences.d.ts.map +1 -1
  95. package/resources/fee-markups.d.mts +6 -6
  96. package/resources/fee-markups.d.ts +6 -6
  97. package/resources/files.d.mts +9 -5
  98. package/resources/files.d.mts.map +1 -1
  99. package/resources/files.d.ts +9 -5
  100. package/resources/files.d.ts.map +1 -1
  101. package/resources/forum-posts.d.mts +8 -4
  102. package/resources/forum-posts.d.mts.map +1 -1
  103. package/resources/forum-posts.d.ts +8 -4
  104. package/resources/forum-posts.d.ts.map +1 -1
  105. package/resources/forums.d.mts +1 -1
  106. package/resources/forums.d.ts +1 -1
  107. package/resources/index.d.mts +12 -11
  108. package/resources/index.d.mts.map +1 -1
  109. package/resources/index.d.ts +12 -11
  110. package/resources/index.d.ts.map +1 -1
  111. package/resources/index.js +3 -1
  112. package/resources/index.js.map +1 -1
  113. package/resources/index.mjs +3 -2
  114. package/resources/index.mjs.map +1 -1
  115. package/resources/invoices.d.mts +28 -20
  116. package/resources/invoices.d.mts.map +1 -1
  117. package/resources/invoices.d.ts +28 -20
  118. package/resources/invoices.d.ts.map +1 -1
  119. package/resources/leads.d.mts +21 -189
  120. package/resources/leads.d.mts.map +1 -1
  121. package/resources/leads.d.ts +21 -189
  122. package/resources/leads.d.ts.map +1 -1
  123. package/resources/ledger-accounts.d.mts +12 -9
  124. package/resources/ledger-accounts.d.mts.map +1 -1
  125. package/resources/ledger-accounts.d.ts +12 -9
  126. package/resources/ledger-accounts.d.ts.map +1 -1
  127. package/resources/ledger-accounts.js.map +1 -1
  128. package/resources/ledger-accounts.mjs.map +1 -1
  129. package/resources/members.d.mts +14 -14
  130. package/resources/members.d.mts.map +1 -1
  131. package/resources/members.d.ts +14 -14
  132. package/resources/members.d.ts.map +1 -1
  133. package/resources/members.js +1 -1
  134. package/resources/members.js.map +1 -1
  135. package/resources/members.mjs +1 -1
  136. package/resources/members.mjs.map +1 -1
  137. package/resources/memberships.d.mts +25 -15
  138. package/resources/memberships.d.mts.map +1 -1
  139. package/resources/memberships.d.ts +25 -15
  140. package/resources/memberships.d.ts.map +1 -1
  141. package/resources/messages.d.mts +7 -3
  142. package/resources/messages.d.mts.map +1 -1
  143. package/resources/messages.d.ts +7 -3
  144. package/resources/messages.d.ts.map +1 -1
  145. package/resources/payments.d.mts +59 -19
  146. package/resources/payments.d.mts.map +1 -1
  147. package/resources/payments.d.ts +59 -19
  148. package/resources/payments.d.ts.map +1 -1
  149. package/resources/payout-methods.d.mts +14 -9
  150. package/resources/payout-methods.d.mts.map +1 -1
  151. package/resources/payout-methods.d.ts +14 -9
  152. package/resources/payout-methods.d.ts.map +1 -1
  153. package/resources/payout-methods.js.map +1 -1
  154. package/resources/payout-methods.mjs.map +1 -1
  155. package/resources/plans.d.mts +34 -24
  156. package/resources/plans.d.mts.map +1 -1
  157. package/resources/plans.d.ts +34 -24
  158. package/resources/plans.d.ts.map +1 -1
  159. package/resources/products.d.mts +4 -2
  160. package/resources/products.d.mts.map +1 -1
  161. package/resources/products.d.ts +4 -2
  162. package/resources/products.d.ts.map +1 -1
  163. package/resources/promo-codes.d.mts +22 -12
  164. package/resources/promo-codes.d.mts.map +1 -1
  165. package/resources/promo-codes.d.ts +22 -12
  166. package/resources/promo-codes.d.ts.map +1 -1
  167. package/resources/reactions.d.mts +1 -1
  168. package/resources/reactions.d.ts +1 -1
  169. package/resources/refunds.d.mts +19 -15
  170. package/resources/refunds.d.mts.map +1 -1
  171. package/resources/refunds.d.ts +19 -15
  172. package/resources/refunds.d.ts.map +1 -1
  173. package/resources/reviews.d.mts +10 -10
  174. package/resources/reviews.d.ts +10 -10
  175. package/resources/setup-intents.d.mts +18 -20
  176. package/resources/setup-intents.d.mts.map +1 -1
  177. package/resources/setup-intents.d.ts +18 -20
  178. package/resources/setup-intents.d.ts.map +1 -1
  179. package/resources/shared.d.mts +209 -137
  180. package/resources/shared.d.mts.map +1 -1
  181. package/resources/shared.d.ts +209 -137
  182. package/resources/shared.d.ts.map +1 -1
  183. package/resources/shipments.d.mts +4 -4
  184. package/resources/shipments.d.ts +4 -4
  185. package/resources/support-channels.d.mts +1 -1
  186. package/resources/support-channels.d.ts +1 -1
  187. package/resources/topups.d.mts +6 -4
  188. package/resources/topups.d.mts.map +1 -1
  189. package/resources/topups.d.ts +6 -4
  190. package/resources/topups.d.ts.map +1 -1
  191. package/resources/transfers.d.mts +8 -5
  192. package/resources/transfers.d.mts.map +1 -1
  193. package/resources/transfers.d.ts +8 -5
  194. package/resources/transfers.d.ts.map +1 -1
  195. package/resources/users.d.mts +46 -8
  196. package/resources/users.d.mts.map +1 -1
  197. package/resources/users.d.ts +46 -8
  198. package/resources/users.d.ts.map +1 -1
  199. package/resources/users.js +10 -0
  200. package/resources/users.js.map +1 -1
  201. package/resources/users.mjs +10 -0
  202. package/resources/users.mjs.map +1 -1
  203. package/resources/verifications.d.mts +12 -4
  204. package/resources/verifications.d.mts.map +1 -1
  205. package/resources/verifications.d.ts +12 -4
  206. package/resources/verifications.d.ts.map +1 -1
  207. package/resources/webhooks.d.mts +105 -350
  208. package/resources/webhooks.d.mts.map +1 -1
  209. package/resources/webhooks.d.ts +105 -350
  210. package/resources/webhooks.d.ts.map +1 -1
  211. package/resources/webhooks.js.map +1 -1
  212. package/resources/webhooks.mjs +2 -2
  213. package/resources/webhooks.mjs.map +1 -1
  214. package/resources/withdrawals.d.mts +32 -139
  215. package/resources/withdrawals.d.mts.map +1 -1
  216. package/resources/withdrawals.d.ts +32 -139
  217. package/resources/withdrawals.d.ts.map +1 -1
  218. package/src/client.ts +87 -41
  219. package/src/internal/parse.ts +6 -0
  220. package/src/resources/access-tokens.ts +35 -56
  221. package/src/resources/ai-chats.ts +36 -122
  222. package/src/resources/app-builds.ts +2 -2
  223. package/src/resources/apps.ts +5 -4
  224. package/src/resources/authorized-users.ts +49 -9
  225. package/src/resources/chat-channels.ts +1 -1
  226. package/src/resources/checkout-configurations.ts +24 -16
  227. package/src/resources/companies.ts +41 -26
  228. package/src/resources/company-token-transactions.ts +24 -126
  229. package/src/resources/course-chapters.ts +3 -3
  230. package/src/resources/course-lessons.ts +15 -15
  231. package/src/resources/course-students.ts +6 -6
  232. package/src/resources/courses.ts +8 -8
  233. package/src/resources/disputes.ts +20 -18
  234. package/src/resources/dm-channels.ts +212 -0
  235. package/src/resources/dm-members.ts +16 -78
  236. package/src/resources/entries.ts +6 -6
  237. package/src/resources/experiences.ts +6 -5
  238. package/src/resources/fee-markups.ts +6 -6
  239. package/src/resources/files.ts +10 -4
  240. package/src/resources/forum-posts.ts +8 -4
  241. package/src/resources/forums.ts +1 -1
  242. package/src/resources/index.ts +38 -18
  243. package/src/resources/invoices.ts +28 -20
  244. package/src/resources/leads.ts +21 -217
  245. package/src/resources/ledger-accounts.ts +12 -42
  246. package/src/resources/members.ts +15 -15
  247. package/src/resources/memberships.ts +34 -30
  248. package/src/resources/messages.ts +7 -3
  249. package/src/resources/payments.ts +67 -17
  250. package/src/resources/payout-methods.ts +21 -8
  251. package/src/resources/plans.ts +34 -24
  252. package/src/resources/products.ts +4 -2
  253. package/src/resources/promo-codes.ts +22 -12
  254. package/src/resources/reactions.ts +1 -1
  255. package/src/resources/refunds.ts +20 -15
  256. package/src/resources/reviews.ts +10 -10
  257. package/src/resources/setup-intents.ts +18 -20
  258. package/src/resources/shared.ts +217 -145
  259. package/src/resources/shipments.ts +4 -4
  260. package/src/resources/support-channels.ts +1 -1
  261. package/src/resources/topups.ts +6 -4
  262. package/src/resources/transfers.ts +8 -5
  263. package/src/resources/users.ts +58 -8
  264. package/src/resources/verifications.ts +50 -37
  265. package/src/resources/webhooks.ts +138 -785
  266. package/src/resources/withdrawals.ts +39 -216
  267. package/src/version.ts +1 -1
  268. package/version.d.mts +1 -1
  269. package/version.d.ts +1 -1
  270. package/version.js +1 -1
  271. package/version.mjs +1 -1
@@ -118,18 +118,18 @@ export class Plans extends APIResource {
118
118
  export type PlanListResponsesCursorPage = CursorPage<PlanListResponse>;
119
119
 
120
120
  /**
121
- * A plan for an product. Plans define the core parameters that define a checkout
122
- * and payment on whop. Use plans to create different ways to price your products
123
- * (Eg renewal / one_time)
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 internal ID of the plan.
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
- * When the plan was created.
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 interval at which the plan charges (expiration plans).
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 price a person has to pay for a plan on the initial purchase.
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 a person has to pay for a plan on the renewal purchase.
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
- * Limits/doesn't limit the number of units available for purchase.
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
- * When the plan was last updated.
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 ID (tag) of the company.
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 ID of the invoice.
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 internal ID of the public product.
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 dollars. Eg: 10.43 for $10.43
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 dollars. Eg: 10.43 for $10.43
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
- * Limits/doesn't limit the number of units available for purchase.
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 interval at which the plan charges (expiration plans).
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 dollars. Eg: 19.99 for $19.99
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 dollars. Eg: 19.99 for $19.99
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
- * Limits/doesn't limit the number of units available for purchase.
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
- * An object representing a promo code for a plan.
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 ID of the promo.
108
+ * The unique identifier for the promo code.
107
109
  */
108
110
  id: string;
109
111
 
110
112
  /**
111
- * The amount off (% or flat amount) for the promo.
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 timestamp of when the promo was created.
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 ID of the company
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 internal ID of the public product.
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
- * An object representing a promo code for a plan.
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 ID of the promo.
255
+ * The unique identifier for the promo code.
250
256
  */
251
257
  id: string;
252
258
 
253
259
  /**
254
- * The amount off (% or flat amount) for the promo.
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 timestamp of when the promo was created.
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 internal ID of the public product.
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 off (% or flat amount) for the promo.
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
 
@@ -94,7 +94,7 @@ export namespace ReactionListResponse {
94
94
  */
95
95
  export interface User {
96
96
  /**
97
- * The internal ID of the user.
97
+ * The unique identifier for the user.
98
98
  */
99
99
  id: string;
100
100
 
@@ -52,7 +52,8 @@ export type PaymentProvider =
52
52
  | 'splitit'
53
53
  | 'platform_balance'
54
54
  | 'multi_psp'
55
- | 'adyen';
55
+ | 'adyen'
56
+ | 'claritypay';
56
57
 
57
58
  /**
58
59
  * The status of the refund reference.
@@ -73,21 +74,23 @@ export type RefundReferenceType =
73
74
  export type RefundStatus = 'pending' | 'requires_action' | 'succeeded' | 'failed' | 'canceled';
74
75
 
75
76
  /**
76
- * An object representing a refund made on a payment.
77
+ * A refund represents a full or partial reversal of a payment, including the
78
+ * amount, status, and payment provider.
77
79
  */
78
80
  export interface RefundRetrieveResponse {
79
81
  /**
80
- * The ID of the refund.
82
+ * The unique identifier for the refund.
81
83
  */
82
84
  id: string;
83
85
 
84
86
  /**
85
- * The amount of the refund.
87
+ * The amount of the refund. Provided as a number in the specified currency. Eg:
88
+ * 10.43 for $10.43 USD.
86
89
  */
87
90
  amount: number;
88
91
 
89
92
  /**
90
- * The time the refund was created.
93
+ * The datetime the refund was created.
91
94
  */
92
95
  created_at: string;
93
96
 
@@ -138,7 +141,7 @@ export namespace RefundRetrieveResponse {
138
141
  */
139
142
  export interface Payment {
140
143
  /**
141
- * The payment ID
144
+ * The unique identifier for the payment.
142
145
  */
143
146
  id: string;
144
147
 
@@ -158,7 +161,7 @@ export namespace RefundRetrieveResponse {
158
161
  card_last4: string | null;
159
162
 
160
163
  /**
161
- * The datetime the payment was created
164
+ * The datetime the payment was created.
162
165
  */
163
166
  created_at: string;
164
167
 
@@ -219,7 +222,7 @@ export namespace RefundRetrieveResponse {
219
222
  */
220
223
  export interface Member {
221
224
  /**
222
- * The ID of the member
225
+ * The unique identifier for the company member.
223
226
  */
224
227
  id: string;
225
228
 
@@ -234,7 +237,7 @@ export namespace RefundRetrieveResponse {
234
237
  */
235
238
  export interface Membership {
236
239
  /**
237
- * The internal ID of the membership.
240
+ * The unique identifier for the membership.
238
241
  */
239
242
  id: string;
240
243
 
@@ -249,7 +252,7 @@ export namespace RefundRetrieveResponse {
249
252
  */
250
253
  export interface User {
251
254
  /**
252
- * The internal ID of the user.
255
+ * The unique identifier for the user.
253
256
  */
254
257
  id: string;
255
258
 
@@ -272,21 +275,23 @@ export namespace RefundRetrieveResponse {
272
275
  }
273
276
 
274
277
  /**
275
- * An object representing a refund made on a payment.
278
+ * A refund represents a full or partial reversal of a payment, including the
279
+ * amount, status, and payment provider.
276
280
  */
277
281
  export interface RefundListResponse {
278
282
  /**
279
- * The ID of the refund.
283
+ * The unique identifier for the refund.
280
284
  */
281
285
  id: string;
282
286
 
283
287
  /**
284
- * The amount of the refund.
288
+ * The amount of the refund. Provided as a number in the specified currency. Eg:
289
+ * 10.43 for $10.43 USD.
285
290
  */
286
291
  amount: number;
287
292
 
288
293
  /**
289
- * The time the refund was created.
294
+ * The datetime the refund was created.
290
295
  */
291
296
  created_at: string;
292
297
 
@@ -337,7 +342,7 @@ export namespace RefundListResponse {
337
342
  */
338
343
  export interface Payment {
339
344
  /**
340
- * The payment ID
345
+ * The unique identifier for the payment.
341
346
  */
342
347
  id: string;
343
348
  }
@@ -37,7 +37,7 @@ export type ReviewStatus = 'pending' | 'published' | 'removed';
37
37
  */
38
38
  export interface ReviewRetrieveResponse {
39
39
  /**
40
- * The internal ID of the review.
40
+ * The unique identifier for the review.
41
41
  */
42
42
  id: string;
43
43
 
@@ -52,7 +52,7 @@ export interface ReviewRetrieveResponse {
52
52
  company: ReviewRetrieveResponse.Company;
53
53
 
54
54
  /**
55
- * The timestamp of when the review was created.
55
+ * The datetime the review was created.
56
56
  */
57
57
  created_at: string;
58
58
 
@@ -98,7 +98,7 @@ export interface ReviewRetrieveResponse {
98
98
  title: string | null;
99
99
 
100
100
  /**
101
- * The timestamp of when the review was last updated.
101
+ * The datetime the review was last updated.
102
102
  */
103
103
  updated_at: string;
104
104
 
@@ -140,7 +140,7 @@ export namespace ReviewRetrieveResponse {
140
140
  */
141
141
  export interface Company {
142
142
  /**
143
- * The ID (tag) of the company.
143
+ * The unique identifier for the company.
144
144
  */
145
145
  id: string;
146
146
 
@@ -160,7 +160,7 @@ export namespace ReviewRetrieveResponse {
160
160
  */
161
161
  export interface Product {
162
162
  /**
163
- * The internal ID of the public product.
163
+ * The unique identifier for the product.
164
164
  */
165
165
  id: string;
166
166
 
@@ -175,7 +175,7 @@ export namespace ReviewRetrieveResponse {
175
175
  */
176
176
  export interface User {
177
177
  /**
178
- * The internal ID of the user.
178
+ * The unique identifier for the user.
179
179
  */
180
180
  id: string;
181
181
 
@@ -196,7 +196,7 @@ export namespace ReviewRetrieveResponse {
196
196
  */
197
197
  export interface ReviewListResponse {
198
198
  /**
199
- * The internal ID of the review.
199
+ * The unique identifier for the review.
200
200
  */
201
201
  id: string;
202
202
 
@@ -206,7 +206,7 @@ export interface ReviewListResponse {
206
206
  attachments: Array<ReviewListResponse.Attachment>;
207
207
 
208
208
  /**
209
- * The timestamp of when the review was created.
209
+ * The datetime the review was created.
210
210
  */
211
211
  created_at: string;
212
212
 
@@ -247,7 +247,7 @@ export interface ReviewListResponse {
247
247
  title: string | null;
248
248
 
249
249
  /**
250
- * The timestamp of when the review was last updated.
250
+ * The datetime the review was last updated.
251
251
  */
252
252
  updated_at: string;
253
253
 
@@ -289,7 +289,7 @@ export namespace ReviewListResponse {
289
289
  */
290
290
  export interface User {
291
291
  /**
292
- * The internal ID of the user.
292
+ * The unique identifier for the user.
293
293
  */
294
294
  id: string;
295
295
 
@@ -53,12 +53,11 @@ export class SetupIntents extends APIResource {
53
53
  export type SetupIntentListResponsesCursorPage = CursorPage<SetupIntentListResponse>;
54
54
 
55
55
  /**
56
- * An object representing a setup intent, which is a flow for allowing a customer
57
- * to add a payment method to their account without making a purchase.
56
+ * A setup intent allows a user to save a payment method without making a purchase.
58
57
  */
59
58
  export interface SetupIntent {
60
59
  /**
61
- * The setup intent ID
60
+ * The unique identifier for the setup intent.
62
61
  */
63
62
  id: string;
64
63
 
@@ -73,7 +72,7 @@ export interface SetupIntent {
73
72
  company: SetupIntent.Company | null;
74
73
 
75
74
  /**
76
- * The datetime the payment was created
75
+ * The datetime the setup intent was created.
77
76
  */
78
77
  created_at: string;
79
78
 
@@ -109,7 +108,7 @@ export namespace SetupIntent {
109
108
  */
110
109
  export interface CheckoutConfiguration {
111
110
  /**
112
- * The ID of the checkout configuration
111
+ * The unique identifier for the checkout session.
113
112
  */
114
113
  id: string;
115
114
  }
@@ -119,7 +118,7 @@ export namespace SetupIntent {
119
118
  */
120
119
  export interface Company {
121
120
  /**
122
- * The ID (tag) of the company.
121
+ * The unique identifier for the company.
123
122
  */
124
123
  id: string;
125
124
  }
@@ -129,7 +128,7 @@ export namespace SetupIntent {
129
128
  */
130
129
  export interface Member {
131
130
  /**
132
- * The ID of the member
131
+ * The unique identifier for the company member.
133
132
  */
134
133
  id: string;
135
134
 
@@ -145,7 +144,7 @@ export namespace SetupIntent {
145
144
  */
146
145
  export interface User {
147
146
  /**
148
- * The internal ID of the user account.
147
+ * The unique identifier for the company member user.
149
148
  */
150
149
  id: string;
151
150
 
@@ -171,7 +170,7 @@ export namespace SetupIntent {
171
170
  */
172
171
  export interface PaymentMethod {
173
172
  /**
174
- * The ID of the payment method
173
+ * The unique identifier for the payment token.
175
174
  */
176
175
  id: string;
177
176
 
@@ -181,7 +180,7 @@ export namespace SetupIntent {
181
180
  card: PaymentMethod.Card | null;
182
181
 
183
182
  /**
184
- * The date and time the payment method was created
183
+ * The datetime the payment token was created.
185
184
  */
186
185
  created_at: string;
187
186
 
@@ -225,12 +224,11 @@ export namespace SetupIntent {
225
224
  export type SetupIntentStatus = 'processing' | 'succeeded' | 'canceled' | 'requires_action';
226
225
 
227
226
  /**
228
- * An object representing a setup intent, which is a flow for allowing a customer
229
- * to add a payment method to their account without making a purchase.
227
+ * A setup intent allows a user to save a payment method without making a purchase.
230
228
  */
231
229
  export interface SetupIntentListResponse {
232
230
  /**
233
- * The setup intent ID
231
+ * The unique identifier for the setup intent.
234
232
  */
235
233
  id: string;
236
234
 
@@ -245,7 +243,7 @@ export interface SetupIntentListResponse {
245
243
  company: SetupIntentListResponse.Company | null;
246
244
 
247
245
  /**
248
- * The datetime the payment was created
246
+ * The datetime the setup intent was created.
249
247
  */
250
248
  created_at: string;
251
249
 
@@ -281,7 +279,7 @@ export namespace SetupIntentListResponse {
281
279
  */
282
280
  export interface CheckoutConfiguration {
283
281
  /**
284
- * The ID of the checkout configuration
282
+ * The unique identifier for the checkout session.
285
283
  */
286
284
  id: string;
287
285
  }
@@ -291,7 +289,7 @@ export namespace SetupIntentListResponse {
291
289
  */
292
290
  export interface Company {
293
291
  /**
294
- * The ID (tag) of the company.
292
+ * The unique identifier for the company.
295
293
  */
296
294
  id: string;
297
295
  }
@@ -301,7 +299,7 @@ export namespace SetupIntentListResponse {
301
299
  */
302
300
  export interface Member {
303
301
  /**
304
- * The ID of the member
302
+ * The unique identifier for the company member.
305
303
  */
306
304
  id: string;
307
305
 
@@ -317,7 +315,7 @@ export namespace SetupIntentListResponse {
317
315
  */
318
316
  export interface User {
319
317
  /**
320
- * The internal ID of the user account.
318
+ * The unique identifier for the company member user.
321
319
  */
322
320
  id: string;
323
321
 
@@ -343,7 +341,7 @@ export namespace SetupIntentListResponse {
343
341
  */
344
342
  export interface PaymentMethod {
345
343
  /**
346
- * The ID of the payment method
344
+ * The unique identifier for the payment token.
347
345
  */
348
346
  id: string;
349
347
 
@@ -353,7 +351,7 @@ export namespace SetupIntentListResponse {
353
351
  card: PaymentMethod.Card | null;
354
352
 
355
353
  /**
356
- * The date and time the payment method was created
354
+ * The datetime the payment token was created.
357
355
  */
358
356
  created_at: string;
359
357