@whop/sdk 0.0.27 → 0.0.29

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 (470) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/client.d.mts +9 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +9 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +10 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +10 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/access-tokens.d.mts +19 -20
  12. package/resources/access-tokens.d.mts.map +1 -1
  13. package/resources/access-tokens.d.ts +19 -20
  14. package/resources/access-tokens.d.ts.map +1 -1
  15. package/resources/access-tokens.js +4 -4
  16. package/resources/access-tokens.mjs +4 -4
  17. package/resources/account-links.d.mts +15 -13
  18. package/resources/account-links.d.mts.map +1 -1
  19. package/resources/account-links.d.ts +15 -13
  20. package/resources/account-links.d.ts.map +1 -1
  21. package/resources/account-links.js +2 -3
  22. package/resources/account-links.js.map +1 -1
  23. package/resources/account-links.mjs +2 -3
  24. package/resources/account-links.mjs.map +1 -1
  25. package/resources/ai-chats.d.mts +38 -26
  26. package/resources/ai-chats.d.mts.map +1 -1
  27. package/resources/ai-chats.d.ts +38 -26
  28. package/resources/ai-chats.d.ts.map +1 -1
  29. package/resources/ai-chats.js +5 -5
  30. package/resources/ai-chats.mjs +5 -5
  31. package/resources/app-builds.d.mts +35 -33
  32. package/resources/app-builds.d.mts.map +1 -1
  33. package/resources/app-builds.d.ts +35 -33
  34. package/resources/app-builds.d.ts.map +1 -1
  35. package/resources/app-builds.js +7 -4
  36. package/resources/app-builds.js.map +1 -1
  37. package/resources/app-builds.mjs +7 -4
  38. package/resources/app-builds.mjs.map +1 -1
  39. package/resources/apps.d.mts +81 -56
  40. package/resources/apps.d.mts.map +1 -1
  41. package/resources/apps.d.ts +81 -56
  42. package/resources/apps.d.ts.map +1 -1
  43. package/resources/apps.js +7 -4
  44. package/resources/apps.js.map +1 -1
  45. package/resources/apps.mjs +7 -4
  46. package/resources/apps.mjs.map +1 -1
  47. package/resources/authorized-users.d.mts +32 -26
  48. package/resources/authorized-users.d.mts.map +1 -1
  49. package/resources/authorized-users.d.ts +32 -26
  50. package/resources/authorized-users.d.ts.map +1 -1
  51. package/resources/authorized-users.js +3 -2
  52. package/resources/authorized-users.js.map +1 -1
  53. package/resources/authorized-users.mjs +3 -2
  54. package/resources/authorized-users.mjs.map +1 -1
  55. package/resources/chat-channels.d.mts +27 -19
  56. package/resources/chat-channels.d.mts.map +1 -1
  57. package/resources/chat-channels.d.ts +27 -19
  58. package/resources/chat-channels.d.ts.map +1 -1
  59. package/resources/chat-channels.js +5 -3
  60. package/resources/chat-channels.js.map +1 -1
  61. package/resources/chat-channels.mjs +5 -3
  62. package/resources/chat-channels.mjs.map +1 -1
  63. package/resources/checkout-configurations.d.mts +55 -46
  64. package/resources/checkout-configurations.d.mts.map +1 -1
  65. package/resources/checkout-configurations.d.ts +55 -46
  66. package/resources/checkout-configurations.d.ts.map +1 -1
  67. package/resources/checkout-configurations.js +3 -2
  68. package/resources/checkout-configurations.js.map +1 -1
  69. package/resources/checkout-configurations.mjs +3 -2
  70. package/resources/checkout-configurations.mjs.map +1 -1
  71. package/resources/companies.d.mts +71 -46
  72. package/resources/companies.d.mts.map +1 -1
  73. package/resources/companies.d.ts +71 -46
  74. package/resources/companies.d.ts.map +1 -1
  75. package/resources/companies.js +7 -8
  76. package/resources/companies.js.map +1 -1
  77. package/resources/companies.mjs +7 -8
  78. package/resources/companies.mjs.map +1 -1
  79. package/resources/company-token-transactions.d.mts +80 -57
  80. package/resources/company-token-transactions.d.mts.map +1 -1
  81. package/resources/company-token-transactions.d.ts +80 -57
  82. package/resources/company-token-transactions.d.ts.map +1 -1
  83. package/resources/company-token-transactions.js +6 -3
  84. package/resources/company-token-transactions.js.map +1 -1
  85. package/resources/company-token-transactions.mjs +6 -3
  86. package/resources/company-token-transactions.mjs.map +1 -1
  87. package/resources/course-chapters.d.mts +24 -19
  88. package/resources/course-chapters.d.mts.map +1 -1
  89. package/resources/course-chapters.d.ts +24 -19
  90. package/resources/course-chapters.d.ts.map +1 -1
  91. package/resources/course-chapters.js +5 -5
  92. package/resources/course-chapters.mjs +5 -5
  93. package/resources/course-lesson-interactions.d.mts +7 -6
  94. package/resources/course-lesson-interactions.d.mts.map +1 -1
  95. package/resources/course-lesson-interactions.d.ts +7 -6
  96. package/resources/course-lesson-interactions.d.ts.map +1 -1
  97. package/resources/course-lesson-interactions.js +3 -2
  98. package/resources/course-lesson-interactions.js.map +1 -1
  99. package/resources/course-lesson-interactions.mjs +3 -2
  100. package/resources/course-lesson-interactions.mjs.map +1 -1
  101. package/resources/course-lessons.d.mts +126 -84
  102. package/resources/course-lessons.d.mts.map +1 -1
  103. package/resources/course-lessons.d.ts +126 -84
  104. package/resources/course-lessons.d.ts.map +1 -1
  105. package/resources/course-lessons.js +12 -8
  106. package/resources/course-lessons.js.map +1 -1
  107. package/resources/course-lessons.mjs +12 -8
  108. package/resources/course-lessons.mjs.map +1 -1
  109. package/resources/course-students.d.mts +38 -29
  110. package/resources/course-students.d.mts.map +1 -1
  111. package/resources/course-students.d.ts +38 -29
  112. package/resources/course-students.d.ts.map +1 -1
  113. package/resources/course-students.js +3 -2
  114. package/resources/course-students.js.map +1 -1
  115. package/resources/course-students.mjs +3 -2
  116. package/resources/course-students.mjs.map +1 -1
  117. package/resources/courses.d.mts +132 -91
  118. package/resources/courses.d.mts.map +1 -1
  119. package/resources/courses.d.ts +132 -91
  120. package/resources/courses.d.ts.map +1 -1
  121. package/resources/courses.js +9 -5
  122. package/resources/courses.js.map +1 -1
  123. package/resources/courses.mjs +9 -5
  124. package/resources/courses.mjs.map +1 -1
  125. package/resources/dispute-alerts.d.mts +325 -0
  126. package/resources/dispute-alerts.d.mts.map +1 -0
  127. package/resources/dispute-alerts.d.ts +325 -0
  128. package/resources/dispute-alerts.d.ts.map +1 -0
  129. package/resources/dispute-alerts.js +42 -0
  130. package/resources/dispute-alerts.js.map +1 -0
  131. package/resources/dispute-alerts.mjs +38 -0
  132. package/resources/dispute-alerts.mjs.map +1 -0
  133. package/resources/disputes.d.mts +156 -102
  134. package/resources/disputes.d.mts.map +1 -1
  135. package/resources/disputes.d.ts +156 -102
  136. package/resources/disputes.d.ts.map +1 -1
  137. package/resources/disputes.js +4 -2
  138. package/resources/disputes.js.map +1 -1
  139. package/resources/disputes.mjs +4 -2
  140. package/resources/disputes.mjs.map +1 -1
  141. package/resources/dm-channels.d.mts +29 -16
  142. package/resources/dm-channels.d.mts.map +1 -1
  143. package/resources/dm-channels.d.ts +29 -16
  144. package/resources/dm-channels.d.ts.map +1 -1
  145. package/resources/dm-channels.js +9 -5
  146. package/resources/dm-channels.js.map +1 -1
  147. package/resources/dm-channels.mjs +9 -5
  148. package/resources/dm-channels.mjs.map +1 -1
  149. package/resources/dm-members.d.mts +30 -21
  150. package/resources/dm-members.d.mts.map +1 -1
  151. package/resources/dm-members.d.ts +30 -21
  152. package/resources/dm-members.d.ts.map +1 -1
  153. package/resources/dm-members.js +9 -5
  154. package/resources/dm-members.js.map +1 -1
  155. package/resources/dm-members.mjs +9 -5
  156. package/resources/dm-members.mjs.map +1 -1
  157. package/resources/entries.d.mts +29 -21
  158. package/resources/entries.d.mts.map +1 -1
  159. package/resources/entries.d.ts +29 -21
  160. package/resources/entries.d.ts.map +1 -1
  161. package/resources/entries.js +7 -4
  162. package/resources/entries.js.map +1 -1
  163. package/resources/entries.mjs +7 -4
  164. package/resources/entries.mjs.map +1 -1
  165. package/resources/experiences.d.mts +53 -49
  166. package/resources/experiences.d.mts.map +1 -1
  167. package/resources/experiences.d.ts +53 -49
  168. package/resources/experiences.d.ts.map +1 -1
  169. package/resources/experiences.js +6 -9
  170. package/resources/experiences.js.map +1 -1
  171. package/resources/experiences.mjs +6 -9
  172. package/resources/experiences.mjs.map +1 -1
  173. package/resources/fee-markups.d.mts +32 -21
  174. package/resources/fee-markups.d.mts.map +1 -1
  175. package/resources/fee-markups.d.ts +32 -21
  176. package/resources/fee-markups.d.ts.map +1 -1
  177. package/resources/fee-markups.js +6 -3
  178. package/resources/fee-markups.js.map +1 -1
  179. package/resources/fee-markups.mjs +6 -3
  180. package/resources/fee-markups.mjs.map +1 -1
  181. package/resources/files.d.mts +21 -17
  182. package/resources/files.d.mts.map +1 -1
  183. package/resources/files.d.ts +21 -17
  184. package/resources/files.d.ts.map +1 -1
  185. package/resources/files.js +3 -2
  186. package/resources/files.js.map +1 -1
  187. package/resources/files.mjs +3 -2
  188. package/resources/files.mjs.map +1 -1
  189. package/resources/forum-posts.d.mts +62 -43
  190. package/resources/forum-posts.d.mts.map +1 -1
  191. package/resources/forum-posts.d.ts +62 -43
  192. package/resources/forum-posts.d.ts.map +1 -1
  193. package/resources/forum-posts.js +8 -4
  194. package/resources/forum-posts.js.map +1 -1
  195. package/resources/forum-posts.mjs +8 -4
  196. package/resources/forum-posts.mjs.map +1 -1
  197. package/resources/forums.d.mts +20 -12
  198. package/resources/forums.d.mts.map +1 -1
  199. package/resources/forums.d.ts +20 -12
  200. package/resources/forums.d.ts.map +1 -1
  201. package/resources/forums.js +5 -3
  202. package/resources/forums.js.map +1 -1
  203. package/resources/forums.mjs +5 -3
  204. package/resources/forums.mjs.map +1 -1
  205. package/resources/index.d.mts +4 -3
  206. package/resources/index.d.mts.map +1 -1
  207. package/resources/index.d.ts +4 -3
  208. package/resources/index.d.ts.map +1 -1
  209. package/resources/index.js +3 -1
  210. package/resources/index.js.map +1 -1
  211. package/resources/index.mjs +1 -0
  212. package/resources/index.mjs.map +1 -1
  213. package/resources/invoices.d.mts +108 -80
  214. package/resources/invoices.d.mts.map +1 -1
  215. package/resources/invoices.d.ts +108 -80
  216. package/resources/invoices.d.ts.map +1 -1
  217. package/resources/invoices.js +7 -4
  218. package/resources/invoices.js.map +1 -1
  219. package/resources/invoices.mjs +7 -4
  220. package/resources/invoices.mjs.map +1 -1
  221. package/resources/leads.d.mts +64 -42
  222. package/resources/leads.d.mts.map +1 -1
  223. package/resources/leads.d.ts +64 -42
  224. package/resources/leads.d.ts.map +1 -1
  225. package/resources/leads.js +6 -4
  226. package/resources/leads.js.map +1 -1
  227. package/resources/leads.mjs +6 -4
  228. package/resources/leads.mjs.map +1 -1
  229. package/resources/ledger-accounts.d.mts +10 -8
  230. package/resources/ledger-accounts.d.mts.map +1 -1
  231. package/resources/ledger-accounts.d.ts +10 -8
  232. package/resources/ledger-accounts.d.ts.map +1 -1
  233. package/resources/ledger-accounts.js +1 -1
  234. package/resources/ledger-accounts.mjs +1 -1
  235. package/resources/members.d.mts +18 -19
  236. package/resources/members.d.mts.map +1 -1
  237. package/resources/members.d.ts +18 -19
  238. package/resources/members.d.ts.map +1 -1
  239. package/resources/members.js +3 -2
  240. package/resources/members.js.map +1 -1
  241. package/resources/members.mjs +3 -2
  242. package/resources/members.mjs.map +1 -1
  243. package/resources/memberships.d.mts +69 -51
  244. package/resources/memberships.d.mts.map +1 -1
  245. package/resources/memberships.d.ts +69 -51
  246. package/resources/memberships.d.ts.map +1 -1
  247. package/resources/memberships.js +12 -8
  248. package/resources/memberships.js.map +1 -1
  249. package/resources/memberships.mjs +12 -8
  250. package/resources/memberships.mjs.map +1 -1
  251. package/resources/messages.d.mts +50 -32
  252. package/resources/messages.d.mts.map +1 -1
  253. package/resources/messages.d.ts +50 -32
  254. package/resources/messages.d.ts.map +1 -1
  255. package/resources/messages.js +9 -5
  256. package/resources/messages.js.map +1 -1
  257. package/resources/messages.mjs +9 -5
  258. package/resources/messages.mjs.map +1 -1
  259. package/resources/notifications.d.mts +33 -25
  260. package/resources/notifications.d.mts.map +1 -1
  261. package/resources/notifications.d.ts +33 -25
  262. package/resources/notifications.d.ts.map +1 -1
  263. package/resources/notifications.js +2 -1
  264. package/resources/notifications.js.map +1 -1
  265. package/resources/notifications.mjs +2 -1
  266. package/resources/notifications.mjs.map +1 -1
  267. package/resources/payment-methods.d.mts +212 -114
  268. package/resources/payment-methods.d.mts.map +1 -1
  269. package/resources/payment-methods.d.ts +212 -114
  270. package/resources/payment-methods.d.ts.map +1 -1
  271. package/resources/payment-methods.js +5 -10
  272. package/resources/payment-methods.js.map +1 -1
  273. package/resources/payment-methods.mjs +5 -10
  274. package/resources/payment-methods.mjs.map +1 -1
  275. package/resources/payments.d.mts +73 -40
  276. package/resources/payments.d.mts.map +1 -1
  277. package/resources/payments.d.ts +73 -40
  278. package/resources/payments.d.ts.map +1 -1
  279. package/resources/payments.js +23 -10
  280. package/resources/payments.js.map +1 -1
  281. package/resources/payments.mjs +23 -10
  282. package/resources/payments.mjs.map +1 -1
  283. package/resources/payout-methods.d.mts +44 -29
  284. package/resources/payout-methods.d.mts.map +1 -1
  285. package/resources/payout-methods.d.ts +44 -29
  286. package/resources/payout-methods.d.ts.map +1 -1
  287. package/resources/payout-methods.js +3 -2
  288. package/resources/payout-methods.js.map +1 -1
  289. package/resources/payout-methods.mjs +3 -2
  290. package/resources/payout-methods.mjs.map +1 -1
  291. package/resources/plans.d.mts +121 -90
  292. package/resources/plans.d.mts.map +1 -1
  293. package/resources/plans.d.ts +121 -90
  294. package/resources/plans.d.ts.map +1 -1
  295. package/resources/plans.js +9 -5
  296. package/resources/plans.js.map +1 -1
  297. package/resources/plans.mjs +9 -5
  298. package/resources/plans.mjs.map +1 -1
  299. package/resources/products.d.mts +76 -65
  300. package/resources/products.d.mts.map +1 -1
  301. package/resources/products.d.ts +76 -65
  302. package/resources/products.d.ts.map +1 -1
  303. package/resources/products.js +7 -5
  304. package/resources/products.js.map +1 -1
  305. package/resources/products.mjs +7 -5
  306. package/resources/products.mjs.map +1 -1
  307. package/resources/promo-codes.d.mts +41 -31
  308. package/resources/promo-codes.d.mts.map +1 -1
  309. package/resources/promo-codes.d.ts +41 -31
  310. package/resources/promo-codes.d.ts.map +1 -1
  311. package/resources/promo-codes.js +7 -4
  312. package/resources/promo-codes.js.map +1 -1
  313. package/resources/promo-codes.mjs +7 -4
  314. package/resources/promo-codes.mjs.map +1 -1
  315. package/resources/reactions.d.mts +24 -18
  316. package/resources/reactions.d.mts.map +1 -1
  317. package/resources/reactions.d.ts +24 -18
  318. package/resources/reactions.d.ts.map +1 -1
  319. package/resources/reactions.js +7 -4
  320. package/resources/reactions.js.map +1 -1
  321. package/resources/reactions.mjs +7 -4
  322. package/resources/reactions.mjs.map +1 -1
  323. package/resources/refunds.d.mts +43 -29
  324. package/resources/refunds.d.mts.map +1 -1
  325. package/resources/refunds.d.ts +43 -29
  326. package/resources/refunds.d.ts.map +1 -1
  327. package/resources/refunds.js +3 -2
  328. package/resources/refunds.js.map +1 -1
  329. package/resources/refunds.mjs +3 -2
  330. package/resources/refunds.mjs.map +1 -1
  331. package/resources/reviews.d.mts +66 -50
  332. package/resources/reviews.d.mts.map +1 -1
  333. package/resources/reviews.d.ts +66 -50
  334. package/resources/reviews.d.ts.map +1 -1
  335. package/resources/reviews.js +3 -2
  336. package/resources/reviews.js.map +1 -1
  337. package/resources/reviews.mjs +3 -2
  338. package/resources/reviews.mjs.map +1 -1
  339. package/resources/setup-intents.d.mts +61 -43
  340. package/resources/setup-intents.d.mts.map +1 -1
  341. package/resources/setup-intents.d.ts +61 -43
  342. package/resources/setup-intents.d.ts.map +1 -1
  343. package/resources/setup-intents.js +4 -10
  344. package/resources/setup-intents.js.map +1 -1
  345. package/resources/setup-intents.mjs +4 -10
  346. package/resources/setup-intents.mjs.map +1 -1
  347. package/resources/shared.d.mts +696 -389
  348. package/resources/shared.d.mts.map +1 -1
  349. package/resources/shared.d.ts +696 -389
  350. package/resources/shared.d.ts.map +1 -1
  351. package/resources/shipments.d.mts +26 -17
  352. package/resources/shipments.d.mts.map +1 -1
  353. package/resources/shipments.d.ts +26 -17
  354. package/resources/shipments.d.ts.map +1 -1
  355. package/resources/shipments.js +5 -3
  356. package/resources/shipments.js.map +1 -1
  357. package/resources/shipments.mjs +5 -3
  358. package/resources/shipments.mjs.map +1 -1
  359. package/resources/support-channels.d.mts +31 -19
  360. package/resources/support-channels.d.mts.map +1 -1
  361. package/resources/support-channels.d.ts +31 -19
  362. package/resources/support-channels.d.ts.map +1 -1
  363. package/resources/support-channels.js +5 -4
  364. package/resources/support-channels.js.map +1 -1
  365. package/resources/support-channels.mjs +5 -4
  366. package/resources/support-channels.mjs.map +1 -1
  367. package/resources/topups.d.mts +11 -9
  368. package/resources/topups.d.mts.map +1 -1
  369. package/resources/topups.d.ts +11 -9
  370. package/resources/topups.d.ts.map +1 -1
  371. package/resources/topups.js +2 -1
  372. package/resources/topups.js.map +1 -1
  373. package/resources/topups.mjs +2 -1
  374. package/resources/topups.mjs.map +1 -1
  375. package/resources/transfers.d.mts +35 -29
  376. package/resources/transfers.d.mts.map +1 -1
  377. package/resources/transfers.d.ts +35 -29
  378. package/resources/transfers.d.ts.map +1 -1
  379. package/resources/transfers.js +5 -3
  380. package/resources/transfers.js.map +1 -1
  381. package/resources/transfers.mjs +5 -3
  382. package/resources/transfers.mjs.map +1 -1
  383. package/resources/users.d.mts +20 -16
  384. package/resources/users.d.mts.map +1 -1
  385. package/resources/users.d.ts +20 -16
  386. package/resources/users.d.ts.map +1 -1
  387. package/resources/users.js +4 -3
  388. package/resources/users.js.map +1 -1
  389. package/resources/users.mjs +4 -3
  390. package/resources/users.mjs.map +1 -1
  391. package/resources/verifications.d.mts +6 -4
  392. package/resources/verifications.d.mts.map +1 -1
  393. package/resources/verifications.d.ts +6 -4
  394. package/resources/verifications.d.ts.map +1 -1
  395. package/resources/verifications.js +1 -1
  396. package/resources/verifications.mjs +1 -1
  397. package/resources/webhooks.d.mts +360 -98
  398. package/resources/webhooks.d.mts.map +1 -1
  399. package/resources/webhooks.d.ts +360 -98
  400. package/resources/webhooks.d.ts.map +1 -1
  401. package/resources/webhooks.js +3 -2
  402. package/resources/webhooks.js.map +1 -1
  403. package/resources/webhooks.mjs +3 -2
  404. package/resources/webhooks.mjs.map +1 -1
  405. package/resources/withdrawals.d.mts +53 -44
  406. package/resources/withdrawals.d.mts.map +1 -1
  407. package/resources/withdrawals.d.ts +53 -44
  408. package/resources/withdrawals.d.ts.map +1 -1
  409. package/resources/withdrawals.js +3 -2
  410. package/resources/withdrawals.js.map +1 -1
  411. package/resources/withdrawals.mjs +3 -2
  412. package/resources/withdrawals.mjs.map +1 -1
  413. package/src/client.ts +34 -3
  414. package/src/resources/access-tokens.ts +19 -20
  415. package/src/resources/account-links.ts +15 -13
  416. package/src/resources/ai-chats.ts +39 -26
  417. package/src/resources/app-builds.ts +35 -33
  418. package/src/resources/apps.ts +84 -56
  419. package/src/resources/authorized-users.ts +32 -26
  420. package/src/resources/chat-channels.ts +27 -19
  421. package/src/resources/checkout-configurations.ts +56 -46
  422. package/src/resources/companies.ts +75 -46
  423. package/src/resources/company-token-transactions.ts +81 -58
  424. package/src/resources/course-chapters.ts +24 -19
  425. package/src/resources/course-lesson-interactions.ts +7 -6
  426. package/src/resources/course-lessons.ts +126 -84
  427. package/src/resources/course-students.ts +38 -29
  428. package/src/resources/courses.ts +132 -91
  429. package/src/resources/dispute-alerts.ts +404 -0
  430. package/src/resources/disputes.ts +156 -102
  431. package/src/resources/dm-channels.ts +29 -16
  432. package/src/resources/dm-members.ts +30 -21
  433. package/src/resources/entries.ts +29 -21
  434. package/src/resources/experiences.ts +53 -49
  435. package/src/resources/fee-markups.ts +32 -21
  436. package/src/resources/files.ts +21 -17
  437. package/src/resources/forum-posts.ts +63 -43
  438. package/src/resources/forums.ts +20 -12
  439. package/src/resources/index.ts +11 -1
  440. package/src/resources/invoices.ts +112 -80
  441. package/src/resources/leads.ts +64 -42
  442. package/src/resources/ledger-accounts.ts +10 -8
  443. package/src/resources/members.ts +18 -19
  444. package/src/resources/memberships.ts +69 -51
  445. package/src/resources/messages.ts +51 -32
  446. package/src/resources/notifications.ts +33 -25
  447. package/src/resources/payment-methods.ts +212 -114
  448. package/src/resources/payments.ts +78 -39
  449. package/src/resources/payout-methods.ts +44 -29
  450. package/src/resources/plans.ts +121 -90
  451. package/src/resources/products.ts +219 -68
  452. package/src/resources/promo-codes.ts +41 -31
  453. package/src/resources/reactions.ts +24 -18
  454. package/src/resources/refunds.ts +45 -29
  455. package/src/resources/reviews.ts +66 -50
  456. package/src/resources/setup-intents.ts +61 -43
  457. package/src/resources/shared.ts +2649 -388
  458. package/src/resources/shipments.ts +26 -17
  459. package/src/resources/support-channels.ts +32 -19
  460. package/src/resources/topups.ts +11 -9
  461. package/src/resources/transfers.ts +35 -29
  462. package/src/resources/users.ts +20 -16
  463. package/src/resources/verifications.ts +6 -4
  464. package/src/resources/webhooks.ts +404 -95
  465. package/src/resources/withdrawals.ts +53 -43
  466. package/src/version.ts +1 -1
  467. package/version.d.mts +1 -1
  468. package/version.d.ts +1 -1
  469. package/version.js +1 -1
  470. 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 DisputeAlertsAPI from './dispute-alerts';
