@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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
2
|
import * as PaymentsAPI from "./payments.mjs";
|
|
3
|
+
import * as ProductsAPI from "./products.mjs";
|
|
3
4
|
import * as Shared from "./shared.mjs";
|
|
4
5
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
5
6
|
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs";
|
|
@@ -26,7 +27,7 @@ export declare class CheckoutConfigurations extends APIResource {
|
|
|
26
27
|
*/
|
|
27
28
|
create(body: CheckoutConfigurationCreateParams, options?: RequestOptions): APIPromise<Shared.CheckoutConfiguration>;
|
|
28
29
|
/**
|
|
29
|
-
* Retrieves
|
|
30
|
+
* Retrieves the details of an existing checkout configuration.
|
|
30
31
|
*
|
|
31
32
|
* Required permissions:
|
|
32
33
|
*
|
|
@@ -34,7 +35,8 @@ export declare class CheckoutConfigurations extends APIResource {
|
|
|
34
35
|
*/
|
|
35
36
|
retrieve(id: string, options?: RequestOptions): APIPromise<Shared.CheckoutConfiguration>;
|
|
36
37
|
/**
|
|
37
|
-
*
|
|
38
|
+
* Returns a paginated list of checkout configurations for a company, with optional
|
|
39
|
+
* filtering by plan and creation date.
|
|
38
40
|
*
|
|
39
41
|
* Required permissions:
|
|
40
42
|
*
|
|
@@ -48,9 +50,9 @@ export type CheckoutConfigurationListResponsesCursorPage = CursorPage<CheckoutCo
|
|
|
48
50
|
*/
|
|
49
51
|
export type CheckoutModes = 'payment' | 'setup';
|
|
50
52
|
/**
|
|
51
|
-
* A checkout
|
|
52
|
-
* plan, affiliate, and custom metadata. Payments and memberships created from
|
|
53
|
-
* checkout session inherit its metadata.
|
|
53
|
+
* A checkout configuration is a reusable configuration for a checkout, including
|
|
54
|
+
* the plan, affiliate, and custom metadata. Payments and memberships created from
|
|
55
|
+
* a checkout session inherit its metadata.
|
|
54
56
|
*/
|
|
55
57
|
export interface CheckoutConfigurationListResponse {
|
|
56
58
|
/**
|
|
@@ -134,11 +136,13 @@ export declare namespace CheckoutConfigurationListResponse {
|
|
|
134
136
|
*/
|
|
135
137
|
id: string;
|
|
136
138
|
/**
|
|
137
|
-
* The
|
|
139
|
+
* The number of days between each recurring charge. Null for one-time plans. For
|
|
140
|
+
* example, 30 for monthly or 365 for annual billing.
|
|
138
141
|
*/
|
|
139
142
|
billing_period: number | null;
|
|
140
143
|
/**
|
|
141
|
-
* The
|
|
144
|
+
* The currency used for all prices on this plan (e.g., 'usd', 'eur'). All monetary
|
|
145
|
+
* amounts on the plan are denominated in this currency.
|
|
142
146
|
*/
|
|
143
147
|
currency: Shared.Currency;
|
|
144
148
|
/**
|
|
@@ -153,11 +157,13 @@ export declare namespace CheckoutConfigurationListResponse {
|
|
|
153
157
|
*/
|
|
154
158
|
initial_price: number;
|
|
155
159
|
/**
|
|
156
|
-
*
|
|
160
|
+
* The billing model for this plan: 'renewal' for recurring subscriptions or
|
|
161
|
+
* 'one_time' for single payments.
|
|
157
162
|
*/
|
|
158
163
|
plan_type: Shared.PlanType;
|
|
159
164
|
/**
|
|
160
|
-
*
|
|
165
|
+
* The method used to sell this plan: 'buy_now' for immediate purchase or
|
|
166
|
+
* 'waitlist' for waitlist-based access.
|
|
161
167
|
*/
|
|
162
168
|
release_method: Shared.ReleaseMethod;
|
|
163
169
|
/**
|
|
@@ -166,11 +172,14 @@ export declare namespace CheckoutConfigurationListResponse {
|
|
|
166
172
|
*/
|
|
167
173
|
renewal_price: number;
|
|
168
174
|
/**
|
|
169
|
-
* The number of free trial days
|
|
175
|
+
* The number of free trial days before the first charge on a renewal plan. Null if
|
|
176
|
+
* no trial is configured or the current user has already used a trial for this
|
|
177
|
+
* plan.
|
|
170
178
|
*/
|
|
171
179
|
trial_period_days: number | null;
|
|
172
180
|
/**
|
|
173
|
-
*
|
|
181
|
+
* Controls whether the plan is visible to customers. When set to 'hidden', the
|
|
182
|
+
* plan is only accessible via direct link.
|
|
174
183
|
*/
|
|
175
184
|
visibility: Shared.Visibility;
|
|
176
185
|
}
|
|
@@ -179,11 +188,11 @@ export type CheckoutConfigurationCreateParams = CheckoutConfigurationCreateParam
|
|
|
179
188
|
export declare namespace CheckoutConfigurationCreateParams {
|
|
180
189
|
interface CreateCheckoutSessionInputModePaymentWithPlan {
|
|
181
190
|
/**
|
|
182
|
-
*
|
|
191
|
+
* The plan attributes to create a new plan inline for this checkout configuration.
|
|
183
192
|
*/
|
|
184
193
|
plan: CreateCheckoutSessionInputModePaymentWithPlan.Plan;
|
|
185
194
|
/**
|
|
186
|
-
*
|
|
195
|
+
* An affiliate tracking code to attribute the checkout to a specific affiliate.
|
|
187
196
|
*/
|
|
188
197
|
affiliate_code?: string | null;
|
|
189
198
|
/**
|
|
@@ -191,20 +200,19 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
191
200
|
*/
|
|
192
201
|
currency?: Shared.Currency | null;
|
|
193
202
|
/**
|
|
194
|
-
*
|
|
203
|
+
* Custom key-value metadata to attach to the checkout configuration.
|
|
195
204
|
*/
|
|
196
205
|
metadata?: {
|
|
197
206
|
[key: string]: unknown;
|
|
198
207
|
} | null;
|
|
199
208
|
mode?: 'payment';
|
|
200
209
|
/**
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
* platform or company's defaults will apply.
|
|
210
|
+
* The explicit payment method configuration for the checkout session. Only applies
|
|
211
|
+
* to setup mode. If not provided, the platform or company defaults will apply.
|
|
204
212
|
*/
|
|
205
213
|
payment_method_configuration?: CreateCheckoutSessionInputModePaymentWithPlan.PaymentMethodConfiguration | null;
|
|
206
214
|
/**
|
|
207
|
-
* The URL to redirect the user to after
|
|
215
|
+
* The URL to redirect the user to after checkout is completed.
|
|
208
216
|
*/
|
|
209
217
|
redirect_url?: string | null;
|
|
210
218
|
/**
|
|
@@ -214,7 +222,7 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
214
222
|
}
|
|
215
223
|
namespace CreateCheckoutSessionInputModePaymentWithPlan {
|
|
216
224
|
/**
|
|
217
|
-
*
|
|
225
|
+
* The plan attributes to create a new plan inline for this checkout configuration.
|
|
218
226
|
*/
|
|
219
227
|
interface Plan {
|
|
220
228
|
/**
|
|
@@ -426,6 +434,10 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
426
434
|
* The headline of the product.
|
|
427
435
|
*/
|
|
428
436
|
headline?: string | null;
|
|
437
|
+
/**
|
|
438
|
+
* The different industry groups a company can be in.
|
|
439
|
+
*/
|
|
440
|
+
industry_group?: ProductsAPI.IndustryGroups | null;
|
|
429
441
|
/**
|
|
430
442
|
* The different industry types a company can be in.
|
|
431
443
|
*/
|
|
@@ -449,9 +461,8 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
449
461
|
}
|
|
450
462
|
}
|
|
451
463
|
/**
|
|
452
|
-
*
|
|
453
|
-
*
|
|
454
|
-
* platform or company's defaults will apply.
|
|
464
|
+
* The explicit payment method configuration for the checkout session. Only applies
|
|
465
|
+
* to setup mode. If not provided, the platform or company defaults will apply.
|
|
455
466
|
*/
|
|
456
467
|
interface PaymentMethodConfiguration {
|
|
457
468
|
/**
|
|
@@ -476,11 +487,12 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
476
487
|
}
|
|
477
488
|
interface CreateCheckoutSessionInputModePaymentWithPlanID {
|
|
478
489
|
/**
|
|
479
|
-
* The
|
|
490
|
+
* The unique identifier of an existing plan to use for this checkout
|
|
491
|
+
* configuration.
|
|
480
492
|
*/
|
|
481
493
|
plan_id: string;
|
|
482
494
|
/**
|
|
483
|
-
*
|
|
495
|
+
* An affiliate tracking code to attribute the checkout to a specific affiliate.
|
|
484
496
|
*/
|
|
485
497
|
affiliate_code?: string | null;
|
|
486
498
|
/**
|
|
@@ -488,20 +500,19 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
488
500
|
*/
|
|
489
501
|
currency?: Shared.Currency | null;
|
|
490
502
|
/**
|
|
491
|
-
*
|
|
503
|
+
* Custom key-value metadata to attach to the checkout configuration.
|
|
492
504
|
*/
|
|
493
505
|
metadata?: {
|
|
494
506
|
[key: string]: unknown;
|
|
495
507
|
} | null;
|
|
496
508
|
mode?: 'payment';
|
|
497
509
|
/**
|
|
498
|
-
*
|
|
499
|
-
*
|
|
500
|
-
* platform or company's defaults will apply.
|
|
510
|
+
* The explicit payment method configuration for the checkout session. Only applies
|
|
511
|
+
* to setup mode. If not provided, the platform or company defaults will apply.
|
|
501
512
|
*/
|
|
502
513
|
payment_method_configuration?: CreateCheckoutSessionInputModePaymentWithPlanID.PaymentMethodConfiguration | null;
|
|
503
514
|
/**
|
|
504
|
-
* The URL to redirect the user to after
|
|
515
|
+
* The URL to redirect the user to after checkout is completed.
|
|
505
516
|
*/
|
|
506
517
|
redirect_url?: string | null;
|
|
507
518
|
/**
|
|
@@ -511,9 +522,8 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
511
522
|
}
|
|
512
523
|
namespace CreateCheckoutSessionInputModePaymentWithPlanID {
|
|
513
524
|
/**
|
|
514
|
-
*
|
|
515
|
-
*
|
|
516
|
-
* platform or company's defaults will apply.
|
|
525
|
+
* The explicit payment method configuration for the checkout session. Only applies
|
|
526
|
+
* to setup mode. If not provided, the platform or company defaults will apply.
|
|
517
527
|
*/
|
|
518
528
|
interface PaymentMethodConfiguration {
|
|
519
529
|
/**
|
|
@@ -538,8 +548,8 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
538
548
|
}
|
|
539
549
|
interface CreateCheckoutSessionInputModeSetup {
|
|
540
550
|
/**
|
|
541
|
-
* The
|
|
542
|
-
* required in setup mode.
|
|
551
|
+
* The unique identifier of the company to create the checkout configuration for.
|
|
552
|
+
* Only required in setup mode.
|
|
543
553
|
*/
|
|
544
554
|
company_id: string;
|
|
545
555
|
mode: 'setup';
|
|
@@ -548,19 +558,18 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
548
558
|
*/
|
|
549
559
|
currency?: Shared.Currency | null;
|
|
550
560
|
/**
|
|
551
|
-
*
|
|
561
|
+
* Custom key-value metadata to attach to the checkout configuration.
|
|
552
562
|
*/
|
|
553
563
|
metadata?: {
|
|
554
564
|
[key: string]: unknown;
|
|
555
565
|
} | null;
|
|
556
566
|
/**
|
|
557
|
-
*
|
|
558
|
-
*
|
|
559
|
-
* platform or company's defaults will apply.
|
|
567
|
+
* The explicit payment method configuration for the checkout session. Only applies
|
|
568
|
+
* to setup mode. If not provided, the platform or company defaults will apply.
|
|
560
569
|
*/
|
|
561
570
|
payment_method_configuration?: CreateCheckoutSessionInputModeSetup.PaymentMethodConfiguration | null;
|
|
562
571
|
/**
|
|
563
|
-
* The URL to redirect the user to after
|
|
572
|
+
* The URL to redirect the user to after checkout is completed.
|
|
564
573
|
*/
|
|
565
574
|
redirect_url?: string | null;
|
|
566
575
|
/**
|
|
@@ -570,9 +579,8 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
570
579
|
}
|
|
571
580
|
namespace CreateCheckoutSessionInputModeSetup {
|
|
572
581
|
/**
|
|
573
|
-
*
|
|
574
|
-
*
|
|
575
|
-
* platform or company's defaults will apply.
|
|
582
|
+
* The explicit payment method configuration for the checkout session. Only applies
|
|
583
|
+
* to setup mode. If not provided, the platform or company defaults will apply.
|
|
576
584
|
*/
|
|
577
585
|
interface PaymentMethodConfiguration {
|
|
578
586
|
/**
|
|
@@ -598,7 +606,7 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
598
606
|
}
|
|
599
607
|
export interface CheckoutConfigurationListParams extends CursorPageParams {
|
|
600
608
|
/**
|
|
601
|
-
* The
|
|
609
|
+
* The unique identifier of the company to list checkout configurations for.
|
|
602
610
|
*/
|
|
603
611
|
company_id: string;
|
|
604
612
|
/**
|
|
@@ -606,11 +614,11 @@ export interface CheckoutConfigurationListParams extends CursorPageParams {
|
|
|
606
614
|
*/
|
|
607
615
|
before?: string | null;
|
|
608
616
|
/**
|
|
609
|
-
*
|
|
617
|
+
* Only return checkout configurations created after this timestamp.
|
|
610
618
|
*/
|
|
611
619
|
created_after?: string | null;
|
|
612
620
|
/**
|
|
613
|
-
*
|
|
621
|
+
* Only return checkout configurations created before this timestamp.
|
|
614
622
|
*/
|
|
615
623
|
created_before?: string | null;
|
|
616
624
|
/**
|
|
@@ -626,7 +634,8 @@ export interface CheckoutConfigurationListParams extends CursorPageParams {
|
|
|
626
634
|
*/
|
|
627
635
|
last?: number | null;
|
|
628
636
|
/**
|
|
629
|
-
*
|
|
637
|
+
* Filter checkout configurations to only those associated with this plan
|
|
638
|
+
* identifier.
|
|
630
639
|
*/
|
|
631
640
|
plan_id?: string | null;
|
|
632
641
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout-configurations.d.mts","sourceRoot":"","sources":["../src/resources/checkout-configurations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,sBAAuB,SAAQ,WAAW;IACrD;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CACJ,IAAI,EAAE,iCAAiC,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,qBAAqB,CAAC;IAI3C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,qBAAqB,CAAC;IAIxF
|
|
1
|
+
{"version":3,"file":"checkout-configurations.d.mts","sourceRoot":"","sources":["../src/resources/checkout-configurations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,WAAW;OAChB,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,sBAAuB,SAAQ,WAAW;IACrD;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CACJ,IAAI,EAAE,iCAAiC,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,qBAAqB,CAAC;IAI3C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,qBAAqB,CAAC;IAIxF;;;;;;;OAOG;IACH,IAAI,CACF,KAAK,EAAE,+BAA+B,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,4CAA4C,EAAE,iCAAiC,CAAC;CAOhG;AAED,MAAM,MAAM,4CAA4C,GAAG,UAAU,CAAC,iCAAiC,CAAC,CAAC;AAEzG;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC;AAEhD;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,QAAQ,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAE5C;;OAEG;IACH,I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IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,WAAW,sBAAsB,CAAC;IAC9C,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,4CAA4C,IAAI,4CAA4C,EACjG,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
2
|
import * as PaymentsAPI from "./payments.js";
|
|
3
|
+
import * as ProductsAPI from "./products.js";
|
|
3
4
|
import * as Shared from "./shared.js";
|
|
4
5
|
import { APIPromise } from "../core/api-promise.js";
|
|
5
6
|
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.js";
|
|
@@ -26,7 +27,7 @@ export declare class CheckoutConfigurations extends APIResource {
|
|
|
26
27
|
*/
|
|
27
28
|
create(body: CheckoutConfigurationCreateParams, options?: RequestOptions): APIPromise<Shared.CheckoutConfiguration>;
|
|
28
29
|
/**
|
|
29
|
-
* Retrieves
|
|
30
|
+
* Retrieves the details of an existing checkout configuration.
|
|
30
31
|
*
|
|
31
32
|
* Required permissions:
|
|
32
33
|
*
|
|
@@ -34,7 +35,8 @@ export declare class CheckoutConfigurations extends APIResource {
|
|
|
34
35
|
*/
|
|
35
36
|
retrieve(id: string, options?: RequestOptions): APIPromise<Shared.CheckoutConfiguration>;
|
|
36
37
|
/**
|
|
37
|
-
*
|
|
38
|
+
* Returns a paginated list of checkout configurations for a company, with optional
|
|
39
|
+
* filtering by plan and creation date.
|
|
38
40
|
*
|
|
39
41
|
* Required permissions:
|
|
40
42
|
*
|
|
@@ -48,9 +50,9 @@ export type CheckoutConfigurationListResponsesCursorPage = CursorPage<CheckoutCo
|
|
|
48
50
|
*/
|
|
49
51
|
export type CheckoutModes = 'payment' | 'setup';
|
|
50
52
|
/**
|
|
51
|
-
* A checkout
|
|
52
|
-
* plan, affiliate, and custom metadata. Payments and memberships created from
|
|
53
|
-
* checkout session inherit its metadata.
|
|
53
|
+
* A checkout configuration is a reusable configuration for a checkout, including
|
|
54
|
+
* the plan, affiliate, and custom metadata. Payments and memberships created from
|
|
55
|
+
* a checkout session inherit its metadata.
|
|
54
56
|
*/
|
|
55
57
|
export interface CheckoutConfigurationListResponse {
|
|
56
58
|
/**
|
|
@@ -134,11 +136,13 @@ export declare namespace CheckoutConfigurationListResponse {
|
|
|
134
136
|
*/
|
|
135
137
|
id: string;
|
|
136
138
|
/**
|
|
137
|
-
* The
|
|
139
|
+
* The number of days between each recurring charge. Null for one-time plans. For
|
|
140
|
+
* example, 30 for monthly or 365 for annual billing.
|
|
138
141
|
*/
|
|
139
142
|
billing_period: number | null;
|
|
140
143
|
/**
|
|
141
|
-
* The
|
|
144
|
+
* The currency used for all prices on this plan (e.g., 'usd', 'eur'). All monetary
|
|
145
|
+
* amounts on the plan are denominated in this currency.
|
|
142
146
|
*/
|
|
143
147
|
currency: Shared.Currency;
|
|
144
148
|
/**
|
|
@@ -153,11 +157,13 @@ export declare namespace CheckoutConfigurationListResponse {
|
|
|
153
157
|
*/
|
|
154
158
|
initial_price: number;
|
|
155
159
|
/**
|
|
156
|
-
*
|
|
160
|
+
* The billing model for this plan: 'renewal' for recurring subscriptions or
|
|
161
|
+
* 'one_time' for single payments.
|
|
157
162
|
*/
|
|
158
163
|
plan_type: Shared.PlanType;
|
|
159
164
|
/**
|
|
160
|
-
*
|
|
165
|
+
* The method used to sell this plan: 'buy_now' for immediate purchase or
|
|
166
|
+
* 'waitlist' for waitlist-based access.
|
|
161
167
|
*/
|
|
162
168
|
release_method: Shared.ReleaseMethod;
|
|
163
169
|
/**
|
|
@@ -166,11 +172,14 @@ export declare namespace CheckoutConfigurationListResponse {
|
|
|
166
172
|
*/
|
|
167
173
|
renewal_price: number;
|
|
168
174
|
/**
|
|
169
|
-
* The number of free trial days
|
|
175
|
+
* The number of free trial days before the first charge on a renewal plan. Null if
|
|
176
|
+
* no trial is configured or the current user has already used a trial for this
|
|
177
|
+
* plan.
|
|
170
178
|
*/
|
|
171
179
|
trial_period_days: number | null;
|
|
172
180
|
/**
|
|
173
|
-
*
|
|
181
|
+
* Controls whether the plan is visible to customers. When set to 'hidden', the
|
|
182
|
+
* plan is only accessible via direct link.
|
|
174
183
|
*/
|
|
175
184
|
visibility: Shared.Visibility;
|
|
176
185
|
}
|
|
@@ -179,11 +188,11 @@ export type CheckoutConfigurationCreateParams = CheckoutConfigurationCreateParam
|
|
|
179
188
|
export declare namespace CheckoutConfigurationCreateParams {
|
|
180
189
|
interface CreateCheckoutSessionInputModePaymentWithPlan {
|
|
181
190
|
/**
|
|
182
|
-
*
|
|
191
|
+
* The plan attributes to create a new plan inline for this checkout configuration.
|
|
183
192
|
*/
|
|
184
193
|
plan: CreateCheckoutSessionInputModePaymentWithPlan.Plan;
|
|
185
194
|
/**
|
|
186
|
-
*
|
|
195
|
+
* An affiliate tracking code to attribute the checkout to a specific affiliate.
|
|
187
196
|
*/
|
|
188
197
|
affiliate_code?: string | null;
|
|
189
198
|
/**
|
|
@@ -191,20 +200,19 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
191
200
|
*/
|
|
192
201
|
currency?: Shared.Currency | null;
|
|
193
202
|
/**
|
|
194
|
-
*
|
|
203
|
+
* Custom key-value metadata to attach to the checkout configuration.
|
|
195
204
|
*/
|
|
196
205
|
metadata?: {
|
|
197
206
|
[key: string]: unknown;
|
|
198
207
|
} | null;
|
|
199
208
|
mode?: 'payment';
|
|
200
209
|
/**
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
* platform or company's defaults will apply.
|
|
210
|
+
* The explicit payment method configuration for the checkout session. Only applies
|
|
211
|
+
* to setup mode. If not provided, the platform or company defaults will apply.
|
|
204
212
|
*/
|
|
205
213
|
payment_method_configuration?: CreateCheckoutSessionInputModePaymentWithPlan.PaymentMethodConfiguration | null;
|
|
206
214
|
/**
|
|
207
|
-
* The URL to redirect the user to after
|
|
215
|
+
* The URL to redirect the user to after checkout is completed.
|
|
208
216
|
*/
|
|
209
217
|
redirect_url?: string | null;
|
|
210
218
|
/**
|
|
@@ -214,7 +222,7 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
214
222
|
}
|
|
215
223
|
namespace CreateCheckoutSessionInputModePaymentWithPlan {
|
|
216
224
|
/**
|
|
217
|
-
*
|
|
225
|
+
* The plan attributes to create a new plan inline for this checkout configuration.
|
|
218
226
|
*/
|
|
219
227
|
interface Plan {
|
|
220
228
|
/**
|
|
@@ -426,6 +434,10 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
426
434
|
* The headline of the product.
|
|
427
435
|
*/
|
|
428
436
|
headline?: string | null;
|
|
437
|
+
/**
|
|
438
|
+
* The different industry groups a company can be in.
|
|
439
|
+
*/
|
|
440
|
+
industry_group?: ProductsAPI.IndustryGroups | null;
|
|
429
441
|
/**
|
|
430
442
|
* The different industry types a company can be in.
|
|
431
443
|
*/
|
|
@@ -449,9 +461,8 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
449
461
|
}
|
|
450
462
|
}
|
|
451
463
|
/**
|
|
452
|
-
*
|
|
453
|
-
*
|
|
454
|
-
* platform or company's defaults will apply.
|
|
464
|
+
* The explicit payment method configuration for the checkout session. Only applies
|
|
465
|
+
* to setup mode. If not provided, the platform or company defaults will apply.
|
|
455
466
|
*/
|
|
456
467
|
interface PaymentMethodConfiguration {
|
|
457
468
|
/**
|
|
@@ -476,11 +487,12 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
476
487
|
}
|
|
477
488
|
interface CreateCheckoutSessionInputModePaymentWithPlanID {
|
|
478
489
|
/**
|
|
479
|
-
* The
|
|
490
|
+
* The unique identifier of an existing plan to use for this checkout
|
|
491
|
+
* configuration.
|
|
480
492
|
*/
|
|
481
493
|
plan_id: string;
|
|
482
494
|
/**
|
|
483
|
-
*
|
|
495
|
+
* An affiliate tracking code to attribute the checkout to a specific affiliate.
|
|
484
496
|
*/
|
|
485
497
|
affiliate_code?: string | null;
|
|
486
498
|
/**
|
|
@@ -488,20 +500,19 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
488
500
|
*/
|
|
489
501
|
currency?: Shared.Currency | null;
|
|
490
502
|
/**
|
|
491
|
-
*
|
|
503
|
+
* Custom key-value metadata to attach to the checkout configuration.
|
|
492
504
|
*/
|
|
493
505
|
metadata?: {
|
|
494
506
|
[key: string]: unknown;
|
|
495
507
|
} | null;
|
|
496
508
|
mode?: 'payment';
|
|
497
509
|
/**
|
|
498
|
-
*
|
|
499
|
-
*
|
|
500
|
-
* platform or company's defaults will apply.
|
|
510
|
+
* The explicit payment method configuration for the checkout session. Only applies
|
|
511
|
+
* to setup mode. If not provided, the platform or company defaults will apply.
|
|
501
512
|
*/
|
|
502
513
|
payment_method_configuration?: CreateCheckoutSessionInputModePaymentWithPlanID.PaymentMethodConfiguration | null;
|
|
503
514
|
/**
|
|
504
|
-
* The URL to redirect the user to after
|
|
515
|
+
* The URL to redirect the user to after checkout is completed.
|
|
505
516
|
*/
|
|
506
517
|
redirect_url?: string | null;
|
|
507
518
|
/**
|
|
@@ -511,9 +522,8 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
511
522
|
}
|
|
512
523
|
namespace CreateCheckoutSessionInputModePaymentWithPlanID {
|
|
513
524
|
/**
|
|
514
|
-
*
|
|
515
|
-
*
|
|
516
|
-
* platform or company's defaults will apply.
|
|
525
|
+
* The explicit payment method configuration for the checkout session. Only applies
|
|
526
|
+
* to setup mode. If not provided, the platform or company defaults will apply.
|
|
517
527
|
*/
|
|
518
528
|
interface PaymentMethodConfiguration {
|
|
519
529
|
/**
|
|
@@ -538,8 +548,8 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
538
548
|
}
|
|
539
549
|
interface CreateCheckoutSessionInputModeSetup {
|
|
540
550
|
/**
|
|
541
|
-
* The
|
|
542
|
-
* required in setup mode.
|
|
551
|
+
* The unique identifier of the company to create the checkout configuration for.
|
|
552
|
+
* Only required in setup mode.
|
|
543
553
|
*/
|
|
544
554
|
company_id: string;
|
|
545
555
|
mode: 'setup';
|
|
@@ -548,19 +558,18 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
548
558
|
*/
|
|
549
559
|
currency?: Shared.Currency | null;
|
|
550
560
|
/**
|
|
551
|
-
*
|
|
561
|
+
* Custom key-value metadata to attach to the checkout configuration.
|
|
552
562
|
*/
|
|
553
563
|
metadata?: {
|
|
554
564
|
[key: string]: unknown;
|
|
555
565
|
} | null;
|
|
556
566
|
/**
|
|
557
|
-
*
|
|
558
|
-
*
|
|
559
|
-
* platform or company's defaults will apply.
|
|
567
|
+
* The explicit payment method configuration for the checkout session. Only applies
|
|
568
|
+
* to setup mode. If not provided, the platform or company defaults will apply.
|
|
560
569
|
*/
|
|
561
570
|
payment_method_configuration?: CreateCheckoutSessionInputModeSetup.PaymentMethodConfiguration | null;
|
|
562
571
|
/**
|
|
563
|
-
* The URL to redirect the user to after
|
|
572
|
+
* The URL to redirect the user to after checkout is completed.
|
|
564
573
|
*/
|
|
565
574
|
redirect_url?: string | null;
|
|
566
575
|
/**
|
|
@@ -570,9 +579,8 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
570
579
|
}
|
|
571
580
|
namespace CreateCheckoutSessionInputModeSetup {
|
|
572
581
|
/**
|
|
573
|
-
*
|
|
574
|
-
*
|
|
575
|
-
* platform or company's defaults will apply.
|
|
582
|
+
* The explicit payment method configuration for the checkout session. Only applies
|
|
583
|
+
* to setup mode. If not provided, the platform or company defaults will apply.
|
|
576
584
|
*/
|
|
577
585
|
interface PaymentMethodConfiguration {
|
|
578
586
|
/**
|
|
@@ -598,7 +606,7 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
598
606
|
}
|
|
599
607
|
export interface CheckoutConfigurationListParams extends CursorPageParams {
|
|
600
608
|
/**
|
|
601
|
-
* The
|
|
609
|
+
* The unique identifier of the company to list checkout configurations for.
|
|
602
610
|
*/
|
|
603
611
|
company_id: string;
|
|
604
612
|
/**
|
|
@@ -606,11 +614,11 @@ export interface CheckoutConfigurationListParams extends CursorPageParams {
|
|
|
606
614
|
*/
|
|
607
615
|
before?: string | null;
|
|
608
616
|
/**
|
|
609
|
-
*
|
|
617
|
+
* Only return checkout configurations created after this timestamp.
|
|
610
618
|
*/
|
|
611
619
|
created_after?: string | null;
|
|
612
620
|
/**
|
|
613
|
-
*
|
|
621
|
+
* Only return checkout configurations created before this timestamp.
|
|
614
622
|
*/
|
|
615
623
|
created_before?: string | null;
|
|
616
624
|
/**
|
|
@@ -626,7 +634,8 @@ export interface CheckoutConfigurationListParams extends CursorPageParams {
|
|
|
626
634
|
*/
|
|
627
635
|
last?: number | null;
|
|
628
636
|
/**
|
|
629
|
-
*
|
|
637
|
+
* Filter checkout configurations to only those associated with this plan
|
|
638
|
+
* identifier.
|
|
630
639
|
*/
|
|
631
640
|
plan_id?: string | null;
|
|
632
641
|
}
|