@whop/sdk 0.0.2 → 0.0.4

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 (196) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/client.d.mts +30 -12
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +30 -12
  5. package/client.d.ts.map +1 -1
  6. package/client.js +19 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +21 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/app-builds.d.mts +16 -13
  12. package/resources/app-builds.d.mts.map +1 -1
  13. package/resources/app-builds.d.ts +16 -13
  14. package/resources/app-builds.d.ts.map +1 -1
  15. package/resources/app-builds.js +1 -1
  16. package/resources/app-builds.mjs +1 -1
  17. package/resources/apps.d.mts +15 -10
  18. package/resources/apps.d.mts.map +1 -1
  19. package/resources/apps.d.ts +15 -10
  20. package/resources/apps.d.ts.map +1 -1
  21. package/resources/checkout-configurations.d.mts +252 -140
  22. package/resources/checkout-configurations.d.mts.map +1 -1
  23. package/resources/checkout-configurations.d.ts +252 -140
  24. package/resources/checkout-configurations.d.ts.map +1 -1
  25. package/resources/checkout-configurations.js +6 -20
  26. package/resources/checkout-configurations.js.map +1 -1
  27. package/resources/checkout-configurations.mjs +6 -20
  28. package/resources/checkout-configurations.mjs.map +1 -1
  29. package/resources/companies.d.mts +157 -0
  30. package/resources/companies.d.mts.map +1 -1
  31. package/resources/companies.d.ts +157 -0
  32. package/resources/companies.d.ts.map +1 -1
  33. package/resources/companies.js +22 -0
  34. package/resources/companies.js.map +1 -1
  35. package/resources/companies.mjs +22 -0
  36. package/resources/companies.mjs.map +1 -1
  37. package/resources/course-chapters.d.mts +185 -0
  38. package/resources/course-chapters.d.mts.map +1 -0
  39. package/resources/course-chapters.d.ts +185 -0
  40. package/resources/course-chapters.d.ts.map +1 -0
  41. package/resources/course-chapters.js +103 -0
  42. package/resources/course-chapters.js.map +1 -0
  43. package/resources/course-chapters.mjs +99 -0
  44. package/resources/course-chapters.mjs.map +1 -0
  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 +563 -0
  50. package/resources/course-lessons.d.mts.map +1 -0
  51. package/resources/course-lessons.d.ts +563 -0
  52. package/resources/course-lessons.d.ts.map +1 -0
  53. package/resources/course-lessons.js +101 -0
  54. package/resources/course-lessons.js.map +1 -0
  55. package/resources/course-lessons.mjs +97 -0
  56. package/resources/course-lessons.mjs.map +1 -0
  57. package/resources/course-students.d.mts +187 -0
  58. package/resources/course-students.d.mts.map +1 -0
  59. package/resources/course-students.d.ts +187 -0
  60. package/resources/course-students.d.ts.map +1 -0
  61. package/resources/course-students.js +36 -0
  62. package/resources/course-students.js.map +1 -0
  63. package/resources/course-students.mjs +32 -0
  64. package/resources/course-students.mjs.map +1 -0
  65. package/resources/courses.d.mts +485 -0
  66. package/resources/courses.d.mts.map +1 -0
  67. package/resources/courses.d.ts +485 -0
  68. package/resources/courses.d.ts.map +1 -0
  69. package/resources/courses.js +98 -0
  70. package/resources/courses.js.map +1 -0
  71. package/resources/courses.mjs +94 -0
  72. package/resources/courses.mjs.map +1 -0
  73. package/resources/experiences.d.mts +42 -11
  74. package/resources/experiences.d.mts.map +1 -1
  75. package/resources/experiences.d.ts +42 -11
  76. package/resources/experiences.d.ts.map +1 -1
  77. package/resources/experiences.js +22 -0
  78. package/resources/experiences.js.map +1 -1
  79. package/resources/experiences.mjs +22 -0
  80. package/resources/experiences.mjs.map +1 -1
  81. package/resources/forum-posts.d.mts +75 -10
  82. package/resources/forum-posts.d.mts.map +1 -1
  83. package/resources/forum-posts.d.ts +75 -10
  84. package/resources/forum-posts.d.ts.map +1 -1
  85. package/resources/forum-posts.js +11 -0
  86. package/resources/forum-posts.js.map +1 -1
  87. package/resources/forum-posts.mjs +11 -0
  88. package/resources/forum-posts.mjs.map +1 -1
  89. package/resources/index.d.mts +12 -6
  90. package/resources/index.d.mts.map +1 -1
  91. package/resources/index.d.ts +12 -6
  92. package/resources/index.d.ts.map +1 -1
  93. package/resources/index.js +13 -1
  94. package/resources/index.js.map +1 -1
  95. package/resources/index.mjs +7 -1
  96. package/resources/index.mjs.map +1 -1
  97. package/resources/invoices.d.mts +529 -146
  98. package/resources/invoices.d.mts.map +1 -1
  99. package/resources/invoices.d.ts +529 -146
  100. package/resources/invoices.d.ts.map +1 -1
  101. package/resources/invoices.js +2 -24
  102. package/resources/invoices.js.map +1 -1
  103. package/resources/invoices.mjs +2 -24
  104. package/resources/invoices.mjs.map +1 -1
  105. package/resources/ledger-accounts.d.mts +1 -1
  106. package/resources/ledger-accounts.d.mts.map +1 -1
  107. package/resources/ledger-accounts.d.ts +1 -1
  108. package/resources/ledger-accounts.d.ts.map +1 -1
  109. package/resources/members.d.mts +4 -0
  110. package/resources/members.d.mts.map +1 -1
  111. package/resources/members.d.ts +4 -0
  112. package/resources/members.d.ts.map +1 -1
  113. package/resources/memberships.d.mts +26 -5
  114. package/resources/memberships.d.mts.map +1 -1
  115. package/resources/memberships.d.ts +26 -5
  116. package/resources/memberships.d.ts.map +1 -1
  117. package/resources/memberships.js +1 -1
  118. package/resources/memberships.js.map +1 -1
  119. package/resources/memberships.mjs +1 -1
  120. package/resources/memberships.mjs.map +1 -1
  121. package/resources/messages.d.mts +57 -10
  122. package/resources/messages.d.mts.map +1 -1
  123. package/resources/messages.d.ts +57 -10
  124. package/resources/messages.d.ts.map +1 -1
  125. package/resources/messages.js +6 -0
  126. package/resources/messages.js.map +1 -1
  127. package/resources/messages.mjs +6 -0
  128. package/resources/messages.mjs.map +1 -1
  129. package/resources/payments.d.mts +35 -13
  130. package/resources/payments.d.mts.map +1 -1
  131. package/resources/payments.d.ts +35 -13
  132. package/resources/payments.d.ts.map +1 -1
  133. package/resources/plans.d.mts +161 -17
  134. package/resources/plans.d.mts.map +1 -1
  135. package/resources/plans.d.ts +161 -17
  136. package/resources/plans.d.ts.map +1 -1
  137. package/resources/plans.js.map +1 -1
  138. package/resources/plans.mjs.map +1 -1
  139. package/resources/products.d.mts +30 -33
  140. package/resources/products.d.mts.map +1 -1
  141. package/resources/products.d.ts +30 -33
  142. package/resources/products.d.ts.map +1 -1
  143. package/resources/promo-codes.d.mts +394 -0
  144. package/resources/promo-codes.d.mts.map +1 -0
  145. package/resources/promo-codes.d.ts +394 -0
  146. package/resources/promo-codes.d.ts.map +1 -0
  147. package/resources/promo-codes.js +91 -0
  148. package/resources/promo-codes.js.map +1 -0
  149. package/resources/promo-codes.mjs +87 -0
  150. package/resources/promo-codes.mjs.map +1 -0
  151. package/resources/reviews.d.mts +277 -0
  152. package/resources/reviews.d.mts.map +1 -0
  153. package/resources/reviews.d.ts +277 -0
  154. package/resources/reviews.d.ts.map +1 -0
  155. package/resources/reviews.js +23 -0
  156. package/resources/reviews.js.map +1 -0
  157. package/resources/reviews.mjs +19 -0
  158. package/resources/reviews.mjs.map +1 -0
  159. package/resources/shared.d.mts +117 -14
  160. package/resources/shared.d.mts.map +1 -1
  161. package/resources/shared.d.ts +117 -14
  162. package/resources/shared.d.ts.map +1 -1
  163. package/resources/transfers.d.mts +12 -0
  164. package/resources/transfers.d.mts.map +1 -1
  165. package/resources/transfers.d.ts +12 -0
  166. package/resources/transfers.d.ts.map +1 -1
  167. package/src/client.ts +166 -11
  168. package/src/resources/app-builds.ts +19 -14
  169. package/src/resources/apps.ts +16 -11
  170. package/src/resources/checkout-configurations.ts +278 -143
  171. package/src/resources/companies.ts +196 -0
  172. package/src/resources/course-chapters.ts +236 -0
  173. package/src/resources/course-lesson-interactions.ts +2 -2
  174. package/src/resources/course-lessons.ts +699 -0
  175. package/src/resources/course-students.ts +238 -0
  176. package/src/resources/courses.ts +622 -0
  177. package/src/resources/experiences.ts +54 -11
  178. package/src/resources/forum-posts.ts +95 -10
  179. package/src/resources/index.ts +73 -2
  180. package/src/resources/invoices.ts +620 -149
  181. package/src/resources/ledger-accounts.ts +13 -1
  182. package/src/resources/members.ts +5 -0
  183. package/src/resources/memberships.ts +31 -6
  184. package/src/resources/messages.ts +74 -10
  185. package/src/resources/payments.ts +146 -19
  186. package/src/resources/plans.ts +184 -17
  187. package/src/resources/products.ts +36 -37
  188. package/src/resources/promo-codes.ts +490 -0
  189. package/src/resources/reviews.ts +348 -0
  190. package/src/resources/shared.ts +128 -14
  191. package/src/resources/transfers.ts +10 -0
  192. package/src/version.ts +1 -1
  193. package/version.d.mts +1 -1
  194. package/version.d.ts +1 -1
  195. package/version.js +1 -1
  196. package/version.mjs +1 -1