4
5
  import * as DisputesAPI from './disputes';
5
6
  import * as PaymentsAPI from './payments';
6
7
  import * as PayoutMethodsAPI from './payout-methods';
@@ -35,7 +36,7 @@ export class Webhooks extends APIResource {
35
36
  }
36
37
 
37
38
  /**
38
- * Retrieves a webhook by ID
39
+ * Retrieves the details of an existing webhook.
39
40
  *
40
41
  * Required permissions:
41
42
  *
@@ -75,7 +76,8 @@ export class Webhooks extends APIResource {
75
76
  }
76
77
 
77
78
  /**
78
- * Lists webhooks for a company
79
+ * Returns a paginated list of webhook endpoints configured for a company, ordered
80
+ * by most recently created.
79
81
  *
80
82
  * Required permissions:
81
83
  *
@@ -148,14 +150,14 @@ export interface Webhook {
148
150
  id: string;
149
151
 
150
152
  /**
151
- * The API version for this webhook
153
+ * The API version used to format payloads sent to this webhook endpoint.
152
154
  */
153
155
  api_version: APIVersion;
154
156
 
155
157
  /**
156
- * Whether or not to send events for child resources. For example, if the webhook
157
- * is created for a Company, enabling this will only send events from the Company's
158
- * sub-merchants (child companies).
158
+ * Whether events are sent for child resources. For example, if the webhook is on a
159
+ * company, enabling this sends events only from the company's sub-merchants (child
160
+ * companies).
159
161
  */
