@whop/sdk 0.0.27 → 0.0.28
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.
- package/CHANGELOG.md +41 -0
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js +7 -0
- package/client.js.map +1 -1
- package/client.mjs +7 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/access-tokens.d.mts +19 -20
- package/resources/access-tokens.d.mts.map +1 -1
- package/resources/access-tokens.d.ts +19 -20
- package/resources/access-tokens.d.ts.map +1 -1
- package/resources/access-tokens.js +4 -4
- package/resources/access-tokens.mjs +4 -4
- package/resources/account-links.d.mts +15 -13
- package/resources/account-links.d.mts.map +1 -1
- package/resources/account-links.d.ts +15 -13
- package/resources/account-links.d.ts.map +1 -1
- package/resources/account-links.js +2 -3
- package/resources/account-links.js.map +1 -1
- package/resources/account-links.mjs +2 -3
- package/resources/account-links.mjs.map +1 -1
- package/resources/ai-chats.d.mts +38 -26
- package/resources/ai-chats.d.mts.map +1 -1
- package/resources/ai-chats.d.ts +38 -26
- package/resources/ai-chats.d.ts.map +1 -1
- package/resources/ai-chats.js +5 -5
- package/resources/ai-chats.mjs +5 -5
- package/resources/app-builds.d.mts +35 -33
- package/resources/app-builds.d.mts.map +1 -1
- package/resources/app-builds.d.ts +35 -33
- package/resources/app-builds.d.ts.map +1 -1
- package/resources/app-builds.js +7 -4
- package/resources/app-builds.js.map +1 -1
- package/resources/app-builds.mjs +7 -4
- package/resources/app-builds.mjs.map +1 -1
- package/resources/apps.d.mts +81 -56
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +81 -56
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +7 -4
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +7 -4
- package/resources/apps.mjs.map +1 -1
- package/resources/authorized-users.d.mts +32 -26
- package/resources/authorized-users.d.mts.map +1 -1
- package/resources/authorized-users.d.ts +32 -26
- package/resources/authorized-users.d.ts.map +1 -1
- package/resources/authorized-users.js +3 -2
- package/resources/authorized-users.js.map +1 -1
- package/resources/authorized-users.mjs +3 -2
- package/resources/authorized-users.mjs.map +1 -1
- package/resources/chat-channels.d.mts +27 -19
- package/resources/chat-channels.d.mts.map +1 -1
- package/resources/chat-channels.d.ts +27 -19
- package/resources/chat-channels.d.ts.map +1 -1
- package/resources/chat-channels.js +5 -3
- package/resources/chat-channels.js.map +1 -1
- package/resources/chat-channels.mjs +5 -3
- package/resources/chat-channels.mjs.map +1 -1
- package/resources/checkout-configurations.d.mts +55 -46
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +55 -46
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/checkout-configurations.js +3 -2
- package/resources/checkout-configurations.js.map +1 -1
- package/resources/checkout-configurations.mjs +3 -2
- package/resources/checkout-configurations.mjs.map +1 -1
- package/resources/companies.d.mts +65 -46
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +65 -46
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.js +7 -8
- package/resources/companies.js.map +1 -1
- package/resources/companies.mjs +7 -8
- package/resources/companies.mjs.map +1 -1
- package/resources/company-token-transactions.d.mts +80 -57
- package/resources/company-token-transactions.d.mts.map +1 -1
- package/resources/company-token-transactions.d.ts +80 -57
- package/resources/company-token-transactions.d.ts.map +1 -1
- package/resources/company-token-transactions.js +6 -3
- package/resources/company-token-transactions.js.map +1 -1
- package/resources/company-token-transactions.mjs +6 -3
- package/resources/company-token-transactions.mjs.map +1 -1
- package/resources/course-chapters.d.mts +24 -19
- package/resources/course-chapters.d.mts.map +1 -1
- package/resources/course-chapters.d.ts +24 -19
- package/resources/course-chapters.d.ts.map +1 -1
- package/resources/course-chapters.js +5 -5
- package/resources/course-chapters.mjs +5 -5
- package/resources/course-lesson-interactions.d.mts +7 -6
- package/resources/course-lesson-interactions.d.mts.map +1 -1
- package/resources/course-lesson-interactions.d.ts +7 -6
- package/resources/course-lesson-interactions.d.ts.map +1 -1
- package/resources/course-lesson-interactions.js +3 -2
- package/resources/course-lesson-interactions.js.map +1 -1
- package/resources/course-lesson-interactions.mjs +3 -2
- package/resources/course-lesson-interactions.mjs.map +1 -1
- package/resources/course-lessons.d.mts +126 -84
- package/resources/course-lessons.d.mts.map +1 -1
- package/resources/course-lessons.d.ts +126 -84
- package/resources/course-lessons.d.ts.map +1 -1
- package/resources/course-lessons.js +12 -8
- package/resources/course-lessons.js.map +1 -1
- package/resources/course-lessons.mjs +12 -8
- package/resources/course-lessons.mjs.map +1 -1
- package/resources/course-students.d.mts +38 -29
- package/resources/course-students.d.mts.map +1 -1
- package/resources/course-students.d.ts +38 -29
- package/resources/course-students.d.ts.map +1 -1
- package/resources/course-students.js +3 -2
- package/resources/course-students.js.map +1 -1
- package/resources/course-students.mjs +3 -2
- package/resources/course-students.mjs.map +1 -1
- package/resources/courses.d.mts +132 -91
- package/resources/courses.d.mts.map +1 -1
- package/resources/courses.d.ts +132 -91
- package/resources/courses.d.ts.map +1 -1
- package/resources/courses.js +9 -5
- package/resources/courses.js.map +1 -1
- package/resources/courses.mjs +9 -5
- package/resources/courses.mjs.map +1 -1
- package/resources/disputes.d.mts +156 -102
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +156 -102
- package/resources/disputes.d.ts.map +1 -1
- package/resources/disputes.js +4 -2
- package/resources/disputes.js.map +1 -1
- package/resources/disputes.mjs +4 -2
- package/resources/disputes.mjs.map +1 -1
- package/resources/dm-channels.d.mts +29 -16
- package/resources/dm-channels.d.mts.map +1 -1
- package/resources/dm-channels.d.ts +29 -16
- package/resources/dm-channels.d.ts.map +1 -1
- package/resources/dm-channels.js +9 -5
- package/resources/dm-channels.js.map +1 -1
- package/resources/dm-channels.mjs +9 -5
- package/resources/dm-channels.mjs.map +1 -1
- package/resources/dm-members.d.mts +30 -21
- package/resources/dm-members.d.mts.map +1 -1
- package/resources/dm-members.d.ts +30 -21
- package/resources/dm-members.d.ts.map +1 -1
- package/resources/dm-members.js +9 -5
- package/resources/dm-members.js.map +1 -1
- package/resources/dm-members.mjs +9 -5
- package/resources/dm-members.mjs.map +1 -1
- package/resources/entries.d.mts +29 -21
- package/resources/entries.d.mts.map +1 -1
- package/resources/entries.d.ts +29 -21
- package/resources/entries.d.ts.map +1 -1
- package/resources/entries.js +7 -4
- package/resources/entries.js.map +1 -1
- package/resources/entries.mjs +7 -4
- package/resources/entries.mjs.map +1 -1
- package/resources/experiences.d.mts +53 -45
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +53 -45
- package/resources/experiences.d.ts.map +1 -1
- package/resources/experiences.js +6 -5
- package/resources/experiences.js.map +1 -1
- package/resources/experiences.mjs +6 -5
- package/resources/experiences.mjs.map +1 -1
- package/resources/fee-markups.d.mts +32 -21
- package/resources/fee-markups.d.mts.map +1 -1
- package/resources/fee-markups.d.ts +32 -21
- package/resources/fee-markups.d.ts.map +1 -1
- package/resources/fee-markups.js +6 -3
- package/resources/fee-markups.js.map +1 -1
- package/resources/fee-markups.mjs +6 -3
- package/resources/fee-markups.mjs.map +1 -1
- package/resources/files.d.mts +21 -17
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +21 -17
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +3 -2
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +3 -2
- package/resources/files.mjs.map +1 -1
- package/resources/forum-posts.d.mts +62 -43
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +62 -43
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/forum-posts.js +8 -4
- package/resources/forum-posts.js.map +1 -1
- package/resources/forum-posts.mjs +8 -4
- package/resources/forum-posts.mjs.map +1 -1
- package/resources/forums.d.mts +20 -12
- package/resources/forums.d.mts.map +1 -1
- package/resources/forums.d.ts +20 -12
- package/resources/forums.d.ts.map +1 -1
- package/resources/forums.js +5 -3
- package/resources/forums.js.map +1 -1
- package/resources/forums.mjs +5 -3
- package/resources/forums.mjs.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +108 -80
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +108 -80
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +7 -4
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +7 -4
- package/resources/invoices.mjs.map +1 -1
- package/resources/leads.d.mts +64 -42
- package/resources/leads.d.mts.map +1 -1
- package/resources/leads.d.ts +64 -42
- package/resources/leads.d.ts.map +1 -1
- package/resources/leads.js +6 -4
- package/resources/leads.js.map +1 -1
- package/resources/leads.mjs +6 -4
- package/resources/leads.mjs.map +1 -1
- package/resources/ledger-accounts.d.mts +10 -8
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +10 -8
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js +1 -1
- package/resources/ledger-accounts.mjs +1 -1
- package/resources/members.d.mts +18 -19
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +18 -19
- package/resources/members.d.ts.map +1 -1
- package/resources/members.js +3 -2
- package/resources/members.js.map +1 -1
- package/resources/members.mjs +3 -2
- package/resources/members.mjs.map +1 -1
- package/resources/memberships.d.mts +69 -51
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +69 -51
- package/resources/memberships.d.ts.map +1 -1
- package/resources/memberships.js +12 -8
- package/resources/memberships.js.map +1 -1
- package/resources/memberships.mjs +12 -8
- package/resources/memberships.mjs.map +1 -1
- package/resources/messages.d.mts +46 -32
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +46 -32
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +9 -5
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +9 -5
- package/resources/messages.mjs.map +1 -1
- package/resources/notifications.d.mts +33 -25
- package/resources/notifications.d.mts.map +1 -1
- package/resources/notifications.d.ts +33 -25
- package/resources/notifications.d.ts.map +1 -1
- package/resources/notifications.js +2 -1
- package/resources/notifications.js.map +1 -1
- package/resources/notifications.mjs +2 -1
- package/resources/notifications.mjs.map +1 -1
- package/resources/payment-methods.d.mts +212 -114
- package/resources/payment-methods.d.mts.map +1 -1
- package/resources/payment-methods.d.ts +212 -114
- package/resources/payment-methods.d.ts.map +1 -1
- package/resources/payment-methods.js +5 -10
- package/resources/payment-methods.js.map +1 -1
- package/resources/payment-methods.mjs +5 -10
- package/resources/payment-methods.mjs.map +1 -1
- package/resources/payments.d.mts +73 -40
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +73 -40
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +23 -10
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +23 -10
- package/resources/payments.mjs.map +1 -1
- package/resources/payout-methods.d.mts +44 -29
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +44 -29
- package/resources/payout-methods.d.ts.map +1 -1
- package/resources/payout-methods.js +3 -2
- package/resources/payout-methods.js.map +1 -1
- package/resources/payout-methods.mjs +3 -2
- package/resources/payout-methods.mjs.map +1 -1
- package/resources/plans.d.mts +121 -90
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +121 -90
- package/resources/plans.d.ts.map +1 -1
- package/resources/plans.js +9 -5
- package/resources/plans.js.map +1 -1
- package/resources/plans.mjs +9 -5
- package/resources/plans.mjs.map +1 -1
- package/resources/products.d.mts +76 -65
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +76 -65
- package/resources/products.d.ts.map +1 -1
- package/resources/products.js +7 -5
- package/resources/products.js.map +1 -1
- package/resources/products.mjs +7 -5
- package/resources/products.mjs.map +1 -1
- package/resources/promo-codes.d.mts +41 -31
- package/resources/promo-codes.d.mts.map +1 -1
- package/resources/promo-codes.d.ts +41 -31
- package/resources/promo-codes.d.ts.map +1 -1
- package/resources/promo-codes.js +7 -4
- package/resources/promo-codes.js.map +1 -1
- package/resources/promo-codes.mjs +7 -4
- package/resources/promo-codes.mjs.map +1 -1
- package/resources/reactions.d.mts +24 -18
- package/resources/reactions.d.mts.map +1 -1
- package/resources/reactions.d.ts +24 -18
- package/resources/reactions.d.ts.map +1 -1
- package/resources/reactions.js +7 -4
- package/resources/reactions.js.map +1 -1
- package/resources/reactions.mjs +7 -4
- package/resources/reactions.mjs.map +1 -1
- package/resources/refunds.d.mts +43 -29
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +43 -29
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.js +3 -2
- package/resources/refunds.js.map +1 -1
- package/resources/refunds.mjs +3 -2
- package/resources/refunds.mjs.map +1 -1
- package/resources/reviews.d.mts +66 -50
- package/resources/reviews.d.mts.map +1 -1
- package/resources/reviews.d.ts +66 -50
- package/resources/reviews.d.ts.map +1 -1
- package/resources/reviews.js +3 -2
- package/resources/reviews.js.map +1 -1
- package/resources/reviews.mjs +3 -2
- package/resources/reviews.mjs.map +1 -1
- package/resources/setup-intents.d.mts +61 -43
- package/resources/setup-intents.d.mts.map +1 -1
- package/resources/setup-intents.d.ts +61 -43
- package/resources/setup-intents.d.ts.map +1 -1
- package/resources/setup-intents.js +4 -10
- package/resources/setup-intents.js.map +1 -1
- package/resources/setup-intents.mjs +4 -10
- package/resources/setup-intents.mjs.map +1 -1
- package/resources/shared.d.mts +695 -388
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +695 -388
- package/resources/shared.d.ts.map +1 -1
- package/resources/shipments.d.mts +26 -17
- package/resources/shipments.d.mts.map +1 -1
- package/resources/shipments.d.ts +26 -17
- package/resources/shipments.d.ts.map +1 -1
- package/resources/shipments.js +5 -3
- package/resources/shipments.js.map +1 -1
- package/resources/shipments.mjs +5 -3
- package/resources/shipments.mjs.map +1 -1
- package/resources/support-channels.d.mts +27 -19
- package/resources/support-channels.d.mts.map +1 -1
- package/resources/support-channels.d.ts +27 -19
- package/resources/support-channels.d.ts.map +1 -1
- package/resources/support-channels.js +5 -4
- package/resources/support-channels.js.map +1 -1
- package/resources/support-channels.mjs +5 -4
- package/resources/support-channels.mjs.map +1 -1
- package/resources/topups.d.mts +11 -9
- package/resources/topups.d.mts.map +1 -1
- package/resources/topups.d.ts +11 -9
- package/resources/topups.d.ts.map +1 -1
- package/resources/topups.js +2 -1
- package/resources/topups.js.map +1 -1
- package/resources/topups.mjs +2 -1
- package/resources/topups.mjs.map +1 -1
- package/resources/transfers.d.mts +35 -29
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +35 -29
- package/resources/transfers.d.ts.map +1 -1
- package/resources/transfers.js +5 -3
- package/resources/transfers.js.map +1 -1
- package/resources/transfers.mjs +5 -3
- package/resources/transfers.mjs.map +1 -1
- package/resources/users.d.mts +20 -16
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +20 -16
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +4 -3
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +4 -3
- package/resources/users.mjs.map +1 -1
- package/resources/verifications.d.mts +6 -4
- package/resources/verifications.d.mts.map +1 -1
- package/resources/verifications.d.ts +6 -4
- package/resources/verifications.d.ts.map +1 -1
- package/resources/verifications.js +1 -1
- package/resources/verifications.mjs +1 -1
- package/resources/webhooks.d.mts +136 -95
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +136 -95
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +3 -2
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +3 -2
- package/resources/webhooks.mjs.map +1 -1
- package/resources/withdrawals.d.mts +53 -44
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +53 -44
- package/resources/withdrawals.d.ts.map +1 -1
- package/resources/withdrawals.js +3 -2
- package/resources/withdrawals.js.map +1 -1
- package/resources/withdrawals.mjs +3 -2
- package/resources/withdrawals.mjs.map +1 -1
- package/src/client.ts +13 -3
- package/src/resources/access-tokens.ts +19 -20
- package/src/resources/account-links.ts +15 -13
- package/src/resources/ai-chats.ts +39 -26
- package/src/resources/app-builds.ts +35 -33
- package/src/resources/apps.ts +84 -56
- package/src/resources/authorized-users.ts +32 -26
- package/src/resources/chat-channels.ts +27 -19
- package/src/resources/checkout-configurations.ts +56 -46
- package/src/resources/companies.ts +68 -46
- package/src/resources/company-token-transactions.ts +81 -58
- package/src/resources/course-chapters.ts +24 -19
- package/src/resources/course-lesson-interactions.ts +7 -6
- package/src/resources/course-lessons.ts +126 -84
- package/src/resources/course-students.ts +38 -29
- package/src/resources/courses.ts +132 -91
- package/src/resources/disputes.ts +156 -102
- package/src/resources/dm-channels.ts +29 -16
- package/src/resources/dm-members.ts +30 -21
- package/src/resources/entries.ts +29 -21
- package/src/resources/experiences.ts +53 -45
- package/src/resources/fee-markups.ts +32 -21
- package/src/resources/files.ts +21 -17
- package/src/resources/forum-posts.ts +63 -43
- package/src/resources/forums.ts +20 -12
- package/src/resources/index.ts +2 -1
- package/src/resources/invoices.ts +112 -80
- package/src/resources/leads.ts +64 -42
- package/src/resources/ledger-accounts.ts +10 -8
- package/src/resources/members.ts +18 -19
- package/src/resources/memberships.ts +69 -51
- package/src/resources/messages.ts +46 -32
- package/src/resources/notifications.ts +33 -25
- package/src/resources/payment-methods.ts +212 -114
- package/src/resources/payments.ts +77 -39
- package/src/resources/payout-methods.ts +44 -29
- package/src/resources/plans.ts +121 -90
- package/src/resources/products.ts +215 -68
- package/src/resources/promo-codes.ts +41 -31
- package/src/resources/reactions.ts +24 -18
- package/src/resources/refunds.ts +44 -29
- package/src/resources/reviews.ts +66 -50
- package/src/resources/setup-intents.ts +61 -43
- package/src/resources/shared.ts +2637 -387
- package/src/resources/shipments.ts +26 -17
- package/src/resources/support-channels.ts +27 -19
- package/src/resources/topups.ts +11 -9
- package/src/resources/transfers.ts +35 -29
- package/src/resources/users.ts +20 -16
- package/src/resources/verifications.ts +6 -4
- package/src/resources/webhooks.ts +136 -95
- package/src/resources/withdrawals.ts +53 -43
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import * as PaymentsAPI from './payments';
|
|
5
|
+
import * as ProductsAPI from './products';
|
|
5
6
|
import * as Shared from './shared';
|
|
6
7
|
import { APIPromise } from '../core/api-promise';
|
|
7
8
|
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
@@ -28,6 +29,8 @@ export class Payments extends APIResource {
|
|
|
28
29
|
* - `member:basic:read`
|
|
29
30
|
* - `member:phone:read`
|
|
30
31
|
* - `promo_code:basic:read`
|
|
32
|
+
* - `payment:dispute:read`
|
|
33
|
+
* - `payment:resolution_center_case:read`
|
|
31
34
|
*
|
|
32
35
|
* @example
|
|
33
36
|
* ```ts
|
|
@@ -44,7 +47,7 @@ export class Payments extends APIResource {
|
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
/**
|
|
47
|
-
* Retrieves
|
|
50
|
+
* Retrieves the details of an existing payment.
|
|
48
51
|
*
|
|
49
52
|
* Required permissions:
|
|
50
53
|
*
|
|
@@ -55,6 +58,8 @@ export class Payments extends APIResource {
|
|
|
55
58
|
* - `member:basic:read`
|
|
56
59
|
* - `member:phone:read`
|
|
57
60
|
* - `promo_code:basic:read`
|
|
61
|
+
* - `payment:dispute:read`
|
|
62
|
+
* - `payment:resolution_center_case:read`
|
|
58
63
|
*
|
|
59
64
|
* @example
|
|
60
65
|
* ```ts
|
|
@@ -68,7 +73,8 @@ export class Payments extends APIResource {
|
|
|
68
73
|
}
|
|
69
74
|
|
|
70
75
|
/**
|
|
71
|
-
*
|
|
76
|
+
* Returns a paginated list of payments for the actor in context, with optional
|
|
77
|
+
* filtering by product, plan, status, billing reason, currency, and creation date.
|
|
72
78
|
*
|
|
73
79
|
* Required permissions:
|
|
74
80
|
*
|
|
@@ -83,22 +89,21 @@ export class Payments extends APIResource {
|
|
|
83
89
|
* @example
|
|
84
90
|
* ```ts
|
|
85
91
|
* // Automatically fetches more pages as needed.
|
|
86
|
-
* for await (const paymentListResponse of client.payments.list(
|
|
87
|
-
* { company_id: 'biz_xxxxxxxxxxxxxx' },
|
|
88
|
-
* )) {
|
|
92
|
+
* for await (const paymentListResponse of client.payments.list()) {
|
|
89
93
|
* // ...
|
|
90
94
|
* }
|
|
91
95
|
* ```
|
|
92
96
|
*/
|
|
93
97
|
list(
|
|
94
|
-
query: PaymentListParams,
|
|
98
|
+
query: PaymentListParams | null | undefined = {},
|
|
95
99
|
options?: RequestOptions,
|
|
96
100
|
): PagePromise<PaymentListResponsesCursorPage, PaymentListResponse> {
|
|
97
101
|
return this._client.getAPIList('/payments', CursorPage<PaymentListResponse>, { query, ...options });
|
|
98
102
|
}
|
|
99
103
|
|
|
100
104
|
/**
|
|
101
|
-
*
|
|
105
|
+
* Returns the list of fees associated with a specific payment, including platform
|
|
106
|
+
* fees and processing fees.
|
|
102
107
|
*
|
|
103
108
|
* Required permissions:
|
|
104
109
|
*
|
|
@@ -126,7 +131,8 @@ export class Payments extends APIResource {
|
|
|
126
131
|
}
|
|
127
132
|
|
|
128
133
|
/**
|
|
129
|
-
*
|
|
134
|
+
* Issue a full or partial refund for a payment. The refund is processed through
|
|
135
|
+
* the original payment processor and the membership status is updated accordingly.
|
|
130
136
|
*
|
|
131
137
|
* Required permissions:
|
|
132
138
|
*
|
|
@@ -137,6 +143,8 @@ export class Payments extends APIResource {
|
|
|
137
143
|
* - `member:basic:read`
|
|
138
144
|
* - `member:phone:read`
|
|
139
145
|
* - `promo_code:basic:read`
|
|
146
|
+
* - `payment:dispute:read`
|
|
147
|
+
* - `payment:resolution_center_case:read`
|
|
140
148
|
*
|
|
141
149
|
* @example
|
|
142
150
|
* ```ts
|
|
@@ -154,7 +162,8 @@ export class Payments extends APIResource {
|
|
|
154
162
|
}
|
|
155
163
|
|
|
156
164
|
/**
|
|
157
|
-
*
|
|
165
|
+
* Retry a failed or pending payment. This re-attempts the charge using the
|
|
166
|
+
* original payment method and plan details.
|
|
158
167
|
*
|
|
159
168
|
* Required permissions:
|
|
160
169
|
*
|
|
@@ -165,6 +174,8 @@ export class Payments extends APIResource {
|
|
|
165
174
|
* - `member:basic:read`
|
|
166
175
|
* - `member:phone:read`
|
|
167
176
|
* - `promo_code:basic:read`
|
|
177
|
+
* - `payment:dispute:read`
|
|
178
|
+
* - `payment:resolution_center_case:read`
|
|
168
179
|
*
|
|
169
180
|
* @example
|
|
170
181
|
* ```ts
|
|
@@ -178,7 +189,8 @@ export class Payments extends APIResource {
|
|
|
178
189
|
}
|
|
179
190
|
|
|
180
191
|
/**
|
|
181
|
-
*
|
|
192
|
+
* Void a payment that has not yet been settled. Voiding cancels the payment before
|
|
193
|
+
* it is captured by the payment processor.
|
|
182
194
|
*
|
|
183
195
|
* Required permissions:
|
|
184
196
|
*
|
|
@@ -189,6 +201,8 @@ export class Payments extends APIResource {
|
|
|
189
201
|
* - `member:basic:read`
|
|
190
202
|
* - `member:phone:read`
|
|
191
203
|
* - `promo_code:basic:read`
|
|
204
|
+
* - `payment:dispute:read`
|
|
205
|
+
* - `payment:resolution_center_case:read`
|
|
192
206
|
*
|
|
193
207
|
* @example
|
|
194
208
|
* ```ts
|
|
@@ -255,6 +269,8 @@ export type CardBrands =
|
|
|
255
269
|
| 'carnet'
|
|
256
270
|
| 'atm_card'
|
|
257
271
|
| 'china_union_payuzcard'
|
|
272
|
+
| 'codensa'
|
|
273
|
+
| 'cabal'
|
|
258
274
|
| 'unknown';
|
|
259
275
|
|
|
260
276
|
/**
|
|
@@ -342,6 +358,7 @@ export type PaymentMethodTypes =
|
|
|
342
358
|
| 'splitit'
|
|
343
359
|
| 'sunbit'
|
|
344
360
|
| 'swish'
|
|
361
|
+
| 'tamara'
|
|
345
362
|
| 'twint'
|
|
346
363
|
| 'upi'
|
|
347
364
|
| 'us_bank_account'
|
|
@@ -352,8 +369,8 @@ export type PaymentMethodTypes =
|
|
|
352
369
|
| 'unknown';
|
|
353
370
|
|
|
354
371
|
/**
|
|
355
|
-
* A payment represents a completed or attempted charge
|
|
356
|
-
*
|
|
372
|
+
* A payment represents a completed or attempted charge. Payments track the amount,
|
|
373
|
+
* status, currency, and payment method used.
|
|
357
374
|
*/
|
|
358
375
|
export interface PaymentListResponse {
|
|
359
376
|
/**
|
|
@@ -392,7 +409,8 @@ export interface PaymentListResponse {
|
|
|
392
409
|
card_brand: CardBrands | null;
|
|
393
410
|
|
|
394
411
|
/**
|
|
395
|
-
* The last
|
|
412
|
+
* The last four digits of the card used to make this payment. Null if the payment
|
|
413
|
+
* was not made with a card.
|
|
396
414
|
*/
|
|
397
415
|
card_last4: string | null;
|
|
398
416
|
|
|
@@ -448,12 +466,14 @@ export interface PaymentListResponse {
|
|
|
448
466
|
next_payment_attempt: string | null;
|
|
449
467
|
|
|
450
468
|
/**
|
|
451
|
-
* The
|
|
469
|
+
* The time at which this payment was successfully collected. Null if the payment
|
|
470
|
+
* has not yet succeeded. As a Unix timestamp.
|
|
452
471
|
*/
|
|
453
472
|
paid_at: string | null;
|
|
454
473
|
|
|
455
474
|
/**
|
|
456
|
-
* The payment method used for
|
|
475
|
+
* The tokenized payment method reference used for this payment. Null if no token
|
|
476
|
+
* was used.
|
|
457
477
|
*/
|
|
458
478
|
payment_method: PaymentListResponse.PaymentMethod | null;
|
|
459
479
|
|
|
@@ -669,7 +689,8 @@ export namespace PaymentListResponse {
|
|
|
669
689
|
}
|
|
670
690
|
|
|
671
691
|
/**
|
|
672
|
-
* The payment method used for
|
|
692
|
+
* The tokenized payment method reference used for this payment. Null if no token
|
|
693
|
+
* was used.
|
|
673
694
|
*/
|
|
674
695
|
export interface PaymentMethod {
|
|
675
696
|
/**
|
|
@@ -704,17 +725,18 @@ export namespace PaymentListResponse {
|
|
|
704
725
|
brand: PaymentsAPI.CardBrands | null;
|
|
705
726
|
|
|
706
727
|
/**
|
|
707
|
-
*
|
|
728
|
+
* The two-digit expiration month of the card (1-12). Null if not available.
|
|
708
729
|
*/
|
|
709
730
|
exp_month: number | null;
|
|
710
731
|
|
|
711
732
|
/**
|
|
712
|
-
*
|
|
733
|
+
* The two-digit expiration year of the card (e.g., 27 for 2027). Null if not
|
|
734
|
+
* available.
|
|
713
735
|
*/
|
|
714
736
|
exp_year: number | null;
|
|
715
737
|
|
|
716
738
|
/**
|
|
717
|
-
*
|
|
739
|
+
* The last four digits of the card number. Null if not available.
|
|
718
740
|
*/
|
|
719
741
|
last4: string | null;
|
|
720
742
|
}
|
|
@@ -740,12 +762,14 @@ export namespace PaymentListResponse {
|
|
|
740
762
|
id: string;
|
|
741
763
|
|
|
742
764
|
/**
|
|
743
|
-
* The
|
|
765
|
+
* The URL slug used in the product's public link (e.g., 'my-product' in
|
|
766
|
+
* whop.com/company/my-product).
|
|
744
767
|
*/
|
|
745
768
|
route: string;
|
|
746
769
|
|
|
747
770
|
/**
|
|
748
|
-
* The
|
|
771
|
+
* The display name of the product shown to customers on the product page and in
|
|
772
|
+
* search results.
|
|
749
773
|
*/
|
|
750
774
|
title: string;
|
|
751
775
|
}
|
|
@@ -797,17 +821,18 @@ export namespace PaymentListResponse {
|
|
|
797
821
|
id: string;
|
|
798
822
|
|
|
799
823
|
/**
|
|
800
|
-
* The email
|
|
824
|
+
* The user's email address. Requires the member:email:read permission to access.
|
|
825
|
+
* Null if not authorized.
|
|
801
826
|
*/
|
|
802
827
|
email: string | null;
|
|
803
828
|
|
|
804
829
|
/**
|
|
805
|
-
* The
|
|
830
|
+
* The user's display name shown on their public profile.
|
|
806
831
|
*/
|
|
807
832
|
name: string | null;
|
|
808
833
|
|
|
809
834
|
/**
|
|
810
|
-
* The
|
|
835
|
+
* The user's unique username shown on their public profile.
|
|
811
836
|
*/
|
|
812
837
|
username: string;
|
|
813
838
|
}
|
|
@@ -1039,6 +1064,11 @@ export declare namespace PaymentCreateParams {
|
|
|
1039
1064
|
*/
|
|
1040
1065
|
headline?: string | null;
|
|
1041
1066
|
|
|
1067
|
+
/**
|
|
1068
|
+
* The different industry groups a company can be in.
|
|
1069
|
+
*/
|
|
1070
|
+
industry_group?: ProductsAPI.IndustryGroups | null;
|
|
1071
|
+
|
|
1042
1072
|
/**
|
|
1043
1073
|
* The different industry types a company can be in.
|
|
1044
1074
|
*/
|
|
@@ -1097,33 +1127,33 @@ export declare namespace PaymentCreateParams {
|
|
|
1097
1127
|
}
|
|
1098
1128
|
|
|
1099
1129
|
export interface PaymentListParams extends CursorPageParams {
|
|
1100
|
-
/**
|
|
1101
|
-
* The ID of the company to list payments for
|
|
1102
|
-
*/
|
|
1103
|
-
company_id: string;
|
|
1104
|
-
|
|
1105
1130
|
/**
|
|
1106
1131
|
* Returns the elements in the list that come before the specified cursor.
|
|
1107
1132
|
*/
|
|
1108
1133
|
before?: string | null;
|
|
1109
1134
|
|
|
1110
1135
|
/**
|
|
1111
|
-
*
|
|
1136
|
+
* Filter payments by their billing reason.
|
|
1112
1137
|
*/
|
|
1113
1138
|
billing_reasons?: Array<BillingReasons> | null;
|
|
1114
1139
|
|
|
1115
1140
|
/**
|
|
1116
|
-
* The
|
|
1141
|
+
* The unique identifier of the company to list payments for.
|
|
1142
|
+
*/
|
|
1143
|
+
company_id?: string | null;
|
|
1144
|
+
|
|
1145
|
+
/**
|
|
1146
|
+
* Only return payments created after this timestamp.
|
|
1117
1147
|
*/
|
|
1118
1148
|
created_after?: string | null;
|
|
1119
1149
|
|
|
1120
1150
|
/**
|
|
1121
|
-
*
|
|
1151
|
+
* Only return payments created before this timestamp.
|
|
1122
1152
|
*/
|
|
1123
1153
|
created_before?: string | null;
|
|
1124
1154
|
|
|
1125
1155
|
/**
|
|
1126
|
-
*
|
|
1156
|
+
* Filter payments by their currency code.
|
|
1127
1157
|
*/
|
|
1128
1158
|
currencies?: Array<Shared.Currency> | null;
|
|
1129
1159
|
|
|
@@ -1138,7 +1168,7 @@ export interface PaymentListParams extends CursorPageParams {
|
|
|
1138
1168
|
first?: number | null;
|
|
1139
1169
|
|
|
1140
1170
|
/**
|
|
1141
|
-
* Whether to include
|
|
1171
|
+
* Whether to include payments with a zero amount.
|
|
1142
1172
|
*/
|
|
1143
1173
|
include_free?: boolean | null;
|
|
1144
1174
|
|
|
@@ -1153,22 +1183,29 @@ export interface PaymentListParams extends CursorPageParams {
|
|
|
1153
1183
|
order?: 'final_amount' | 'created_at' | 'paid_at' | null;
|
|
1154
1184
|
|
|
1155
1185
|
/**
|
|
1156
|
-
*
|
|
1186
|
+
* Filter payments to only those associated with these specific plan identifiers.
|
|
1157
1187
|
*/
|
|
1158
1188
|
plan_ids?: Array<string> | null;
|
|
1159
1189
|
|
|
1160
1190
|
/**
|
|
1161
|
-
*
|
|
1191
|
+
* Filter payments to only those associated with these specific product
|
|
1192
|
+
* identifiers.
|
|
1162
1193
|
*/
|
|
1163
1194
|
product_ids?: Array<string> | null;
|
|
1164
1195
|
|
|
1165
1196
|
/**
|
|
1166
|
-
*
|
|
1197
|
+
* Search payments by user ID, membership ID, user email, name, or username. Email
|
|
1198
|
+
* filtering requires the member:email:read permission.
|
|
1199
|
+
*/
|
|
1200
|
+
query?: string | null;
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* Filter payments by their current status.
|
|
1167
1204
|
*/
|
|
1168
1205
|
statuses?: Array<Shared.ReceiptStatus> | null;
|
|
1169
1206
|
|
|
1170
1207
|
/**
|
|
1171
|
-
*
|
|
1208
|
+
* Filter payments by their current substatus for more granular filtering.
|
|
1172
1209
|
*/
|
|
1173
1210
|
substatuses?: Array<Shared.FriendlyReceiptStatus> | null;
|
|
1174
1211
|
}
|
|
@@ -1192,7 +1229,8 @@ export interface PaymentListFeesParams extends CursorPageParams {
|
|
|
1192
1229
|
|
|
1193
1230
|
export interface PaymentRefundParams {
|
|
1194
1231
|
/**
|
|
1195
|
-
*
|
|
1232
|
+
* The amount to refund in the payment currency. If omitted, the full payment
|
|
1233
|
+
* amount is refunded.
|
|
1196
1234
|
*/
|
|
1197
1235
|
partial_amount?: number | null;
|
|
1198
1236
|
}
|
|
@@ -9,7 +9,7 @@ import { path } from '../internal/utils/path';
|
|
|
9
9
|
|
|
10
10
|
export class PayoutMethods extends APIResource {
|
|
11
11
|
/**
|
|
12
|
-
* Retrieves
|
|
12
|
+
* Retrieves the details of an existing payout method.
|
|
13
13
|
*
|
|
14
14
|
* Required permissions:
|
|
15
15
|
*
|
|
@@ -20,7 +20,8 @@ export class PayoutMethods extends APIResource {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Returns a list of active payout methods configured for a company, ordered by
|
|
24
|
+
* most recently created.
|
|
24
25
|
*
|
|
25
26
|
* Required permissions:
|
|
26
27
|
*
|
|
@@ -51,7 +52,8 @@ export type PayoutDestinationCategory =
|
|
|
51
52
|
| 'unknown';
|
|
52
53
|
|
|
53
54
|
/**
|
|
54
|
-
*
|
|
55
|
+
* A configured payout destination where a user receives earned funds, such as a
|
|
56
|
+
* bank account or digital wallet.
|
|
55
57
|
*/
|
|
56
58
|
export interface PayoutMethodRetrieveResponse {
|
|
57
59
|
/**
|
|
@@ -60,13 +62,14 @@ export interface PayoutMethodRetrieveResponse {
|
|
|
60
62
|
id: string;
|
|
61
63
|
|
|
62
64
|
/**
|
|
63
|
-
* A
|
|
64
|
-
* account
|
|
65
|
+
* A masked identifier for the payout destination, such as the last four digits of
|
|
66
|
+
* a bank account or an email address. Null if no reference is available.
|
|
65
67
|
*/
|
|
66
68
|
account_reference: string | null;
|
|
67
69
|
|
|
68
70
|
/**
|
|
69
|
-
* The company associated with
|
|
71
|
+
* The company associated with this payout destination. Null if not linked to a
|
|
72
|
+
* specific company.
|
|
70
73
|
*/
|
|
71
74
|
company: PayoutMethodRetrieveResponse.Company | null;
|
|
72
75
|
|
|
@@ -76,36 +79,40 @@ export interface PayoutMethodRetrieveResponse {
|
|
|
76
79
|
created_at: string;
|
|
77
80
|
|
|
78
81
|
/**
|
|
79
|
-
* The currency code
|
|
80
|
-
*
|
|
82
|
+
* The three-letter ISO currency code that payouts are delivered in for this
|
|
83
|
+
* destination.
|
|
81
84
|
*/
|
|
82
85
|
currency: string;
|
|
83
86
|
|
|
84
87
|
/**
|
|
85
|
-
* The payout destination
|
|
88
|
+
* The payout destination configuration linked to this token. Null if not yet
|
|
89
|
+
* configured.
|
|
86
90
|
*/
|
|
87
91
|
destination: PayoutMethodRetrieveResponse.Destination | null;
|
|
88
92
|
|
|
89
93
|
/**
|
|
90
|
-
* The name of the bank or financial institution.
|
|
94
|
+
* The name of the bank or financial institution receiving payouts. Null if not
|
|
95
|
+
* applicable or not provided.
|
|
91
96
|
*/
|
|
92
97
|
institution_name: string | null;
|
|
93
98
|
|
|
94
99
|
/**
|
|
95
|
-
* Whether this
|
|
100
|
+
* Whether this is the default payout destination for the associated payout
|
|
101
|
+
* account.
|
|
96
102
|
*/
|
|
97
103
|
is_default: boolean;
|
|
98
104
|
|
|
99
105
|
/**
|
|
100
|
-
*
|
|
101
|
-
*
|
|
106
|
+
* A user-defined label to help identify this payout destination. Not sent to the
|
|
107
|
+
* provider. Null if no nickname has been set.
|
|
102
108
|
*/
|
|
103
109
|
nickname: string | null;
|
|
104
110
|
}
|
|
105
111
|
|
|
106
112
|
export namespace PayoutMethodRetrieveResponse {
|
|
107
113
|
/**
|
|
108
|
-
* The company associated with
|
|
114
|
+
* The company associated with this payout destination. Null if not linked to a
|
|
115
|
+
* specific company.
|
|
109
116
|
*/
|
|
110
117
|
export interface Company {
|
|
111
118
|
/**
|
|
@@ -115,7 +122,8 @@ export namespace PayoutMethodRetrieveResponse {
|
|
|
115
122
|
}
|
|
116
123
|
|
|
117
124
|
/**
|
|
118
|
-
* The payout destination
|
|
125
|
+
* The payout destination configuration linked to this token. Null if not yet
|
|
126
|
+
* configured.
|
|
119
127
|
*/
|
|
120
128
|
export interface Destination {
|
|
121
129
|
/**
|
|
@@ -136,7 +144,8 @@ export namespace PayoutMethodRetrieveResponse {
|
|
|
136
144
|
}
|
|
137
145
|
|
|
138
146
|
/**
|
|
139
|
-
*
|
|
147
|
+
* A configured payout destination where a user receives earned funds, such as a
|
|
148
|
+
* bank account or digital wallet.
|
|
140
149
|
*/
|
|
141
150
|
export interface PayoutMethodListResponse {
|
|
142
151
|
/**
|
|
@@ -145,13 +154,14 @@ export interface PayoutMethodListResponse {
|
|
|
145
154
|
id: string;
|
|
146
155
|
|
|
147
156
|
/**
|
|
148
|
-
* A
|
|
149
|
-
* account
|
|
157
|
+
* A masked identifier for the payout destination, such as the last four digits of
|
|
158
|
+
* a bank account or an email address. Null if no reference is available.
|
|
150
159
|
*/
|
|
151
160
|
account_reference: string | null;
|
|
152
161
|
|
|
153
162
|
/**
|
|
154
|
-
* The company associated with
|
|
163
|
+
* The company associated with this payout destination. Null if not linked to a
|
|
164
|
+
* specific company.
|
|
155
165
|
*/
|
|
156
166
|
company: PayoutMethodListResponse.Company | null;
|
|
157
167
|
|
|
@@ -161,36 +171,40 @@ export interface PayoutMethodListResponse {
|
|
|
161
171
|
created_at: string;
|
|
162
172
|
|
|
163
173
|
/**
|
|
164
|
-
* The currency code
|
|
165
|
-
*
|
|
174
|
+
* The three-letter ISO currency code that payouts are delivered in for this
|
|
175
|
+
* destination.
|
|
166
176
|
*/
|
|
167
177
|
currency: string;
|
|
168
178
|
|
|
169
179
|
/**
|
|
170
|
-
* The payout destination
|
|
180
|
+
* The payout destination configuration linked to this token. Null if not yet
|
|
181
|
+
* configured.
|
|
171
182
|
*/
|
|
172
183
|
destination: PayoutMethodListResponse.Destination | null;
|
|
173
184
|
|
|
174
185
|
/**
|
|
175
|
-
* The name of the bank or financial institution.
|
|
186
|
+
* The name of the bank or financial institution receiving payouts. Null if not
|
|
187
|
+
* applicable or not provided.
|
|
176
188
|
*/
|
|
177
189
|
institution_name: string | null;
|
|
178
190
|
|
|
179
191
|
/**
|
|
180
|
-
* Whether this
|
|
192
|
+
* Whether this is the default payout destination for the associated payout
|
|
193
|
+
* account.
|
|
181
194
|
*/
|
|
182
195
|
is_default: boolean;
|
|
183
196
|
|
|
184
197
|
/**
|
|
185
|
-
*
|
|
186
|
-
*
|
|
198
|
+
* A user-defined label to help identify this payout destination. Not sent to the
|
|
199
|
+
* provider. Null if no nickname has been set.
|
|
187
200
|
*/
|
|
188
201
|
nickname: string | null;
|
|
189
202
|
}
|
|
190
203
|
|
|
191
204
|
export namespace PayoutMethodListResponse {
|
|
192
205
|
/**
|
|
193
|
-
* The company associated with
|
|
206
|
+
* The company associated with this payout destination. Null if not linked to a
|
|
207
|
+
* specific company.
|
|
194
208
|
*/
|
|
195
209
|
export interface Company {
|
|
196
210
|
/**
|
|
@@ -200,7 +214,8 @@ export namespace PayoutMethodListResponse {
|
|
|
200
214
|
}
|
|
201
215
|
|
|
202
216
|
/**
|
|
203
|
-
* The payout destination
|
|
217
|
+
* The payout destination configuration linked to this token. Null if not yet
|
|
218
|
+
* configured.
|
|
204
219
|
*/
|
|
205
220
|
export interface Destination {
|
|
206
221
|
/**
|
|
@@ -222,7 +237,7 @@ export namespace PayoutMethodListResponse {
|
|
|
222
237
|
|
|
223
238
|
export interface PayoutMethodListParams extends CursorPageParams {
|
|
224
239
|
/**
|
|
225
|
-
* The company
|
|
240
|
+
* The unique identifier of the company to list payout methods for.
|
|
226
241
|
*/
|
|
227
242
|
company_id: string;
|
|
228
243
|
|