@@ -36,7 +36,19 @@ export interface LedgerAccountRetrieveResponse {
36
36
  /**
37
37
  * The different statuses a LedgerAccountAudit can be
38
38
  */
39
- ledger_account_audit_status: 'reserves_imposed' | 'requested_more_information' | null;
39
+ ledger_account_audit_status:
40
+ | 'pending'
41
+ | 'approved'
42
+ | 'reserves_imposed'
43
+ | 'suspended'
44
+ | 'ignored'
45
+ | 'rejected'
46
+ | 'requested_more_information'
47
+ | 'information_submitted'
48
+ | 'requested_tos_violation_correction'
49
+ | 'clawback_attempted'
50
+ | 'awaiting_sales_review'
51
+ | null;
40
52
 
41
53
  /**
42
54
  * The type of ledger account.
@@ -325,6 +325,11 @@ export interface MemberListParams extends CursorPageParams {
325
325
  * The statuses to filter the members by
326
326
  */
327
327
  statuses?: Array<Shared.MemberStatuses> | null;
328
+
329
+ /**
330
+ * The user IDs to filter the members by
331
+ */
332
+ user_ids?: Array<string> | null;
328
333
  }
329
334
 
330
335
  export declare namespace Members {
@@ -43,7 +43,7 @@ export class Memberships extends APIResource {
43
43
  * - `member:basic:read`
44
44
  */
45
45
  list(
46
- query: MembershipListParams,
46
+ query: MembershipListParams | null | undefined = {},
47
47
  options?: RequestOptions,
48
48
  ): PagePromise<MembershipListResponsesCursorPage, MembershipListResponse> {
49
49
  return this._client.getAPIList('/memberships', CursorPage<MembershipListResponse>, { query, ...options });
@@ -169,6 +169,11 @@ export interface MembershipListResponse {
169
169
  */
170
170
  plan: MembershipListResponse.Plan;
171
171
 
172
+ /**
173
+ * The Product this Membership grants access to.
174
+ */
175
+ product: MembershipListResponse.Product;
176
+
172
177
  /**
173
178
  * The Promo Code that is currently applied to this Membership.
174
179
  */
@@ -238,6 +243,21 @@ export namespace MembershipListResponse {
238
243
  id: string;
239
244
  }
240
245
 
246
+ /**
247
+ * The Product this Membership grants access to.
248
+ */
249
+ export interface Product {
250
+ /**
251
+ * The internal ID of the public product.
252
+ */
253
+ id: string;
254
+
255
+ /**
256
+ * The title of the product. Use for Whop 4.0.
257
+ */
258
+ title: string;
259
+ }
260
+
241
261
  /**
242
262
  * The Promo Code that is currently applied to this Membership.
243
263
  */
@@ -277,11 +297,6 @@ export interface MembershipUpdateParams {
277
297
  }
278
298
 
279
299
  export interface MembershipListParams extends CursorPageParams {
280
- /**
281
- * The ID of the company to list memberships for
282
- */
283
- company_id: string;
284
-
285
300
  /**
286
301
  * The access pass IDs to filter the memberships by
287
302
  */
@@ -305,6 +320,11 @@ export interface MembershipListParams extends CursorPageParams {
305
320
  | 'testing'
306
321
  > | null;
307
322
 
323
+ /**
324
+ * The ID of the company to list memberships for
325
+ */
326
+ company_id?: string | null;
327
+
308
328
  /**
309
329
  * The minimum creation date to filter by
310
330
  */
@@ -349,6 +369,11 @@ export interface MembershipListParams extends CursorPageParams {
349
369
  * The membership status to filter the memberships by
350
370
  */
351
371
  statuses?: Array<Shared.MembershipStatus> | null;
372
+
373
+ /**
374
+ * Only return memberships from these whop user ids
375
+ */
376
+ user_ids?: Array<string> | null;
352
377
  }
353
378
 
354
379
  export interface MembershipCancelParams {
@@ -30,6 +30,17 @@ export class Messages extends APIResource {
30
30
  return this._client.get(path`/messages/${id}`, options);
31
31
  }
32
32
 
33
+ /**
34
+ * Updates an existing message
35
+ */
36
+ update(
37
+ id: string,
38
+ body: MessageUpdateParams | null | undefined = {},
39
+ options?: RequestOptions,
40
+ ): APIPromise<Shared.Message> {
41
+ return this._client.patch(path`/messages/${id}`, { body, ...options });
42
+ }
43
+
33
44
  /**
34
45
  * Lists messages inside a channel
35
46
  *
@@ -210,7 +221,9 @@ export interface MessageCreateParams {
210
221
  /**
211
222
  * The attachments for this message, such as videos or images.
212
223
  */
213
- attachments?: Array<MessageCreateParams.Attachment> | null;
224
+ attachments?: Array<
225
+ MessageCreateParams.AttachmentInputWithDirectUploadID | MessageCreateParams.AttachmentInputWithID
226
+ > | null;
214
227
 
215
228
  /**
216
229
  * The poll for this message
@@ -222,20 +235,25 @@ export namespace MessageCreateParams {
222
235
  /**
223
236
  * Input for an attachment
224
237
  */
225
- export interface Attachment {
226
- /**
227
- * The ID of an existing attachment object. Use this when updating a resource and
228
- * keeping a subset of the attachments. Don't use this unless you know what you're
229
- * doing.
230
- */
231
- id?: string | null;
232
-
238
+ export interface AttachmentInputWithDirectUploadID {
233
239
  /**
234
240
  * This ID should be used the first time you upload an attachment. It is the ID of
235
241
  * the direct upload that was created when uploading the file to S3 via the
236
242
  * mediaDirectUpload mutation.
237
243
  */
238
- direct_upload_id?: string | null;
244
+ direct_upload_id: string;
245
+ }
246
+
247
+ /**
248
+ * Input for an attachment
249
+ */
250
+ export interface AttachmentInputWithID {
251
+ /**
252
+ * The ID of an existing attachment object. Use this when updating a resource and
253
+ * keeping a subset of the attachments. Don't use this unless you know what you're
254
+ * doing.
255
+ */
256
+ id: string;
239
257
  }
240
258
 
241
259
  /**
@@ -266,6 +284,51 @@ export namespace MessageCreateParams {
266
284
  }
267
285
  }
268
286
 
287
+ export interface MessageUpdateParams {
288
+ /**
289
+ * The attachments for this message
290
+ */
291
+ attachments?: Array<
292
+ MessageUpdateParams.AttachmentInputWithDirectUploadID | MessageUpdateParams.AttachmentInputWithID
293
+ > | null;
294
+
295
+ /**
296
+ * The content of the message in Markdown format
297
+ */
298
+ content?: string | null;
299
+
300
+ /**
301
+ * Whether this message is pinned
302
+ */
303
+ is_pinned?: boolean | null;
304
+ }
305
+
306
+ export namespace MessageUpdateParams {
307
+ /**
308
+ * Input for an attachment
309
+ */
310
+ export interface AttachmentInputWithDirectUploadID {
311
+ /**
312
+ * This ID should be used the first time you upload an attachment. It is the ID of
313
+ * the direct upload that was created when uploading the file to S3 via the
314
+ * mediaDirectUpload mutation.
315
+ */
316
+ direct_upload_id: string;
317
+ }
318
+
319
+ /**
320
+ * Input for an attachment
321
+ */
322
+ export interface AttachmentInputWithID {
323
+ /**
324
+ * The ID of an existing attachment object. Use this when updating a resource and
325
+ * keeping a subset of the attachments. Don't use this unless you know what you're
326
+ * doing.
327
+ */
328
+ id: string;
329
+ }
330
+ }
331
+
269
332
  export interface MessageListParams extends CursorPageParams {
270
333
  /**
271
334
  * The ID of the channel or the experience ID to list messages for
@@ -298,6 +361,7 @@ export declare namespace Messages {
298
361
  type MessageListResponse as MessageListResponse,
299
362
  type MessageListResponsesCursorPage as MessageListResponsesCursorPage,
300
363
  type MessageCreateParams as MessageCreateParams,
364
+ type MessageUpdateParams as MessageUpdateParams,
301
365
  type MessageListParams as MessageListParams,
302
366
  };
303
367
  }
@@ -141,6 +141,128 @@ export class Payments extends APIResource {
141
141
 
142
142
  export type PaymentListResponsesCursorPage = CursorPage<PaymentListResponse>;
143
143
 
144
+ /**
145
+ * The reason why a specific payment was billed
146
+ */
147
+ export type BillingReasons =
148
+ | 'subscription_create'
149
+ | 'subscription_cycle'
150
+ | 'subscription_update'
151
+ | 'one_time'
152
+ | 'manual'
153
+ | 'subscription';
154
+
155
+ /**
156
+ * Possible card brands that a payment token can have
157
+ */
158
+ export type CardBrands =
159
+ | 'mastercard'
160
+ | 'visa'
161
+ | 'amex'
162
+ | 'discover'
163
+ | 'unionpay'
164
+ | 'jcb'
165
+ | 'diners'
166
+ | 'link'
167
+ | 'troy'
168
+ | 'visadankort'
169
+ | 'visabancontact'
170
+ | 'china_union_pay'
171
+ | 'rupay'
172
+ | 'jcbrupay'
173
+ | 'elo'
174
+ | 'unknown';
175
+
176
+ /**
177
+ * The different types of payment methods that can be used.
178
+ */
179
+ export type PaymentMethodTypes =
180
+ | 'acss_debit'
181
+ | 'affirm'
182
+ | 'afterpay_clearpay'
183
+ | 'alipay'
184
+ | 'alma'
185
+ | 'amazon_pay'
186
+ | 'apple_pay'
187
+ | 'au_becs_debit'
188
+ | 'bacs_debit'
189
+ | 'bancontact'
190
+ | 'billie'
191
+ | 'blik'
192
+ | 'boleto'
193
+ | 'card'
194
+ | 'cashapp'
195
+ | 'crypto'
196
+ | 'eps'
197
+ | 'fpx'
198
+ | 'giropay'
199
+ | 'google_pay'
200
+ | 'grabpay'
201
+ | 'ideal'
202
+ | 'kakao_pay'
203
+ | 'klarna'
204
+ | 'konbini'
205
+ | 'kr_card'
206
+ | 'link'
207
+ | 'mobilepay'
208
+ | 'multibanco'
209
+ | 'naver_pay'
210
+ | 'nz_bank_account'
211
+ | 'oxxo'
212
+ | 'p24'
213
+ | 'pay_by_bank'
214
+ | 'payco'
215
+ | 'paynow'
216
+ | 'pix'
217
+ | 'promptpay'
218
+ | 'revolut_pay'
219
+ | 'samsung_pay'
220
+ | 'satispay'
221
+ | 'sepa_debit'
222
+ | 'sofort'
223
+ | 'swish'
224
+ | 'twint'
225
+ | 'us_bank_account'
226
+ | 'wechat_pay'
227
+ | 'zip'
228
+ | 'bizum'
229
+ | 'capchase_pay'
230
+ | 'kriya'
231
+ | 'mondu'
232
+ | 'ng_wallet'
233
+ | 'paypay'
234
+ | 'sequra'
235
+ | 'scalapay'
236
+ | 'vipps'
237
+ | 'custom'
238
+ | 'customer_balance'
239
+ | 'gopay'
240
+ | 'mb_way'
241
+ | 'ng_bank'
242
+ | 'ng_bank_transfer'
243
+ | 'ng_card'
244
+ | 'ng_market'
245
+ | 'ng_ussd'
246
+ | 'paypal'
247
+ | 'payto'
248
+ | 'qris'
249
+ | 'rechnung'
250
+ | 'south_korea_market'
251
+ | 'kr_market'
252
+ | 'shopeepay'
253
+ | 'upi'
254
+ | 'sunbit'
255
+ | 'netbanking'
256
+ | 'id_bank_transfer'
257
+ | 'demo_pay'
258
+ | 'shop_pay'
259
+ | 'sezzle'
260
+ | 'coinbase'
261
+ | 'splitit'
262
+ | 'platform_balance'
263
+ | 'apple'
264
+ | 'unknown';
265
+
144
266
  /**
145
267
  * An object representing a receipt for a membership.
146
268
  */
@@ -166,14 +288,14 @@ export interface PaymentListResponse {
166
288
  billing_address: PaymentListResponse.BillingAddress | null;
167
289
 
168
290
  /**
169
- * The billing reason
291
+ * The reason why a specific payment was billed
170
292
  */
171
- billing_reason: string | null;
293
+ billing_reason: BillingReasons | null;
172
294
 
173
295
  /**
174
- * The type of card used as the payment method.
296
+ * Possible card brands that a payment token can have
175
297
  */
176
- card_brand: string | null;
298
+ card_brand: CardBrands | null;
177
299
 
178
300
  /**
179
301
  * The last 4 digits of the card used to make the payment.
@@ -220,16 +342,21 @@ export interface PaymentListResponse {
220
342
  */
221
343
  membership: PaymentListResponse.Membership | null;
222
344
 
345
+ /**
346
+ * The custom metadata stored on this payment. This will be copied the checkout
347
+ * configuration for which this payment was made
348
+ */
349
+ metadata: { [key: string]: unknown } | null;
350
+
223
351
  /**
224
352
  * The datetime the payment was paid
225
353
  */
226
354
  paid_at: string | null;
227
355
 
228
356
  /**
229
- * Returns the type of payment method used for the payment, if available. Ex.
230
- * klarna, affirm, card, cashapp
357
+ * The different types of payment methods that can be used.
231
358
  */
232
- payment_method_type: string | null;
359
+ payment_method_type: PaymentMethodTypes | null;
233
360
 
234
361
  /**
235
362
  * The plan attached to this payment.
@@ -247,7 +374,8 @@ export interface PaymentListResponse {
247
374
  promo_code: PaymentListResponse.PromoCode | null;
248
375
 
249
376
  /**
250
- * Whether the payment can be refunded.
377
+ * True only for payments that are `paid`, have not been fully refunded, and were
378
+ * processed by a payment processor that allows refunds.
251
379
  */
252
380
  refundable: boolean;
253
381
 
@@ -262,7 +390,9 @@ export interface PaymentListResponse {
262
390
  refunded_at: string | null;
263
391
 
264
392
  /**
265
- * Whether the payment can be retried.
393
+ * True when the payment status is `open` and its membership is in one of the
394
+ * retry-eligible states (`active`, `trialing`, `completed`, or `past_due`);
395
+ * otherwise false. Used to decide if Whop can attempt the charge again.
266
396
  */
267
397
  retryable: boolean;
268
398
 
@@ -297,7 +427,8 @@ export interface PaymentListResponse {
297
427
  user: PaymentListResponse.User | null;
298
428
 
299
429
  /**
300
- * Whether the payment can be voided.
430
+ * True when the payment is tied to a membership in `past_due`, the payment status
431
+ * is `open`, and the processor allows voiding payments; otherwise false.
301
432
  */
302
433
  voidable: boolean;
303
434
  }
@@ -448,7 +579,7 @@ export namespace PaymentListResponse {
448
579
  code: string | null;
449
580
 
450
581
  /**
451
- * The number of billing cycles the promo is applied for.
582
+ * The number of months the promo is applied for.
452
583
  */
453
584
  number_of_intervals: number | null;
454
585
 
@@ -498,14 +629,7 @@ export interface PaymentListParams extends CursorPageParams {
498
629
  /**
499
630
  * The billing reason for the payment
500
631
  */
501
- billing_reasons?: Array<
502
- | 'subscription_create'
503
- | 'subscription_cycle'
504
- | 'subscription_update'
505
- | 'one_time'
506
- | 'manual'
507
- | 'subscription'
508
- > | null;
632
+ billing_reasons?: Array<BillingReasons> | null;
509
633
 
510
634
  /**
511
635
  * The minimum creation date to filter by
@@ -577,6 +701,9 @@ export interface PaymentRefundParams {
577
701
 
578
702
  export declare namespace Payments {
579
703
  export {
704
+ type BillingReasons as BillingReasons,
705
+ type CardBrands as CardBrands,
706
+ type PaymentMethodTypes as PaymentMethodTypes,
580
707
  type PaymentListResponse as PaymentListResponse,
581
708
  type PaymentListResponsesCursorPage as PaymentListResponsesCursorPage,
582
709
  type PaymentListParams as PaymentListParams,