160
162
  child_resource_events: boolean;
161
163
 
@@ -165,27 +167,27 @@ export interface Webhook {
165
167
  created_at: string;
166
168
 
167
169
  /**
168
- * Whether or not this webhook is turned on or not
170
+ * Whether this webhook endpoint is currently active and receiving events.
169
171
  */
170
172
  enabled: boolean;
171
173
 
172
174
  /**
173
- * The number of events this webhooks is configured to receive
175
+ * The list of event types this webhook is subscribed to.
174
176
  */
175
177
  events: Array<WebhookEvent>;
176
178
 
177
179
  /**
178
- * The resource ID
180
+ * The ID of the resource (company or product) this webhook is attached to.
179
181
  */
180
182
  resource_id: string;
181
183
 
182
184
  /**
183
- * The list of events that can be tested with this webhook
185
+ * The subset of subscribed event types that support sending test payloads.
184
186
  */
185
187
  testable_events: Array<WebhookEvent>;
186
188
 
187
189
  /**
188
- * The URL the webhook events will be sent to
190
+ * The destination URL where webhook payloads are delivered via HTTP POST.
189
191
  */
190
192
  url: string;
191
193
  }
@@ -220,6 +222,7 @@ export type WebhookEvent =
220
222
  | 'dispute.updated'
221
223
  | 'refund.created'
222
224
  | 'refund.updated'
225
+ | 'dispute_alert.created'
223
226
  | 'membership.cancel_at_period_end_changed';
224
227
 
225
228
  /**
@@ -233,14 +236,14 @@ export interface WebhookCreateResponse {
233
236
  id: string;
234
237
 
235
238
  /**
236
- * The API version for this webhook
239
+ * The API version used to format payloads sent to this webhook endpoint.
237
240
  */
238
241
  api_version: APIVersion;
239
242
 
240
243
  /**
241
- * Whether or not to send events for child resources. For example, if the webhook
242
- * is created for a Company, enabling this will only send events from the Company's
243
- * sub-merchants (child companies).
244
+ * Whether events are sent for child resources. For example, if the webhook is on a
245
+ * company, enabling this sends events only from the company's sub-merchants (child
246
+ * companies).
244
247
  */
245
248
  child_resource_events: boolean;
246
249
 
@@ -250,32 +253,33 @@ export interface WebhookCreateResponse {
250
253
  created_at: string;
251
254
 
252
255
  /**
253
- * Whether or not this webhook is turned on or not
256
+ * Whether this webhook endpoint is currently active and receiving events.
254
257
  */
255
258
  enabled: boolean;
256
259
 
257
260
  /**
258
- * The number of events this webhooks is configured to receive
261
+ * The list of event types this webhook is subscribed to.
259
262
  */
260
263
  events: Array<WebhookEvent>;
261
264
 
262
265
  /**
263
- * The resource ID
266
+ * The ID of the resource (company or product) this webhook is attached to.
264
267
  */
265
268
  resource_id: string;
266
269
 
267
270
  /**
268
- * The list of events that can be tested with this webhook
271
+ * The subset of subscribed event types that support sending test payloads.
269
272
  */
270
273
  testable_events: Array<WebhookEvent>;
271
274
 
272
275
  /**
273
- * The URL the webhook events will be sent to
276
+ * The destination URL where webhook payloads are delivered via HTTP POST.
274
277
  */
275
278
  url: string;
276
279
 
277
280
  /**
278
- * A unique secret key that will be sent with each webhook event
281
+ * The secret key used to sign webhook payloads for verification. Include this in
282
+ * your HMAC validation logic.
279
283
  */
280
284
  webhook_secret: string;
281
285
  }
@@ -291,14 +295,14 @@ export interface WebhookListResponse {
291
295
  id: string;
292
296
 
293
297
  /**
294
- * The API version for this webhook
298
+ * The API version used to format payloads sent to this webhook endpoint.
295
299
  */
296
300
  api_version: APIVersion;
297
301
 
298
302
  /**
299
- * Whether or not to send events for child resources. For example, if the webhook
300
- * is created for a Company, enabling this will only send events from the Company's
301
- * sub-merchants (child companies).
303
+ * Whether events are sent for child resources. For example, if the webhook is on a
304
+ * company, enabling this sends events only from the company's sub-merchants (child
305
+ * companies).
302
306
  */
303
307
  child_resource_events: boolean;
304
308
 
@@ -308,17 +312,17 @@ export interface WebhookListResponse {
308
312
  created_at: string;
309
313
 
310
314
  /**
311
- * Whether or not this webhook is turned on or not
315
+ * Whether this webhook endpoint is currently active and receiving events.
312
316
  */
313
317
  enabled: boolean;
314
318
 
315
319
  /**
316
- * The number of events this webhooks is configured to receive
320
+ * The list of event types this webhook is subscribed to.
317
321
  */
318
322
  events: Array<WebhookEvent>;
319
323
 
320
324
  /**
321
- * The URL the webhook events will be sent to
325
+ * The destination URL where webhook payloads are delivered via HTTP POST.
322
326
  */
323
327
  url: string;
324
328
  }
@@ -340,7 +344,9 @@ export interface InvoiceCreatedWebhookEvent {
340
344
  api_version: 'v1';
341
345
 
342
346
  /**
343
- * A statement that defines an amount due by a customer.
347
+ * An invoice represents an itemized bill sent by a company to a customer for a
348
+ * specific product and plan, tracking the amount owed, due date, and payment
349
+ * status.
344
350
  */
345
351
  data: Shared.Invoice;
346
352
 
@@ -372,7 +378,9 @@ export interface InvoicePaidWebhookEvent {
372
378
  api_version: 'v1';
373
379
 
374
380
  /**
375
- * A statement that defines an amount due by a customer.
381
+ * An invoice represents an itemized bill sent by a company to a customer for a
382
+ * specific product and plan, tracking the amount owed, due date, and payment
383
+ * status.
376
384
  */
377
385
  data: Shared.Invoice;
378
386
 
@@ -404,7 +412,9 @@ export interface InvoicePastDueWebhookEvent {
404
412
  api_version: 'v1';
405
413
 
406
414
  /**
407
- * A statement that defines an amount due by a customer.
415
+ * An invoice represents an itemized bill sent by a company to a customer for a
416
+ * specific product and plan, tracking the amount owed, due date, and payment
417
+ * status.
408
418
  */
409
419
  data: Shared.Invoice;
410
420
 
@@ -436,7 +446,9 @@ export interface InvoiceVoidedWebhookEvent {
436
446
  api_version: 'v1';
437
447
 
438
448
  /**
439
- * A statement that defines an amount due by a customer.
449
+ * An invoice represents an itemized bill sent by a company to a customer for a
450
+ * specific product and plan, tracking the amount owed, due date, and payment
451
+ * status.
440
452
  */
441
453
  data: Shared.Invoice;
442
454
 
@@ -662,7 +674,8 @@ export interface SetupIntentRequiresActionWebhookEvent {
662
674
  api_version: 'v1';
663
675
 
664
676
  /**
665
- * A setup intent allows a user to save a payment method without making a purchase.
677
+ * A setup intent allows a user to save a payment method for future use without
678
+ * making an immediate purchase.
666
679
  */
667
680
  data: SetupIntentsAPI.SetupIntent;
668
681
 
@@ -694,7 +707,8 @@ export interface SetupIntentSucceededWebhookEvent {
694
707
  api_version: 'v1';
695
708
 
696
709
  /**
697
- * A setup intent allows a user to save a payment method without making a purchase.
710
+ * A setup intent allows a user to save a payment method for future use without
711
+ * making an immediate purchase.
698
712
  */
699
713
  data: SetupIntentsAPI.SetupIntent;
700
714
 
@@ -726,7 +740,8 @@ export interface SetupIntentCanceledWebhookEvent {
726
740
  api_version: 'v1';
727
741
 
728
742
  /**
729
- * A setup intent allows a user to save a payment method without making a purchase.
743
+ * A setup intent allows a user to save a payment method for future use without
744
+ * making an immediate purchase.
730
745
  */
731
746
  data: SetupIntentsAPI.SetupIntent;
732
747
 
@@ -758,8 +773,8 @@ export interface WithdrawalCreatedWebhookEvent {
758
773
  api_version: 'v1';
759
774
 
760
775
  /**
761
- * A withdrawal represents a request to transfer funds from a company's ledger
762
- * account to an external payout method.
776
+ * A withdrawal represents a request to transfer funds from a ledger account to an
777
+ * external payout method.
763
778
  */
764
779
  data: WithdrawalsAPI.Withdrawal;
765
780
 
@@ -791,8 +806,8 @@ export interface WithdrawalUpdatedWebhookEvent {
791
806
  api_version: 'v1';
792
807
 
793
808
  /**
794
- * A withdrawal represents a request to transfer funds from a company's ledger
795
- * account to an external payout method.
809
+ * A withdrawal represents a request to transfer funds from a ledger account to an
810
+ * external payout method.
796
811
  */
797
812
  data: WithdrawalsAPI.Withdrawal;
798
813
 
@@ -824,7 +839,8 @@ export interface CourseLessonInteractionCompletedWebhookEvent {
824
839
  api_version: 'v1';
825
840
 
826
841
  /**
827
- * A lesson interaction tracking user progress in courses
842
+ * A record of a user's progress on a specific lesson, tracking whether they have
843
+ * completed it.
828
844
  */
829
845
  data: Shared.CourseLessonInteraction;
830
846
 
@@ -856,7 +872,8 @@ export interface PayoutMethodCreatedWebhookEvent {
856
872
  api_version: 'v1';
857
873
 
858
874
  /**
859
- * An object representing an user's setup payout destination.
875
+ * A configured payout destination where a user receives earned funds, such as a
876
+ * bank account or digital wallet.
860
877
  */
861
878
  data: PayoutMethodCreatedWebhookEvent.Data;
862
879
 
@@ -878,7 +895,8 @@ export interface PayoutMethodCreatedWebhookEvent {
878
895
 
879
896
  export namespace PayoutMethodCreatedWebhookEvent {
880
897
  /**
881
- * An object representing an user's setup payout destination.
898
+ * A configured payout destination where a user receives earned funds, such as a
899
+ * bank account or digital wallet.
882
900
  */
883
901
  export interface Data {
884
902
  /**
@@ -887,13 +905,14 @@ export namespace PayoutMethodCreatedWebhookEvent {
887
905
  id: string;
888
906
 
889
907
  /**
890
- * A reference to identify the payout destination, such as the last 4 digits of an
891
- * account number or an email address.
908
+ * A masked identifier for the payout destination, such as the last four digits of
909
+ * a bank account or an email address. Null if no reference is available.
892
910
  */
893
911
  account_reference: string | null;
894
912
 
895
913
  /**
896
- * The company associated with the payout token
914
+ * The company associated with this payout destination. Null if not linked to a
915
+ * specific company.
897
916
  */
898
917
  company: Data.Company | null;
899
918
 
@@ -903,36 +922,40 @@ export namespace PayoutMethodCreatedWebhookEvent {
903
922
  created_at: string;
904
923
 
905
924
  /**
906
- * The currency code of the payout destination. This is the currency that payouts
907
- * will be made in for this token.
925
+ * The three-letter ISO currency code that payouts are delivered in for this
926
+ * destination.
908
927
  */
909
928
  currency: string;
910
929
 
911
930
  /**
912
- * The payout destination associated with the payout token
931
+ * The payout destination configuration linked to this token. Null if not yet
932
+ * configured.
913
933
  */
914
934
  destination: Data.Destination | null;
915
935
 
916
936
  /**
917
- * The name of the bank or financial institution.
937
+ * The name of the bank or financial institution receiving payouts. Null if not
938
+ * applicable or not provided.
918
939
  */
919
940
  institution_name: string | null;
920
941
 
921
942
  /**
922
- * Whether this payout token is the default for the payout account
943
+ * Whether this is the default payout destination for the associated payout
944
+ * account.
923
945
  */
924
946
  is_default: boolean;
925
947
 
926
948
  /**
927
- * An optional nickname for the payout token to help the user identify it. This is
928
- * not used by the provider and is only for the user's reference.
949
+ * A user-defined label to help identify this payout destination. Not sent to the
950
+ * provider. Null if no nickname has been set.
929
951
  */
930
952
  nickname: string | null;
931
953
  }
932
954
 
933
955
  export namespace Data {
934
956
  /**
935
- * The company associated with the payout token
957
+ * The company associated with this payout destination. Null if not linked to a
958
+ * specific company.
936
959
  */
937
960
  export interface Company {
938
961
  /**
@@ -942,7 +965,8 @@ export namespace PayoutMethodCreatedWebhookEvent {
942
965
  }
943
966
 
944
967
  /**
945
- * The payout destination associated with the payout token
968
+ * The payout destination configuration linked to this token. Null if not yet
969
+ * configured.
946
970
  */
947
971
  export interface Destination {
948
972
  /**
@@ -975,7 +999,8 @@ export interface VerificationSucceededWebhookEvent {
975
999
  api_version: 'v1';
976
1000
 
977
1001
  /**
978
- * An object representing an identity verification session
1002
+ * An identity verification session used to confirm a person or entity's identity
1003
+ * for payout account eligibility.
979
1004
  */
980
1005
  data: VerificationSucceededWebhookEvent.Data;
981
1006
 
@@ -997,7 +1022,8 @@ export interface VerificationSucceededWebhookEvent {
997
1022
 
998
1023
  export namespace VerificationSucceededWebhookEvent {
999
1024
  /**
1000
- * An object representing an identity verification session
1025
+ * An identity verification session used to confirm a person or entity's identity
1026
+ * for payout account eligibility.
1001
1027
  */
1002
1028
  export interface Data {
1003
1029
  /**
@@ -1011,12 +1037,13 @@ export namespace VerificationSucceededWebhookEvent {
1011
1037
  last_error_code: VerificationsAPI.VerificationErrorCode | null;
1012
1038
 
1013
1039
  /**
1014
- * The last error reason that occurred during the verification.
1040
+ * A human-readable explanation of the most recent verification error. Null if no
1041
+ * error has occurred.
1015
1042
  */
1016
1043
  last_error_reason: string | null;
1017
1044
 
1018
1045
  /**
1019
- * The status of the verification.
1046
+ * The current status of this verification session.
1020
1047
  */
1021
1048
  status: VerificationsAPI.VerificationStatus;
1022
1049
  }
@@ -1034,8 +1061,8 @@ export interface PaymentCreatedWebhookEvent {
1034
1061
  api_version: 'v1';
1035
1062
 
1036
1063
  /**
1037
- * A payment represents a completed or attempted charge for a membership. Payments
1038
- * track the amount, status, currency, and payment method used.
1064
+ * A payment represents a completed or attempted charge. Payments track the amount,
1065
+ * status, currency, and payment method used.
1039
1066
  */
1040
1067
  data: Shared.Payment;
1041
1068
 
@@ -1067,8 +1094,8 @@ export interface PaymentSucceededWebhookEvent {
1067
1094
  api_version: 'v1';
1068
1095
 
1069
1096
  /**
1070
- * A payment represents a completed or attempted charge for a membership. Payments
1071
- * track the amount, status, currency, and payment method used.
1097
+ * A payment represents a completed or attempted charge. Payments track the amount,
1098
+ * status, currency, and payment method used.
1072
1099
  */
1073
1100
  data: Shared.Payment;
1074
1101
 
@@ -1100,8 +1127,8 @@ export interface PaymentFailedWebhookEvent {
1100
1127
  api_version: 'v1';
1101
1128
 
1102
1129
  /**
1103
- * A payment represents a completed or attempted charge for a membership. Payments
1104
- * track the amount, status, currency, and payment method used.
1130
+ * A payment represents a completed or attempted charge. Payments track the amount,
1131
+ * status, currency, and payment method used.
1105
1132
  */
1106
1133
  data: Shared.Payment;
1107
1134
 
@@ -1133,8 +1160,8 @@ export interface PaymentPendingWebhookEvent {
1133
1160
  api_version: 'v1';
1134
1161
 
1135
1162
  /**
1136
- * A payment represents a completed or attempted charge for a membership. Payments
1137
- * track the amount, status, currency, and payment method used.
1163
+ * A payment represents a completed or attempted charge. Payments track the amount,
1164
+ * status, currency, and payment method used.
1138
1165
  */
1139
1166
  data: Shared.Payment;
1140
1167
 
@@ -1265,8 +1292,8 @@ export namespace RefundCreatedWebhookEvent {
1265
1292
  id: string;
1266
1293
 
1267
1294
  /**
1268
- * The amount of the refund. Provided as a number in the specified currency. Eg:
1269
- * 10.43 for $10.43 USD.
1295
+ * The refunded amount as a decimal in the specified currency, such as 10.43 for
1296
+ * $10.43 USD.
1270
1297
  */
1271
1298
  amount: number;
1272
1299
 
@@ -1276,22 +1303,24 @@ export namespace RefundCreatedWebhookEvent {
1276
1303
  created_at: string;
1277
1304
 
1278
1305
  /**
1279
- * The currency of the refund.
1306
+ * The three-letter ISO currency code for the refunded amount.
1280
1307
  */
1281
1308
  currency: Shared.Currency;
1282
1309
 
1283
1310
  /**
1284
- * The payment associated with the refund.
1311
+ * The original payment that this refund was issued against. Null if the payment is
1312
+ * no longer available.
1285
1313
  */
1286
1314
  payment: Data.Payment | null;
1287
1315
 
1288
1316
  /**
1289
- * The provider of the refund.
1317
+ * The payment provider that processed the refund.
1290
1318
  */
1291
1319
  provider: RefundsAPI.PaymentProvider;
1292
1320
 
1293
1321
  /**
1294
- * The time the refund was created by the provider.
1322
+ * The timestamp when the refund was created in the payment provider's system. Null
1323
+ * if not available from the provider.
1295
1324
  */
1296
1325
  provider_created_at: string | null;
1297
1326
 
@@ -1306,19 +1335,22 @@ export namespace RefundCreatedWebhookEvent {
1306
1335
  reference_type: RefundsAPI.RefundReferenceType | null;
1307
1336
 
1308
1337
  /**
1309
- * The value of the reference.
1338
+ * The tracking reference value from the payment processor, used to trace the
1339
+ * refund through banking networks. Null if no reference was provided.
1310
1340
  */
1311
1341
  reference_value: string | null;
1312
1342
 
1313
1343
  /**
1314
- * The status of the refund.
1344
+ * The current processing status of the refund, such as pending, succeeded, or
1345
+ * failed.
1315
1346
  */
1316
1347
  status: RefundsAPI.RefundStatus;
1317
1348
  }
1318
1349
 
1319
1350
  export namespace Data {
1320
1351
  /**
1321
- * The payment associated with the refund.
1352
+ * The original payment that this refund was issued against. Null if the payment is
1353
+ * no longer available.
1322
1354
  */
1323
1355
  export interface Payment {
1324
1356
  /**
@@ -1337,7 +1369,8 @@ export namespace RefundCreatedWebhookEvent {
1337
1369
  card_brand: PaymentsAPI.CardBrands | null;
1338
1370
 
1339
1371
  /**
1340
- * The last 4 digits of the card used to make the payment.
1372
+ * The last four digits of the card used to make this payment. Null if the payment
1373
+ * was not made with a card.
1341
1374
  */
1342
1375
  card_last4: string | null;
1343
1376
 
@@ -1367,7 +1400,8 @@ export namespace RefundCreatedWebhookEvent {
1367
1400
  membership: Payment.Membership | null;
1368
1401
 
1369
1402
  /**
1370
- * The datetime the payment was paid
1403
+ * The time at which this payment was successfully collected. Null if the payment
1404
+ * has not yet succeeded. As a Unix timestamp.
1371
1405
  */
1372
1406
  paid_at: string | null;
1373
1407
 
@@ -1438,17 +1472,18 @@ export namespace RefundCreatedWebhookEvent {
1438
1472
  id: string;
1439
1473
 
1440
1474
  /**
1441
- * The email of the user
1475
+ * The user's email address. Requires the member:email:read permission to access.
1476
+ * Null if not authorized.
1442
1477
  */
1443
1478
  email: string | null;
1444
1479
 
1445
1480
  /**
1446
- * The name of the user from their Whop account.
1481
+ * The user's display name shown on their public profile.
1447
1482
  */
1448
1483
  name: string | null;
1449
1484
 
1450
1485
  /**
1451
- * The username of the user from their Whop account.
1486
+ * The user's unique username shown on their public profile.
1452
1487
  */
1453
1488
  username: string;
1454
1489
  }
@@ -1501,8 +1536,8 @@ export namespace RefundUpdatedWebhookEvent {
1501
1536
  id: string;
1502
1537
 
1503
1538
  /**
1504
- * The amount of the refund. Provided as a number in the specified currency. Eg:
1505
- * 10.43 for $10.43 USD.
1539
+ * The refunded amount as a decimal in the specified currency, such as 10.43 for
1540
+ * $10.43 USD.
1506
1541
  */
1507
1542
  amount: number;
1508
1543
 
@@ -1512,22 +1547,24 @@ export namespace RefundUpdatedWebhookEvent {
1512
1547
  created_at: string;
1513
1548
 
1514
1549
  /**
1515
- * The currency of the refund.
1550
+ * The three-letter ISO currency code for the refunded amount.
1516
1551
  */
1517
1552
  currency: Shared.Currency;
1518
1553
 
1519
1554
  /**
1520
- * The payment associated with the refund.
1555
+ * The original payment that this refund was issued against. Null if the payment is
1556
+ * no longer available.
1521
1557
  */
1522
1558
  payment: Data.Payment | null;
1523
1559
 
1524
1560
  /**
1525
- * The provider of the refund.
1561
+ * The payment provider that processed the refund.
1526
1562
  */
1527
1563
  provider: RefundsAPI.PaymentProvider;
1528
1564
 
1529
1565
  /**
1530
- * The time the refund was created by the provider.
1566
+ * The timestamp when the refund was created in the payment provider's system. Null
1567
+ * if not available from the provider.
1531
1568
  */
1532
1569
  provider_created_at: string | null;
1533
1570
 
@@ -1542,19 +1579,286 @@ export namespace RefundUpdatedWebhookEvent {
1542
1579
  reference_type: RefundsAPI.RefundReferenceType | null;
1543
1580
 
1544
1581
  /**
1545
- * The value of the reference.
1582
+ * The tracking reference value from the payment processor, used to trace the
1583
+ * refund through banking networks. Null if no reference was provided.
1546
1584
  */
1547
1585
  reference_value: string | null;
1548
1586
 
1549
1587
  /**
1550
- * The status of the refund.
1588
+ * The current processing status of the refund, such as pending, succeeded, or
1589
+ * failed.
1551
1590
  */
1552
1591
  status: RefundsAPI.RefundStatus;
1553
1592
  }
1554
1593
 
1555
1594
  export namespace Data {
1556
1595
  /**
1557
- * The payment associated with the refund.
1596
+ * The original payment that this refund was issued against. Null if the payment is
1597
+ * no longer available.
1598
+ */
1599
+ export interface Payment {
1600
+ /**
1601
+ * The unique identifier for the payment.
1602
+ */
1603
+ id: string;
1604
+
1605
+ /**
1606
+ * The reason why a specific payment was billed
1607
+ */
1608
+ billing_reason: PaymentsAPI.BillingReasons | null;
1609
+
1610
+ /**
1611
+ * Possible card brands that a payment token can have
1612
+ */
1613
+ card_brand: PaymentsAPI.CardBrands | null;
1614
+
1615
+ /**
1616
+ * The last four digits of the card used to make this payment. Null if the payment
1617
+ * was not made with a card.
1618
+ */
1619
+ card_last4: string | null;
1620
+
1621
+ /**
1622
+ * The datetime the payment was created.
1623
+ */
1624
+ created_at: string;
1625
+
1626
+ /**
1627
+ * The available currencies on the platform
1628
+ */
1629
+ currency: Shared.Currency | null;
1630
+
1631
+ /**
1632
+ * When an alert came in that this transaction will be disputed
1633
+ */
1634
+ dispute_alerted_at: string | null;
1635
+
1636
+ /**
1637
+ * The member attached to this payment.
1638
+ */
1639
+ member: Payment.Member | null;
1640
+
1641
+ /**
1642
+ * The membership attached to this payment.
1643
+ */
1644
+ membership: Payment.Membership | null;
1645
+
1646
+ /**
1647
+ * The time at which this payment was successfully collected. Null if the payment
1648
+ * has not yet succeeded. As a Unix timestamp.
1649
+ */
1650
+ paid_at: string | null;
1651
+
1652
+ /**
1653
+ * The different types of payment methods that can be used.
1654
+ */
1655
+ payment_method_type: PaymentsAPI.PaymentMethodTypes | null;
1656
+
1657
+ /**
1658
+ * The subtotal to show to the creator (excluding buyer fees).
1659
+ */
1660
+ subtotal: number | null;
1661
+
1662
+ /**
1663
+ * The total to show to the creator (excluding buyer fees).
1664
+ */
1665
+ total: number | null;
1666
+
1667
+ /**
1668
+ * The total in USD to show to the creator (excluding buyer fees).
1669
+ */
1670
+ usd_total: number | null;
1671
+
1672
+ /**
1673
+ * The user that made this payment.
1674
+ */
1675
+ user: Payment.User | null;
1676
+ }
1677
+
1678
+ export namespace Payment {
1679
+ /**
1680
+ * The member attached to this payment.
1681
+ */
1682
+ export interface Member {
1683
+ /**
1684
+ * The unique identifier for the company member.
1685
+ */
1686
+ id: string;
1687
+
1688
+ /**
1689
+ * The phone number for the member, if available.
1690
+ */
1691
+ phone: string | null;
1692
+ }
1693
+
1694
+ /**
1695
+ * The membership attached to this payment.
1696
+ */
1697
+ export interface Membership {
1698
+ /**
1699
+ * The unique identifier for the membership.
1700
+ */
1701
+ id: string;
1702
+
1703
+ /**
1704
+ * The state of the membership.
1705
+ */
1706
+ status: Shared.MembershipStatus;
1707
+ }
1708
+
1709
+ /**
1710
+ * The user that made this payment.
1711
+ */
1712
+ export interface User {
1713
+ /**
1714
+ * The unique identifier for the user.
1715
+ */
1716
+ id: string;
1717
+
1718
+ /**
1719
+ * The user's email address. Requires the member:email:read permission to access.
1720
+ * Null if not authorized.
1721
+ */
1722
+ email: string | null;
1723
+
1724
+ /**
1725
+ * The user's display name shown on their public profile.
1726
+ */
1727
+ name: string | null;
1728
+
1729
+ /**
1730
+ * The user's unique username shown on their public profile.
1731
+ */
1732
+ username: string;
1733
+ }
1734
+ }
1735
+ }
1736
+ }
1737
+
1738
+ export interface DisputeAlertCreatedWebhookEvent {
1739
+ /**
1740
+ * A unique ID for every single webhook request
1741
+ */
1742
+ id: string;
1743
+
1744
+ /**
1745
+ * The API version for this webhook
1746
+ */
1747
+ api_version: 'v1';
1748
+
1749
+ /**
1750
+ * A dispute alert represents an early warning notification from a payment
1751
+ * processor about a potential dispute or chargeback.
1752
+ */
1753
+ data: DisputeAlertCreatedWebhookEvent.Data;
1754
+
1755
+ /**
1756
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
1757
+ */
1758
+ timestamp: string;
1759
+
1760
+ /**
1761
+ * The webhook event type
1762
+ */
1763
+ type: 'dispute_alert.created';
1764
+
1765
+ /**
1766
+ * The company ID that this webhook event is associated with
1767
+ */
1768
+ company_id?: string | null;
1769
+ }
1770
+
1771
+ export namespace DisputeAlertCreatedWebhookEvent {
1772
+ /**
1773
+ * A dispute alert represents an early warning notification from a payment
1774
+ * processor about a potential dispute or chargeback.
1775
+ */
1776
+ export interface Data {
1777
+ /**
1778
+ * The unique identifier of the dispute alert.
1779
+ */
1780
+ id: string;
1781
+
1782
+ /**
1783
+ * The type of the dispute alert.
1784
+ */
1785
+ alert_type: DisputeAlertsAPI.DisputeAlertType;
1786
+
1787
+ /**
1788
+ * The alerted amount in the specified currency.
1789
+ */
1790
+ amount: number;
1791
+
1792
+ /**
1793
+ * Whether this alert incurs a charge.
1794
+ */
1795
+ charge_for_alert: boolean;
1796
+
1797
+ /**
1798
+ * The time the dispute alert was created.
1799
+ */
1800
+ created_at: string;
1801
+
1802
+ /**
1803
+ * The three-letter ISO currency code for the alerted amount.
1804
+ */
1805
+ currency: Shared.Currency;
1806
+
1807
+ /**
1808
+ * The dispute associated with the dispute alert.
1809
+ */
1810
+ dispute: Data.Dispute | null;
1811
+
1812
+ /**
1813
+ * The payment associated with the dispute alert.
1814
+ */
1815
+ payment: Data.Payment | null;
1816
+
1817
+ /**
1818
+ * The date of the original transaction.
1819
+ */
1820
+ transaction_date: string | null;
1821
+ }
1822
+
1823
+ export namespace Data {
1824
+ /**
1825
+ * The dispute associated with the dispute alert.
1826
+ */
1827
+ export interface Dispute {
1828
+ /**
1829
+ * The unique identifier for the dispute.
1830
+ */
1831
+ id: string;
1832
+
1833
+ /**
1834
+ * The disputed amount in the specified currency, formatted as a decimal.
1835
+ */
1836
+ amount: number;
1837
+
1838
+ /**
1839
+ * The datetime the dispute was created.
1840
+ */
1841
+ created_at: string | null;
1842
+
1843
+ /**
1844
+ * The three-letter ISO currency code for the disputed amount.
1845
+ */
1846
+ currency: Shared.Currency;
1847
+
1848
+ /**
1849
+ * A human-readable reason for the dispute.
1850
+ */
1851
+ reason: string | null;
1852
+
1853
+ /**
1854
+ * The current status of the dispute lifecycle, such as needs_response,
1855
+ * under_review, won, or lost.
1856
+ */
1857
+ status: DisputesAPI.DisputeStatuses;
1858
+ }
1859
+
1860
+ /**
1861
+ * The payment associated with the dispute alert.
1558
1862
  */
1559
1863
  export interface Payment {
1560
1864
  /**
@@ -1573,7 +1877,8 @@ export namespace RefundUpdatedWebhookEvent {
1573
1877
  card_brand: PaymentsAPI.CardBrands | null;
1574
1878
 
1575
1879
  /**
1576
- * The last 4 digits of the card used to make the payment.
1880
+ * The last four digits of the card used to make this payment. Null if the payment
1881
+ * was not made with a card.
1577
1882
  */
1578
1883
  card_last4: string | null;
1579
1884
 
@@ -1603,7 +1908,8 @@ export namespace RefundUpdatedWebhookEvent {
1603
1908
  membership: Payment.Membership | null;
1604
1909
 
1605
1910
  /**
1606
- * The datetime the payment was paid
1911
+ * The time at which this payment was successfully collected. Null if the payment
1912
+ * has not yet succeeded. As a Unix timestamp.
1607
1913
  */
1608
1914
  paid_at: string | null;
1609
1915
 
@@ -1674,17 +1980,18 @@ export namespace RefundUpdatedWebhookEvent {
1674
1980
  id: string;
1675
1981
 
1676
1982
  /**
1677
- * The email of the user
1983
+ * The user's email address. Requires the member:email:read permission to access.
1984
+ * Null if not authorized.
1678
1985
  */
1679
1986
  email: string | null;
1680
1987
 
1681
1988
  /**
1682
- * The name of the user from their Whop account.
1989
+ * The user's display name shown on their public profile.
1683
1990
  */
1684
1991
  name: string | null;
1685
1992
 
1686
1993
  /**
1687
- * The username of the user from their Whop account.
1994
+ * The user's unique username shown on their public profile.
1688
1995
  */
1689
1996
  username: string;
1690
1997
  }
@@ -1752,6 +2059,7 @@ export type UnwrapWebhookEvent =
1752
2059
  | DisputeUpdatedWebhookEvent
1753
2060
  | RefundCreatedWebhookEvent
1754
2061
  | RefundUpdatedWebhookEvent
2062
+ | DisputeAlertCreatedWebhookEvent
1755
2063
  | MembershipCancelAtPeriodEndChangedWebhookEvent;
1756
2064
 
1757
2065
  export interface WebhookCreateParams {
@@ -1817,7 +2125,7 @@ export interface WebhookUpdateParams {
1817
2125
 
1818
2126
  export interface WebhookListParams extends CursorPageParams {
1819
2127
  /**
1820
- * The ID of the company to list webhooks for
2128
+ * The unique identifier of the company to list webhooks for.
1821
2129
  */
1822
2130
  company_id: string;
1823
2131
 
@@ -1871,6 +2179,7 @@ export declare namespace Webhooks {
1871
2179
  type DisputeUpdatedWebhookEvent as DisputeUpdatedWebhookEvent,
1872
2180
  type RefundCreatedWebhookEvent as RefundCreatedWebhookEvent,
1873
2181
  type RefundUpdatedWebhookEvent as RefundUpdatedWebhookEvent,
2182
+ type DisputeAlertCreatedWebhookEvent as DisputeAlertCreatedWebhookEvent,
1874
2183
  type MembershipCancelAtPeriodEndChangedWebhookEvent as MembershipCancelAtPeriodEndChangedWebhookEvent,
1875
2184
  type UnwrapWebhookEvent as UnwrapWebhookEvent,
1876
2185
  type WebhookListResponsesCursorPage as WebhookListResponsesCursorPage,