@whop/sdk 0.0.25 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/client.d.mts +29 -25
- package/client.d.mts.map +1 -1
- package/client.d.ts +29 -25
- package/client.d.ts.map +1 -1
- package/client.js +14 -3
- package/client.js.map +1 -1
- package/client.mjs +16 -5
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/package.json +3 -3
- package/resources/access-tokens.d.mts +32 -51
- package/resources/access-tokens.d.mts.map +1 -1
- package/resources/access-tokens.d.ts +32 -51
- package/resources/access-tokens.d.ts.map +1 -1
- package/resources/access-tokens.js +6 -8
- package/resources/access-tokens.js.map +1 -1
- package/resources/access-tokens.mjs +6 -8
- package/resources/access-tokens.mjs.map +1 -1
- package/resources/ai-chats.d.mts +36 -104
- package/resources/ai-chats.d.mts.map +1 -1
- package/resources/ai-chats.d.ts +36 -104
- package/resources/ai-chats.d.ts.map +1 -1
- package/resources/ai-chats.js +1 -1
- package/resources/ai-chats.js.map +1 -1
- package/resources/ai-chats.mjs +1 -1
- package/resources/ai-chats.mjs.map +1 -1
- package/resources/app-builds.d.mts +2 -2
- package/resources/app-builds.d.ts +2 -2
- package/resources/apps.d.mts +5 -4
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +5 -4
- package/resources/apps.d.ts.map +1 -1
- package/resources/authorized-users.d.mts +43 -9
- package/resources/authorized-users.d.mts.map +1 -1
- package/resources/authorized-users.d.ts +43 -9
- package/resources/authorized-users.d.ts.map +1 -1
- package/resources/authorized-users.js +1 -1
- package/resources/authorized-users.js.map +1 -1
- package/resources/authorized-users.mjs +1 -1
- package/resources/authorized-users.mjs.map +1 -1
- package/resources/chat-channels.d.mts +1 -1
- package/resources/chat-channels.d.ts +1 -1
- package/resources/checkout-configurations.d.mts +24 -16
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +24 -16
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/companies.d.mts +38 -25
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +38 -25
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.js +7 -4
- package/resources/companies.js.map +1 -1
- package/resources/companies.mjs +7 -4
- package/resources/companies.mjs.map +1 -1
- package/resources/company-token-transactions.d.mts +23 -109
- package/resources/company-token-transactions.d.mts.map +1 -1
- package/resources/company-token-transactions.d.ts +23 -109
- package/resources/company-token-transactions.d.ts.map +1 -1
- package/resources/course-chapters.d.mts +3 -3
- package/resources/course-chapters.d.ts +3 -3
- package/resources/course-lessons.d.mts +15 -15
- package/resources/course-lessons.d.ts +15 -15
- package/resources/course-students.d.mts +6 -6
- package/resources/course-students.d.ts +6 -6
- package/resources/courses.d.mts +8 -8
- package/resources/courses.d.ts +8 -8
- package/resources/disputes.d.mts +20 -18
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +20 -18
- package/resources/disputes.d.ts.map +1 -1
- package/resources/dm-channels.d.mts +161 -0
- package/resources/dm-channels.d.mts.map +1 -0
- package/resources/dm-channels.d.ts +161 -0
- package/resources/dm-channels.d.ts.map +1 -0
- package/resources/dm-channels.js +87 -0
- package/resources/dm-channels.js.map +1 -0
- package/resources/dm-channels.mjs +83 -0
- package/resources/dm-channels.mjs.map +1 -0
- package/resources/dm-members.d.mts +14 -66
- package/resources/dm-members.d.mts.map +1 -1
- package/resources/dm-members.d.ts +14 -66
- package/resources/dm-members.d.ts.map +1 -1
- package/resources/entries.d.mts +6 -6
- package/resources/entries.d.ts +6 -6
- package/resources/experiences.d.mts +6 -5
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +6 -5
- package/resources/experiences.d.ts.map +1 -1
- package/resources/fee-markups.d.mts +6 -6
- package/resources/fee-markups.d.ts +6 -6
- package/resources/files.d.mts +9 -5
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +9 -5
- package/resources/files.d.ts.map +1 -1
- package/resources/forum-posts.d.mts +8 -4
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +8 -4
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/forums.d.mts +1 -1
- package/resources/forums.d.ts +1 -1
- package/resources/index.d.mts +12 -11
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +12 -11
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -2
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +28 -20
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +28 -20
- package/resources/invoices.d.ts.map +1 -1
- package/resources/leads.d.mts +21 -189
- package/resources/leads.d.mts.map +1 -1
- package/resources/leads.d.ts +21 -189
- package/resources/leads.d.ts.map +1 -1
- package/resources/ledger-accounts.d.mts +12 -9
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +12 -9
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js.map +1 -1
- package/resources/ledger-accounts.mjs.map +1 -1
- package/resources/members.d.mts +14 -14
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +14 -14
- package/resources/members.d.ts.map +1 -1
- package/resources/members.js +1 -1
- package/resources/members.js.map +1 -1
- package/resources/members.mjs +1 -1
- package/resources/members.mjs.map +1 -1
- package/resources/memberships.d.mts +25 -15
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +25 -15
- package/resources/memberships.d.ts.map +1 -1
- package/resources/messages.d.mts +7 -3
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +7 -3
- package/resources/messages.d.ts.map +1 -1
- package/resources/payments.d.mts +59 -19
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +59 -19
- package/resources/payments.d.ts.map +1 -1
- package/resources/payout-methods.d.mts +14 -9
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +14 -9
- package/resources/payout-methods.d.ts.map +1 -1
- package/resources/payout-methods.js.map +1 -1
- package/resources/payout-methods.mjs.map +1 -1
- package/resources/plans.d.mts +34 -24
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +34 -24
- package/resources/plans.d.ts.map +1 -1
- package/resources/products.d.mts +4 -2
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +4 -2
- package/resources/products.d.ts.map +1 -1
- package/resources/promo-codes.d.mts +22 -12
- package/resources/promo-codes.d.mts.map +1 -1
- package/resources/promo-codes.d.ts +22 -12
- package/resources/promo-codes.d.ts.map +1 -1
- package/resources/reactions.d.mts +1 -1
- package/resources/reactions.d.ts +1 -1
- package/resources/refunds.d.mts +19 -15
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +19 -15
- package/resources/refunds.d.ts.map +1 -1
- package/resources/reviews.d.mts +10 -10
- package/resources/reviews.d.ts +10 -10
- package/resources/setup-intents.d.mts +18 -20
- package/resources/setup-intents.d.mts.map +1 -1
- package/resources/setup-intents.d.ts +18 -20
- package/resources/setup-intents.d.ts.map +1 -1
- package/resources/shared.d.mts +209 -137
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +209 -137
- package/resources/shared.d.ts.map +1 -1
- package/resources/shipments.d.mts +4 -4
- package/resources/shipments.d.ts +4 -4
- package/resources/support-channels.d.mts +1 -1
- package/resources/support-channels.d.ts +1 -1
- package/resources/topups.d.mts +6 -4
- package/resources/topups.d.mts.map +1 -1
- package/resources/topups.d.ts +6 -4
- package/resources/topups.d.ts.map +1 -1
- package/resources/transfers.d.mts +8 -5
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +8 -5
- package/resources/transfers.d.ts.map +1 -1
- package/resources/users.d.mts +46 -8
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +46 -8
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +10 -0
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +10 -0
- package/resources/users.mjs.map +1 -1
- package/resources/verifications.d.mts +12 -4
- package/resources/verifications.d.mts.map +1 -1
- package/resources/verifications.d.ts +12 -4
- package/resources/verifications.d.ts.map +1 -1
- package/resources/webhooks.d.mts +105 -350
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +105 -350
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +2 -2
- package/resources/webhooks.mjs.map +1 -1
- package/resources/withdrawals.d.mts +32 -139
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +32 -139
- package/resources/withdrawals.d.ts.map +1 -1
- package/src/client.ts +87 -41
- package/src/internal/parse.ts +6 -0
- package/src/resources/access-tokens.ts +35 -56
- package/src/resources/ai-chats.ts +36 -122
- package/src/resources/app-builds.ts +2 -2
- package/src/resources/apps.ts +5 -4
- package/src/resources/authorized-users.ts +49 -9
- package/src/resources/chat-channels.ts +1 -1
- package/src/resources/checkout-configurations.ts +24 -16
- package/src/resources/companies.ts +41 -26
- package/src/resources/company-token-transactions.ts +24 -126
- package/src/resources/course-chapters.ts +3 -3
- package/src/resources/course-lessons.ts +15 -15
- package/src/resources/course-students.ts +6 -6
- package/src/resources/courses.ts +8 -8
- package/src/resources/disputes.ts +20 -18
- package/src/resources/dm-channels.ts +212 -0
- package/src/resources/dm-members.ts +16 -78
- package/src/resources/entries.ts +6 -6
- package/src/resources/experiences.ts +6 -5
- package/src/resources/fee-markups.ts +6 -6
- package/src/resources/files.ts +10 -4
- package/src/resources/forum-posts.ts +8 -4
- package/src/resources/forums.ts +1 -1
- package/src/resources/index.ts +38 -18
- package/src/resources/invoices.ts +28 -20
- package/src/resources/leads.ts +21 -217
- package/src/resources/ledger-accounts.ts +12 -42
- package/src/resources/members.ts +15 -15
- package/src/resources/memberships.ts +34 -30
- package/src/resources/messages.ts +7 -3
- package/src/resources/payments.ts +67 -17
- package/src/resources/payout-methods.ts +21 -8
- package/src/resources/plans.ts +34 -24
- package/src/resources/products.ts +4 -2
- package/src/resources/promo-codes.ts +22 -12
- package/src/resources/reactions.ts +1 -1
- package/src/resources/refunds.ts +20 -15
- package/src/resources/reviews.ts +10 -10
- package/src/resources/setup-intents.ts +18 -20
- package/src/resources/shared.ts +217 -145
- package/src/resources/shipments.ts +4 -4
- package/src/resources/support-channels.ts +1 -1
- package/src/resources/topups.ts +6 -4
- package/src/resources/transfers.ts +8 -5
- package/src/resources/users.ts +58 -8
- package/src/resources/verifications.ts +50 -37
- package/src/resources/webhooks.ts +138 -785
- package/src/resources/withdrawals.ts +39 -216
- 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
package/resources/webhooks.d.mts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
2
|
import * as DisputesAPI from "./disputes.mjs";
|
|
3
3
|
import * as PaymentsAPI from "./payments.mjs";
|
|
4
|
+
import * as PayoutMethodsAPI from "./payout-methods.mjs";
|
|
4
5
|
import * as RefundsAPI from "./refunds.mjs";
|
|
5
6
|
import * as SetupIntentsAPI from "./setup-intents.mjs";
|
|
6
7
|
import * as Shared from "./shared.mjs";
|
|
8
|
+
import * as VerificationsAPI from "./verifications.mjs";
|
|
7
9
|
import * as WithdrawalsAPI from "./withdrawals.mjs";
|
|
8
10
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
9
11
|
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs";
|
|
@@ -38,7 +40,7 @@ export declare class Webhooks extends APIResource {
|
|
|
38
40
|
* );
|
|
39
41
|
* ```
|
|
40
42
|
*/
|
|
41
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<
|
|
43
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<Webhook>;
|
|
42
44
|
/**
|
|
43
45
|
* Updates a webhook
|
|
44
46
|
*
|
|
@@ -53,7 +55,7 @@ export declare class Webhooks extends APIResource {
|
|
|
53
55
|
* );
|
|
54
56
|
* ```
|
|
55
57
|
*/
|
|
56
|
-
update(id: string, body?: WebhookUpdateParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
58
|
+
update(id: string, body?: WebhookUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Webhook>;
|
|
57
59
|
/**
|
|
58
60
|
* Lists webhooks for a company
|
|
59
61
|
*
|
|
@@ -94,64 +96,22 @@ export declare class Webhooks extends APIResource {
|
|
|
94
96
|
}
|
|
95
97
|
export type WebhookListResponsesCursorPage = CursorPage<WebhookListResponse>;
|
|
96
98
|
/**
|
|
97
|
-
*
|
|
99
|
+
* The different API versions
|
|
98
100
|
*/
|
|
99
|
-
export
|
|
100
|
-
/**
|
|
101
|
-
* The ID of the webhook
|
|
102
|
-
*/
|
|
103
|
-
id: string;
|
|
104
|
-
/**
|
|
105
|
-
* The API version for this webhook
|
|
106
|
-
*/
|
|
107
|
-
api_version: 'v1' | 'v2' | 'v5';
|
|
108
|
-
/**
|
|
109
|
-
* Whether or not to send events for child resources. For example, if the webhook
|
|
110
|
-
* is created for a Company, enabling this will only send events from the Company's
|
|
111
|
-
* sub-merchants (child companies).
|
|
112
|
-
*/
|
|
113
|
-
child_resource_events: boolean;
|
|
114
|
-
/**
|
|
115
|
-
* The timestamp of when the webhook was created
|
|
116
|
-
*/
|
|
117
|
-
created_at: string;
|
|
118
|
-
/**
|
|
119
|
-
* Whether or not this webhook is turned on or not
|
|
120
|
-
*/
|
|
121
|
-
enabled: boolean;
|
|
122
|
-
/**
|
|
123
|
-
* The number of events this webhooks is configured to receive
|
|
124
|
-
*/
|
|
125
|
-
events: Array<'invoice.created' | 'invoice.paid' | 'invoice.past_due' | 'invoice.voided' | 'membership.activated' | 'membership.deactivated' | 'entry.created' | 'entry.approved' | 'entry.denied' | 'entry.deleted' | 'setup_intent.requires_action' | 'setup_intent.succeeded' | 'setup_intent.canceled' | 'withdrawal.created' | 'withdrawal.updated' | 'course_lesson_interaction.completed' | 'payout_method.created' | 'verification.succeeded' | 'payment.created' | 'payment.succeeded' | 'payment.failed' | 'payment.pending' | 'dispute.created' | 'dispute.updated' | 'refund.created' | 'refund.updated' | 'membership.cancel_at_period_end_changed'>;
|
|
126
|
-
/**
|
|
127
|
-
* The resource ID
|
|
128
|
-
*/
|
|
129
|
-
resource_id: string;
|
|
130
|
-
/**
|
|
131
|
-
* The list of events that can be tested with this webhook
|
|
132
|
-
*/
|
|
133
|
-
testable_events: Array<'invoice.created' | 'invoice.paid' | 'invoice.past_due' | 'invoice.voided' | 'membership.activated' | 'membership.deactivated' | 'entry.created' | 'entry.approved' | 'entry.denied' | 'entry.deleted' | 'setup_intent.requires_action' | 'setup_intent.succeeded' | 'setup_intent.canceled' | 'withdrawal.created' | 'withdrawal.updated' | 'course_lesson_interaction.completed' | 'payout_method.created' | 'verification.succeeded' | 'payment.created' | 'payment.succeeded' | 'payment.failed' | 'payment.pending' | 'dispute.created' | 'dispute.updated' | 'refund.created' | 'refund.updated' | 'membership.cancel_at_period_end_changed'>;
|
|
134
|
-
/**
|
|
135
|
-
* The URL the webhook events will be sent to
|
|
136
|
-
*/
|
|
137
|
-
url: string;
|
|
138
|
-
/**
|
|
139
|
-
* A unique secret key that will be sent with each webhook event
|
|
140
|
-
*/
|
|
141
|
-
webhook_secret: string;
|
|
142
|
-
}
|
|
101
|
+
export type APIVersion = 'v1' | 'v2' | 'v5';
|
|
143
102
|
/**
|
|
144
|
-
* A webhook
|
|
103
|
+
* A webhook endpoint that receives event notifications for a company via HTTP
|
|
104
|
+
* POST.
|
|
145
105
|
*/
|
|
146
|
-
export interface
|
|
106
|
+
export interface Webhook {
|
|
147
107
|
/**
|
|
148
|
-
* The
|
|
108
|
+
* The unique identifier for the webhook.
|
|
149
109
|
*/
|
|
150
110
|
id: string;
|
|
151
111
|
/**
|
|
152
112
|
* The API version for this webhook
|
|
153
113
|
*/
|
|
154
|
-
api_version:
|
|
114
|
+
api_version: APIVersion;
|
|
155
115
|
/**
|
|
156
116
|
* Whether or not to send events for child resources. For example, if the webhook
|
|
157
117
|
* is created for a Company, enabling this will only send events from the Company's
|
|
@@ -159,7 +119,7 @@ export interface WebhookRetrieveResponse {
|
|
|
159
119
|
*/
|
|
160
120
|
child_resource_events: boolean;
|
|
161
121
|
/**
|
|
162
|
-
* The
|
|
122
|
+
* The datetime the webhook was created.
|
|
163
123
|
*/
|
|
164
124
|
created_at: string;
|
|
165
125
|
/**
|
|
@@ -169,7 +129,7 @@ export interface WebhookRetrieveResponse {
|
|
|
169
129
|
/**
|
|
170
130
|
* The number of events this webhooks is configured to receive
|
|
171
131
|
*/
|
|
172
|
-
events: Array<
|
|
132
|
+
events: Array<WebhookEvent>;
|
|
173
133
|
/**
|
|
174
134
|
* The resource ID
|
|
175
135
|
*/
|
|
@@ -177,24 +137,29 @@ export interface WebhookRetrieveResponse {
|
|
|
177
137
|
/**
|
|
178
138
|
* The list of events that can be tested with this webhook
|
|
179
139
|
*/
|
|
180
|
-
testable_events: Array<
|
|
140
|
+
testable_events: Array<WebhookEvent>;
|
|
181
141
|
/**
|
|
182
142
|
* The URL the webhook events will be sent to
|
|
183
143
|
*/
|
|
184
144
|
url: string;
|
|
185
145
|
}
|
|
186
146
|
/**
|
|
187
|
-
*
|
|
147
|
+
* The different event types available
|
|
188
148
|
*/
|
|
189
|
-
export
|
|
149
|
+
export type WebhookEvent = 'invoice.created' | 'invoice.paid' | 'invoice.past_due' | 'invoice.voided' | 'membership.activated' | 'membership.deactivated' | 'entry.created' | 'entry.approved' | 'entry.denied' | 'entry.deleted' | 'setup_intent.requires_action' | 'setup_intent.succeeded' | 'setup_intent.canceled' | 'withdrawal.created' | 'withdrawal.updated' | 'course_lesson_interaction.completed' | 'payout_method.created' | 'verification.succeeded' | 'payment.created' | 'payment.succeeded' | 'payment.failed' | 'payment.pending' | 'dispute.created' | 'dispute.updated' | 'refund.created' | 'refund.updated' | 'membership.cancel_at_period_end_changed';
|
|
150
|
+
/**
|
|
151
|
+
* A webhook endpoint that receives event notifications for a company via HTTP
|
|
152
|
+
* POST.
|
|
153
|
+
*/
|
|
154
|
+
export interface WebhookCreateResponse {
|
|
190
155
|
/**
|
|
191
|
-
* The
|
|
156
|
+
* The unique identifier for the webhook.
|
|
192
157
|
*/
|
|
193
158
|
id: string;
|
|
194
159
|
/**
|
|
195
160
|
* The API version for this webhook
|
|
196
161
|
*/
|
|
197
|
-
api_version:
|
|
162
|
+
api_version: APIVersion;
|
|
198
163
|
/**
|
|
199
164
|
* Whether or not to send events for child resources. For example, if the webhook
|
|
200
165
|
* is created for a Company, enabling this will only send events from the Company's
|
|
@@ -202,7 +167,7 @@ export interface WebhookUpdateResponse {
|
|
|
202
167
|
*/
|
|
203
168
|
child_resource_events: boolean;
|
|
204
169
|
/**
|
|
205
|
-
* The
|
|
170
|
+
* The datetime the webhook was created.
|
|
206
171
|
*/
|
|
207
172
|
created_at: string;
|
|
208
173
|
/**
|
|
@@ -212,7 +177,7 @@ export interface WebhookUpdateResponse {
|
|
|
212
177
|
/**
|
|
213
178
|
* The number of events this webhooks is configured to receive
|
|
214
179
|
*/
|
|
215
|
-
events: Array<
|
|
180
|
+
events: Array<WebhookEvent>;
|
|
216
181
|
/**
|
|
217
182
|
* The resource ID
|
|
218
183
|
*/
|
|
@@ -220,24 +185,29 @@ export interface WebhookUpdateResponse {
|
|
|
220
185
|
/**
|
|
221
186
|
* The list of events that can be tested with this webhook
|
|
222
187
|
*/
|
|
223
|
-
testable_events: Array<
|
|
188
|
+
testable_events: Array<WebhookEvent>;
|
|
224
189
|
/**
|
|
225
190
|
* The URL the webhook events will be sent to
|
|
226
191
|
*/
|
|
227
192
|
url: string;
|
|
193
|
+
/**
|
|
194
|
+
* A unique secret key that will be sent with each webhook event
|
|
195
|
+
*/
|
|
196
|
+
webhook_secret: string;
|
|
228
197
|
}
|
|
229
198
|
/**
|
|
230
|
-
* A webhook
|
|
199
|
+
* A webhook endpoint that receives event notifications for a company via HTTP
|
|
200
|
+
* POST.
|
|
231
201
|
*/
|
|
232
202
|
export interface WebhookListResponse {
|
|
233
203
|
/**
|
|
234
|
-
* The
|
|
204
|
+
* The unique identifier for the webhook.
|
|
235
205
|
*/
|
|
236
206
|
id: string;
|
|
237
207
|
/**
|
|
238
208
|
* The API version for this webhook
|
|
239
209
|
*/
|
|
240
|
-
api_version:
|
|
210
|
+
api_version: APIVersion;
|
|
241
211
|
/**
|
|
242
212
|
* Whether or not to send events for child resources. For example, if the webhook
|
|
243
213
|
* is created for a Company, enabling this will only send events from the Company's
|
|
@@ -245,7 +215,7 @@ export interface WebhookListResponse {
|
|
|
245
215
|
*/
|
|
246
216
|
child_resource_events: boolean;
|
|
247
217
|
/**
|
|
248
|
-
* The
|
|
218
|
+
* The datetime the webhook was created.
|
|
249
219
|
*/
|
|
250
220
|
created_at: string;
|
|
251
221
|
/**
|
|
@@ -255,7 +225,7 @@ export interface WebhookListResponse {
|
|
|
255
225
|
/**
|
|
256
226
|
* The number of events this webhooks is configured to receive
|
|
257
227
|
*/
|
|
258
|
-
events: Array<
|
|
228
|
+
events: Array<WebhookEvent>;
|
|
259
229
|
/**
|
|
260
230
|
* The URL the webhook events will be sent to
|
|
261
231
|
*/
|
|
@@ -379,8 +349,8 @@ export interface MembershipActivatedWebhookEvent {
|
|
|
379
349
|
*/
|
|
380
350
|
api_version: 'v1';
|
|
381
351
|
/**
|
|
382
|
-
* A membership represents
|
|
383
|
-
*
|
|
352
|
+
* A membership represents an active relationship between a user and a product. It
|
|
353
|
+
* tracks the user's access, billing status, and renewal schedule.
|
|
384
354
|
*/
|
|
385
355
|
data: Shared.Membership;
|
|
386
356
|
/**
|
|
@@ -406,8 +376,8 @@ export interface MembershipDeactivatedWebhookEvent {
|
|
|
406
376
|
*/
|
|
407
377
|
api_version: 'v1';
|
|
408
378
|
/**
|
|
409
|
-
* A membership represents
|
|
410
|
-
*
|
|
379
|
+
* A membership represents an active relationship between a user and a product. It
|
|
380
|
+
* tracks the user's access, billing status, and renewal schedule.
|
|
411
381
|
*/
|
|
412
382
|
data: Shared.Membership;
|
|
413
383
|
/**
|
|
@@ -433,7 +403,7 @@ export interface EntryCreatedWebhookEvent {
|
|
|
433
403
|
*/
|
|
434
404
|
api_version: 'v1';
|
|
435
405
|
/**
|
|
436
|
-
* An
|
|
406
|
+
* An entry represents a user's signup for a waitlisted plan.
|
|
437
407
|
*/
|
|
438
408
|
data: Shared.Entry;
|
|
439
409
|
/**
|
|
@@ -459,7 +429,7 @@ export interface EntryApprovedWebhookEvent {
|
|
|
459
429
|
*/
|
|
460
430
|
api_version: 'v1';
|
|
461
431
|
/**
|
|
462
|
-
* An
|
|
432
|
+
* An entry represents a user's signup for a waitlisted plan.
|
|
463
433
|
*/
|
|
464
434
|
data: Shared.Entry;
|
|
465
435
|
/**
|
|
@@ -485,7 +455,7 @@ export interface EntryDeniedWebhookEvent {
|
|
|
485
455
|
*/
|
|
486
456
|
api_version: 'v1';
|
|
487
457
|
/**
|
|
488
|
-
* An
|
|
458
|
+
* An entry represents a user's signup for a waitlisted plan.
|
|
489
459
|
*/
|
|
490
460
|
data: Shared.Entry;
|
|
491
461
|
/**
|
|
@@ -511,7 +481,7 @@ export interface EntryDeletedWebhookEvent {
|
|
|
511
481
|
*/
|
|
512
482
|
api_version: 'v1';
|
|
513
483
|
/**
|
|
514
|
-
* An
|
|
484
|
+
* An entry represents a user's signup for a waitlisted plan.
|
|
515
485
|
*/
|
|
516
486
|
data: Shared.Entry;
|
|
517
487
|
/**
|
|
@@ -537,8 +507,7 @@ export interface SetupIntentRequiresActionWebhookEvent {
|
|
|
537
507
|
*/
|
|
538
508
|
api_version: 'v1';
|
|
539
509
|
/**
|
|
540
|
-
*
|
|
541
|
-
* to add a payment method to their account without making a purchase.
|
|
510
|
+
* A setup intent allows a user to save a payment method without making a purchase.
|
|
542
511
|
*/
|
|
543
512
|
data: SetupIntentsAPI.SetupIntent;
|
|
544
513
|
/**
|
|
@@ -564,8 +533,7 @@ export interface SetupIntentSucceededWebhookEvent {
|
|
|
564
533
|
*/
|
|
565
534
|
api_version: 'v1';
|
|
566
535
|
/**
|
|
567
|
-
*
|
|
568
|
-
* to add a payment method to their account without making a purchase.
|
|
536
|
+
* A setup intent allows a user to save a payment method without making a purchase.
|
|
569
537
|
*/
|
|
570
538
|
data: SetupIntentsAPI.SetupIntent;
|
|
571
539
|
/**
|
|
@@ -591,8 +559,7 @@ export interface SetupIntentCanceledWebhookEvent {
|
|
|
591
559
|
*/
|
|
592
560
|
api_version: 'v1';
|
|
593
561
|
/**
|
|
594
|
-
*
|
|
595
|
-
* to add a payment method to their account without making a purchase.
|
|
562
|
+
* A setup intent allows a user to save a payment method without making a purchase.
|
|
596
563
|
*/
|
|
597
564
|
data: SetupIntentsAPI.SetupIntent;
|
|
598
565
|
/**
|
|
@@ -618,9 +585,10 @@ export interface WithdrawalCreatedWebhookEvent {
|
|
|
618
585
|
*/
|
|
619
586
|
api_version: 'v1';
|
|
620
587
|
/**
|
|
621
|
-
* A withdrawal request
|
|
588
|
+
* A withdrawal represents a request to transfer funds from a company's ledger
|
|
589
|
+
* account to an external payout method.
|
|
622
590
|
*/
|
|
623
|
-
data:
|
|
591
|
+
data: WithdrawalsAPI.Withdrawal;
|
|
624
592
|
/**
|
|
625
593
|
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
626
594
|
*/
|
|
@@ -634,119 +602,6 @@ export interface WithdrawalCreatedWebhookEvent {
|
|
|
634
602
|
*/
|
|
635
603
|
company_id?: string | null;
|
|
636
604
|
}
|
|
637
|
-
export declare namespace WithdrawalCreatedWebhookEvent {
|
|
638
|
-
/**
|
|
639
|
-
* A withdrawal request.
|
|
640
|
-
*/
|
|
641
|
-
interface Data {
|
|
642
|
-
/**
|
|
643
|
-
* Internal ID of the withdrawal request.
|
|
644
|
-
*/
|
|
645
|
-
id: string;
|
|
646
|
-
/**
|
|
647
|
-
* How much money was attempted to be withdrawn, in a float type.
|
|
648
|
-
*/
|
|
649
|
-
amount: number;
|
|
650
|
-
/**
|
|
651
|
-
* When the withdrawal request was created.
|
|
652
|
-
*/
|
|
653
|
-
created_at: string;
|
|
654
|
-
/**
|
|
655
|
-
* The currency of the withdrawal request.
|
|
656
|
-
*/
|
|
657
|
-
currency: Shared.Currency;
|
|
658
|
-
/**
|
|
659
|
-
* The different error codes a payout can be in.
|
|
660
|
-
*/
|
|
661
|
-
error_code: 'account_closed' | 'account_does_not_exist' | 'account_information_invalid' | 'account_number_invalid_region' | 'account_frozen' | 'account_lookup_failed' | 'account_not_found' | 'amount_out_of_bounds' | 'attributes_not_validated' | 'b2b_payments_prohibited' | 'bank_statement_required' | 'compliance_review' | 'currency_not_supported' | 'deposit_canceled' | 'deposit_failed' | 'deposit_rejected' | 'destination_unavailable' | 'exceeded_account_limit' | 'expired_quote' | 'generic_payout_error' | 'technical_problem' | 'identification_number_invalid' | 'invalid_account_number' | 'invalid_bank_code' | 'invalid_beneficiary' | 'invalid_mailing_address' | 'invalid_branch_number' | 'invalid_branch_code' | 'invalid_phone_number' | 'invalid_routing_number' | 'invalid_swift_code' | 'invalid_company_details' | 'manual_cancelation' | 'misc_error' | 'missing_city_and_country' | 'missing_phone_number' | 'missing_remittance_info' | 'payee_name_invalid' | 'receiving_account_locked' | 'rejected_by_compliance' | 'rtp_not_supported' | 'non_transaction_account' | 'source_token_insufficient_funds' | 'ssn_invalid' | 'wallet_screenshot_required' | 'unsupported_region' | null;
|
|
662
|
-
/**
|
|
663
|
-
* The error message for the withdrawal, if any.
|
|
664
|
-
*/
|
|
665
|
-
error_message: string | null;
|
|
666
|
-
/**
|
|
667
|
-
* The estimated availability date for the withdrawal, if any.
|
|
668
|
-
*/
|
|
669
|
-
estimated_availability: string | null;
|
|
670
|
-
/**
|
|
671
|
-
* The fee amount that was charged for the withdrawal. This is in the same currency
|
|
672
|
-
* as the withdrawal amount.
|
|
673
|
-
*/
|
|
674
|
-
fee_amount: number;
|
|
675
|
-
/**
|
|
676
|
-
* The different fee types for a withdrawal.
|
|
677
|
-
*/
|
|
678
|
-
fee_type: WithdrawalsAPI.WithdrawalFeeTypes | null;
|
|
679
|
-
/**
|
|
680
|
-
* The ledger account associated with the withdrawal.
|
|
681
|
-
*/
|
|
682
|
-
ledger_account: Data.LedgerAccount;
|
|
683
|
-
/**
|
|
684
|
-
* The markup fee that was charged for the withdrawal. This is in the same currency
|
|
685
|
-
* as the withdrawal amount. This only applies to platform accounts using Whop
|
|
686
|
-
* Rails.
|
|
687
|
-
*/
|
|
688
|
-
markup_fee: number;
|
|
689
|
-
/**
|
|
690
|
-
* The payout token used for the withdrawal, if applicable.
|
|
691
|
-
*/
|
|
692
|
-
payout_token: Data.PayoutToken | null;
|
|
693
|
-
/**
|
|
694
|
-
* The speed of the withdrawal.
|
|
695
|
-
*/
|
|
696
|
-
speed: WithdrawalsAPI.WithdrawalSpeeds;
|
|
697
|
-
/**
|
|
698
|
-
* Status of the withdrawal.
|
|
699
|
-
*/
|
|
700
|
-
status: WithdrawalsAPI.WithdrawalStatus;
|
|
701
|
-
/**
|
|
702
|
-
* The trace code for the payout, if applicable. Provided on ACH transactions when
|
|
703
|
-
* available.
|
|
704
|
-
*/
|
|
705
|
-
trace_code: string | null;
|
|
706
|
-
}
|
|
707
|
-
namespace Data {
|
|
708
|
-
/**
|
|
709
|
-
* The ledger account associated with the withdrawal.
|
|
710
|
-
*/
|
|
711
|
-
interface LedgerAccount {
|
|
712
|
-
/**
|
|
713
|
-
* The ID of the LedgerAccount.
|
|
714
|
-
*/
|
|
715
|
-
id: string;
|
|
716
|
-
/**
|
|
717
|
-
* The ID of the company associated with this ledger account.
|
|
718
|
-
*/
|
|
719
|
-
company_id: string | null;
|
|
720
|
-
}
|
|
721
|
-
/**
|
|
722
|
-
* The payout token used for the withdrawal, if applicable.
|
|
723
|
-
*/
|
|
724
|
-
interface PayoutToken {
|
|
725
|
-
/**
|
|
726
|
-
* The ID of the payout token
|
|
727
|
-
*/
|
|
728
|
-
id: string;
|
|
729
|
-
/**
|
|
730
|
-
* The date and time the payout token was created
|
|
731
|
-
*/
|
|
732
|
-
created_at: string;
|
|
733
|
-
/**
|
|
734
|
-
* The currency code of the payout destination. This is the currency that payouts
|
|
735
|
-
* will be made in for this token.
|
|
736
|
-
*/
|
|
737
|
-
destination_currency_code: string;
|
|
738
|
-
/**
|
|
739
|
-
* An optional nickname for the payout token to help the user identify it. This is
|
|
740
|
-
* not used by the provider and is only for the user's reference.
|
|
741
|
-
*/
|
|
742
|
-
nickname: string | null;
|
|
743
|
-
/**
|
|
744
|
-
* The name of the payer associated with the payout token.
|
|
745
|
-
*/
|
|
746
|
-
payer_name: string | null;
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
605
|
export interface WithdrawalUpdatedWebhookEvent {
|
|
751
606
|
/**
|
|
752
607
|
* A unique ID for every single webhook request
|
|
@@ -757,9 +612,10 @@ export interface WithdrawalUpdatedWebhookEvent {
|
|
|
757
612
|
*/
|
|
758
613
|
api_version: 'v1';
|
|
759
614
|
/**
|
|
760
|
-
* A withdrawal request
|
|
615
|
+
* A withdrawal represents a request to transfer funds from a company's ledger
|
|
616
|
+
* account to an external payout method.
|
|
761
617
|
*/
|
|
762
|
-
data:
|
|
618
|
+
data: WithdrawalsAPI.Withdrawal;
|
|
763
619
|
/**
|
|
764
620
|
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
765
621
|
*/
|
|
@@ -773,119 +629,6 @@ export interface WithdrawalUpdatedWebhookEvent {
|
|
|
773
629
|
*/
|
|
774
630
|
company_id?: string | null;
|
|
775
631
|
}
|
|
776
|
-
export declare namespace WithdrawalUpdatedWebhookEvent {
|
|
777
|
-
/**
|
|
778
|
-
* A withdrawal request.
|
|
779
|
-
*/
|
|
780
|
-
interface Data {
|
|
781
|
-
/**
|
|
782
|
-
* Internal ID of the withdrawal request.
|
|
783
|
-
*/
|
|
784
|
-
id: string;
|
|
785
|
-
/**
|
|
786
|
-
* How much money was attempted to be withdrawn, in a float type.
|
|
787
|
-
*/
|
|
788
|
-
amount: number;
|
|
789
|
-
/**
|
|
790
|
-
* When the withdrawal request was created.
|
|
791
|
-
*/
|
|
792
|
-
created_at: string;
|
|
793
|
-
/**
|
|
794
|
-
* The currency of the withdrawal request.
|
|
795
|
-
*/
|
|
796
|
-
currency: Shared.Currency;
|
|
797
|
-
/**
|
|
798
|
-
* The different error codes a payout can be in.
|
|
799
|
-
*/
|
|
800
|
-
error_code: 'account_closed' | 'account_does_not_exist' | 'account_information_invalid' | 'account_number_invalid_region' | 'account_frozen' | 'account_lookup_failed' | 'account_not_found' | 'amount_out_of_bounds' | 'attributes_not_validated' | 'b2b_payments_prohibited' | 'bank_statement_required' | 'compliance_review' | 'currency_not_supported' | 'deposit_canceled' | 'deposit_failed' | 'deposit_rejected' | 'destination_unavailable' | 'exceeded_account_limit' | 'expired_quote' | 'generic_payout_error' | 'technical_problem' | 'identification_number_invalid' | 'invalid_account_number' | 'invalid_bank_code' | 'invalid_beneficiary' | 'invalid_mailing_address' | 'invalid_branch_number' | 'invalid_branch_code' | 'invalid_phone_number' | 'invalid_routing_number' | 'invalid_swift_code' | 'invalid_company_details' | 'manual_cancelation' | 'misc_error' | 'missing_city_and_country' | 'missing_phone_number' | 'missing_remittance_info' | 'payee_name_invalid' | 'receiving_account_locked' | 'rejected_by_compliance' | 'rtp_not_supported' | 'non_transaction_account' | 'source_token_insufficient_funds' | 'ssn_invalid' | 'wallet_screenshot_required' | 'unsupported_region' | null;
|
|
801
|
-
/**
|
|
802
|
-
* The error message for the withdrawal, if any.
|
|
803
|
-
*/
|
|
804
|
-
error_message: string | null;
|
|
805
|
-
/**
|
|
806
|
-
* The estimated availability date for the withdrawal, if any.
|
|
807
|
-
*/
|
|
808
|
-
estimated_availability: string | null;
|
|
809
|
-
/**
|
|
810
|
-
* The fee amount that was charged for the withdrawal. This is in the same currency
|
|
811
|
-
* as the withdrawal amount.
|
|
812
|
-
*/
|
|
813
|
-
fee_amount: number;
|
|
814
|
-
/**
|
|
815
|
-
* The different fee types for a withdrawal.
|
|
816
|
-
*/
|
|
817
|
-
fee_type: WithdrawalsAPI.WithdrawalFeeTypes | null;
|
|
818
|
-
/**
|
|
819
|
-
* The ledger account associated with the withdrawal.
|
|
820
|
-
*/
|
|
821
|
-
ledger_account: Data.LedgerAccount;
|
|
822
|
-
/**
|
|
823
|
-
* The markup fee that was charged for the withdrawal. This is in the same currency
|
|
824
|
-
* as the withdrawal amount. This only applies to platform accounts using Whop
|
|
825
|
-
* Rails.
|
|
826
|
-
*/
|
|
827
|
-
markup_fee: number;
|
|
828
|
-
/**
|
|
829
|
-
* The payout token used for the withdrawal, if applicable.
|
|
830
|
-
*/
|
|
831
|
-
payout_token: Data.PayoutToken | null;
|
|
832
|
-
/**
|
|
833
|
-
* The speed of the withdrawal.
|
|
834
|
-
*/
|
|
835
|
-
speed: WithdrawalsAPI.WithdrawalSpeeds;
|
|
836
|
-
/**
|
|
837
|
-
* Status of the withdrawal.
|
|
838
|
-
*/
|
|
839
|
-
status: WithdrawalsAPI.WithdrawalStatus;
|
|
840
|
-
/**
|
|
841
|
-
* The trace code for the payout, if applicable. Provided on ACH transactions when
|
|
842
|
-
* available.
|
|
843
|
-
*/
|
|
844
|
-
trace_code: string | null;
|
|
845
|
-
}
|
|
846
|
-
namespace Data {
|
|
847
|
-
/**
|
|
848
|
-
* The ledger account associated with the withdrawal.
|
|
849
|
-
*/
|
|
850
|
-
interface LedgerAccount {
|
|
851
|
-
/**
|
|
852
|
-
* The ID of the LedgerAccount.
|
|
853
|
-
*/
|
|
854
|
-
id: string;
|
|
855
|
-
/**
|
|
856
|
-
* The ID of the company associated with this ledger account.
|
|
857
|
-
*/
|
|
858
|
-
company_id: string | null;
|
|
859
|
-
}
|
|
860
|
-
/**
|
|
861
|
-
* The payout token used for the withdrawal, if applicable.
|
|
862
|
-
*/
|
|
863
|
-
interface PayoutToken {
|
|
864
|
-
/**
|
|
865
|
-
* The ID of the payout token
|
|
866
|
-
*/
|
|
867
|
-
id: string;
|
|
868
|
-
/**
|
|
869
|
-
* The date and time the payout token was created
|
|
870
|
-
*/
|
|
871
|
-
created_at: string;
|
|
872
|
-
/**
|
|
873
|
-
* The currency code of the payout destination. This is the currency that payouts
|
|
874
|
-
* will be made in for this token.
|
|
875
|
-
*/
|
|
876
|
-
destination_currency_code: string;
|
|
877
|
-
/**
|
|
878
|
-
* An optional nickname for the payout token to help the user identify it. This is
|
|
879
|
-
* not used by the provider and is only for the user's reference.
|
|
880
|
-
*/
|
|
881
|
-
nickname: string | null;
|
|
882
|
-
/**
|
|
883
|
-
* The name of the payer associated with the payout token.
|
|
884
|
-
*/
|
|
885
|
-
payer_name: string | null;
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
632
|
export interface CourseLessonInteractionCompletedWebhookEvent {
|
|
890
633
|
/**
|
|
891
634
|
* A unique ID for every single webhook request
|
|
@@ -944,7 +687,7 @@ export declare namespace PayoutMethodCreatedWebhookEvent {
|
|
|
944
687
|
*/
|
|
945
688
|
interface Data {
|
|
946
689
|
/**
|
|
947
|
-
* The
|
|
690
|
+
* The unique identifier for the payout token.
|
|
948
691
|
*/
|
|
949
692
|
id: string;
|
|
950
693
|
/**
|
|
@@ -957,7 +700,7 @@ export declare namespace PayoutMethodCreatedWebhookEvent {
|
|
|
957
700
|
*/
|
|
958
701
|
company: Data.Company | null;
|
|
959
702
|
/**
|
|
960
|
-
* The
|
|
703
|
+
* The datetime the payout token was created.
|
|
961
704
|
*/
|
|
962
705
|
created_at: string;
|
|
963
706
|
/**
|
|
@@ -989,7 +732,7 @@ export declare namespace PayoutMethodCreatedWebhookEvent {
|
|
|
989
732
|
*/
|
|
990
733
|
interface Company {
|
|
991
734
|
/**
|
|
992
|
-
* The
|
|
735
|
+
* The unique identifier for the company.
|
|
993
736
|
*/
|
|
994
737
|
id: string;
|
|
995
738
|
}
|
|
@@ -1000,7 +743,7 @@ export declare namespace PayoutMethodCreatedWebhookEvent {
|
|
|
1000
743
|
/**
|
|
1001
744
|
* The category of the payout destination
|
|
1002
745
|
*/
|
|
1003
|
-
category:
|
|
746
|
+
category: PayoutMethodsAPI.PayoutDestinationCategory;
|
|
1004
747
|
/**
|
|
1005
748
|
* The country code of the payout destination
|
|
1006
749
|
*/
|
|
@@ -1044,13 +787,13 @@ export declare namespace VerificationSucceededWebhookEvent {
|
|
|
1044
787
|
*/
|
|
1045
788
|
interface Data {
|
|
1046
789
|
/**
|
|
1047
|
-
*
|
|
790
|
+
* The unique identifier for the verification.
|
|
1048
791
|
*/
|
|
1049
792
|
id: string;
|
|
1050
793
|
/**
|
|
1051
794
|
* An error code for a verification attempt.
|
|
1052
795
|
*/
|
|
1053
|
-
last_error_code:
|
|
796
|
+
last_error_code: VerificationsAPI.VerificationErrorCode | null;
|
|
1054
797
|
/**
|
|
1055
798
|
* The last error reason that occurred during the verification.
|
|
1056
799
|
*/
|
|
@@ -1058,7 +801,7 @@ export declare namespace VerificationSucceededWebhookEvent {
|
|
|
1058
801
|
/**
|
|
1059
802
|
* The status of the verification.
|
|
1060
803
|
*/
|
|
1061
|
-
status:
|
|
804
|
+
status: VerificationsAPI.VerificationStatus;
|
|
1062
805
|
}
|
|
1063
806
|
}
|
|
1064
807
|
export interface PaymentCreatedWebhookEvent {
|
|
@@ -1071,7 +814,8 @@ export interface PaymentCreatedWebhookEvent {
|
|
|
1071
814
|
*/
|
|
1072
815
|
api_version: 'v1';
|
|
1073
816
|
/**
|
|
1074
|
-
*
|
|
817
|
+
* A payment represents a completed or attempted charge for a membership. Payments
|
|
818
|
+
* track the amount, status, currency, and payment method used.
|
|
1075
819
|
*/
|
|
1076
820
|
data: Shared.Payment;
|
|
1077
821
|
/**
|
|
@@ -1097,7 +841,8 @@ export interface PaymentSucceededWebhookEvent {
|
|
|
1097
841
|
*/
|
|
1098
842
|
api_version: 'v1';
|
|
1099
843
|
/**
|
|
1100
|
-
*
|
|
844
|
+
* A payment represents a completed or attempted charge for a membership. Payments
|
|
845
|
+
* track the amount, status, currency, and payment method used.
|
|
1101
846
|
*/
|
|
1102
847
|
data: Shared.Payment;
|
|
1103
848
|
/**
|
|
@@ -1123,7 +868,8 @@ export interface PaymentFailedWebhookEvent {
|
|
|
1123
868
|
*/
|
|
1124
869
|
api_version: 'v1';
|
|
1125
870
|
/**
|
|
1126
|
-
*
|
|
871
|
+
* A payment represents a completed or attempted charge for a membership. Payments
|
|
872
|
+
* track the amount, status, currency, and payment method used.
|
|
1127
873
|
*/
|
|
1128
874
|
data: Shared.Payment;
|
|
1129
875
|
/**
|
|
@@ -1149,7 +895,8 @@ export interface PaymentPendingWebhookEvent {
|
|
|
1149
895
|
*/
|
|
1150
896
|
api_version: 'v1';
|
|
1151
897
|
/**
|
|
1152
|
-
*
|
|
898
|
+
* A payment represents a completed or attempted charge for a membership. Payments
|
|
899
|
+
* track the amount, status, currency, and payment method used.
|
|
1153
900
|
*/
|
|
1154
901
|
data: Shared.Payment;
|
|
1155
902
|
/**
|
|
@@ -1175,7 +922,8 @@ export interface DisputeCreatedWebhookEvent {
|
|
|
1175
922
|
*/
|
|
1176
923
|
api_version: 'v1';
|
|
1177
924
|
/**
|
|
1178
|
-
*
|
|
925
|
+
* A dispute is a chargeback or payment challenge filed against a company,
|
|
926
|
+
* including evidence and response status.
|
|
1179
927
|
*/
|
|
1180
928
|
data: DisputesAPI.Dispute;
|
|
1181
929
|
/**
|
|
@@ -1201,7 +949,8 @@ export interface DisputeUpdatedWebhookEvent {
|
|
|
1201
949
|
*/
|
|
1202
950
|
api_version: 'v1';
|
|
1203
951
|
/**
|
|
1204
|
-
*
|
|
952
|
+
* A dispute is a chargeback or payment challenge filed against a company,
|
|
953
|
+
* including evidence and response status.
|
|
1205
954
|
*/
|
|
1206
955
|
data: DisputesAPI.Dispute;
|
|
1207
956
|
/**
|
|
@@ -1227,7 +976,8 @@ export interface RefundCreatedWebhookEvent {
|
|
|
1227
976
|
*/
|
|
1228
977
|
api_version: 'v1';
|
|
1229
978
|
/**
|
|
1230
|
-
*
|
|
979
|
+
* A refund represents a full or partial reversal of a payment, including the
|
|
980
|
+
* amount, status, and payment provider.
|
|
1231
981
|
*/
|
|
1232
982
|
data: RefundCreatedWebhookEvent.Data;
|
|
1233
983
|
/**
|
|
@@ -1245,19 +995,21 @@ export interface RefundCreatedWebhookEvent {
|
|
|
1245
995
|
}
|
|
1246
996
|
export declare namespace RefundCreatedWebhookEvent {
|
|
1247
997
|
/**
|
|
1248
|
-
*
|
|
998
|
+
* A refund represents a full or partial reversal of a payment, including the
|
|
999
|
+
* amount, status, and payment provider.
|
|
1249
1000
|
*/
|
|
1250
1001
|
interface Data {
|
|
1251
1002
|
/**
|
|
1252
|
-
* The
|
|
1003
|
+
* The unique identifier for the refund.
|
|
1253
1004
|
*/
|
|
1254
1005
|
id: string;
|
|
1255
1006
|
/**
|
|
1256
|
-
* The amount of the refund.
|
|
1007
|
+
* The amount of the refund. Provided as a number in the specified currency. Eg:
|
|
1008
|
+
* 10.43 for $10.43 USD.
|
|
1257
1009
|
*/
|
|
1258
1010
|
amount: number;
|
|
1259
1011
|
/**
|
|
1260
|
-
* The
|
|
1012
|
+
* The datetime the refund was created.
|
|
1261
1013
|
*/
|
|
1262
1014
|
created_at: string;
|
|
1263
1015
|
/**
|
|
@@ -1299,7 +1051,7 @@ export declare namespace RefundCreatedWebhookEvent {
|
|
|
1299
1051
|
*/
|
|
1300
1052
|
interface Payment {
|
|
1301
1053
|
/**
|
|
1302
|
-
* The payment
|
|
1054
|
+
* The unique identifier for the payment.
|
|
1303
1055
|
*/
|
|
1304
1056
|
id: string;
|
|
1305
1057
|
/**
|
|
@@ -1315,7 +1067,7 @@ export declare namespace RefundCreatedWebhookEvent {
|
|
|
1315
1067
|
*/
|
|
1316
1068
|
card_last4: string | null;
|
|
1317
1069
|
/**
|
|
1318
|
-
* The datetime the payment was created
|
|
1070
|
+
* The datetime the payment was created.
|
|
1319
1071
|
*/
|
|
1320
1072
|
created_at: string;
|
|
1321
1073
|
/**
|
|
@@ -1365,7 +1117,7 @@ export declare namespace RefundCreatedWebhookEvent {
|
|
|
1365
1117
|
*/
|
|
1366
1118
|
interface Member {
|
|
1367
1119
|
/**
|
|
1368
|
-
* The
|
|
1120
|
+
* The unique identifier for the company member.
|
|
1369
1121
|
*/
|
|
1370
1122
|
id: string;
|
|
1371
1123
|
/**
|
|
@@ -1378,7 +1130,7 @@ export declare namespace RefundCreatedWebhookEvent {
|
|
|
1378
1130
|
*/
|
|
1379
1131
|
interface Membership {
|
|
1380
1132
|
/**
|
|
1381
|
-
* The
|
|
1133
|
+
* The unique identifier for the membership.
|
|
1382
1134
|
*/
|
|
1383
1135
|
id: string;
|
|
1384
1136
|
/**
|
|
@@ -1391,7 +1143,7 @@ export declare namespace RefundCreatedWebhookEvent {
|
|
|
1391
1143
|
*/
|
|
1392
1144
|
interface User {
|
|
1393
1145
|
/**
|
|
1394
|
-
* The
|
|
1146
|
+
* The unique identifier for the user.
|
|
1395
1147
|
*/
|
|
1396
1148
|
id: string;
|
|
1397
1149
|
/**
|
|
@@ -1420,7 +1172,8 @@ export interface RefundUpdatedWebhookEvent {
|
|
|
1420
1172
|
*/
|
|
1421
1173
|
api_version: 'v1';
|
|
1422
1174
|
/**
|
|
1423
|
-
*
|
|
1175
|
+
* A refund represents a full or partial reversal of a payment, including the
|
|
1176
|
+
* amount, status, and payment provider.
|
|
1424
1177
|
*/
|
|
1425
1178
|
data: RefundUpdatedWebhookEvent.Data;
|
|
1426
1179
|
/**
|
|
@@ -1438,19 +1191,21 @@ export interface RefundUpdatedWebhookEvent {
|
|
|
1438
1191
|
}
|
|
1439
1192
|
export declare namespace RefundUpdatedWebhookEvent {
|
|
1440
1193
|
/**
|
|
1441
|
-
*
|
|
1194
|
+
* A refund represents a full or partial reversal of a payment, including the
|
|
1195
|
+
* amount, status, and payment provider.
|
|
1442
1196
|
*/
|
|
1443
1197
|
interface Data {
|
|
1444
1198
|
/**
|
|
1445
|
-
* The
|
|
1199
|
+
* The unique identifier for the refund.
|
|
1446
1200
|
*/
|
|
1447
1201
|
id: string;
|
|
1448
1202
|
/**
|
|
1449
|
-
* The amount of the refund.
|
|
1203
|
+
* The amount of the refund. Provided as a number in the specified currency. Eg:
|
|
1204
|
+
* 10.43 for $10.43 USD.
|
|
1450
1205
|
*/
|
|
1451
1206
|
amount: number;
|
|
1452
1207
|
/**
|
|
1453
|
-
* The
|
|
1208
|
+
* The datetime the refund was created.
|
|
1454
1209
|
*/
|
|
1455
1210
|
created_at: string;
|
|
1456
1211
|
/**
|
|
@@ -1492,7 +1247,7 @@ export declare namespace RefundUpdatedWebhookEvent {
|
|
|
1492
1247
|
*/
|
|
1493
1248
|
interface Payment {
|
|
1494
1249
|
/**
|
|
1495
|
-
* The payment
|
|
1250
|
+
* The unique identifier for the payment.
|
|
1496
1251
|
*/
|
|
1497
1252
|
id: string;
|
|
1498
1253
|
/**
|
|
@@ -1508,7 +1263,7 @@ export declare namespace RefundUpdatedWebhookEvent {
|
|
|
1508
1263
|
*/
|
|
1509
1264
|
card_last4: string | null;
|
|
1510
1265
|
/**
|
|
1511
|
-
* The datetime the payment was created
|
|
1266
|
+
* The datetime the payment was created.
|
|
1512
1267
|
*/
|
|
1513
1268
|
created_at: string;
|
|
1514
1269
|
/**
|
|
@@ -1558,7 +1313,7 @@ export declare namespace RefundUpdatedWebhookEvent {
|
|
|
1558
1313
|
*/
|
|
1559
1314
|
interface Member {
|
|
1560
1315
|
/**
|
|
1561
|
-
* The
|
|
1316
|
+
* The unique identifier for the company member.
|
|
1562
1317
|
*/
|
|
1563
1318
|
id: string;
|
|
1564
1319
|
/**
|
|
@@ -1571,7 +1326,7 @@ export declare namespace RefundUpdatedWebhookEvent {
|
|
|
1571
1326
|
*/
|
|
1572
1327
|
interface Membership {
|
|
1573
1328
|
/**
|
|
1574
|
-
* The
|
|
1329
|
+
* The unique identifier for the membership.
|
|
1575
1330
|
*/
|
|
1576
1331
|
id: string;
|
|
1577
1332
|
/**
|
|
@@ -1584,7 +1339,7 @@ export declare namespace RefundUpdatedWebhookEvent {
|
|
|
1584
1339
|
*/
|
|
1585
1340
|
interface User {
|
|
1586
1341
|
/**
|
|
1587
|
-
* The
|
|
1342
|
+
* The unique identifier for the user.
|
|
1588
1343
|
*/
|
|
1589
1344
|
id: string;
|
|
1590
1345
|
/**
|
|
@@ -1613,8 +1368,8 @@ export interface MembershipCancelAtPeriodEndChangedWebhookEvent {
|
|
|
1613
1368
|
*/
|
|
1614
1369
|
api_version: 'v1';
|
|
1615
1370
|
/**
|
|
1616
|
-
* A membership represents
|
|
1617
|
-
*
|
|
1371
|
+
* A membership represents an active relationship between a user and a product. It
|
|
1372
|
+
* tracks the user's access, billing status, and renewal schedule.
|
|
1618
1373
|
*/
|
|
1619
1374
|
data: Shared.Membership;
|
|
1620
1375
|
/**
|
|
@@ -1639,7 +1394,7 @@ export interface WebhookCreateParams {
|
|
|
1639
1394
|
/**
|
|
1640
1395
|
* The different API versions
|
|
1641
1396
|
*/
|
|
1642
|
-
api_version?:
|
|
1397
|
+
api_version?: APIVersion | null;
|
|
1643
1398
|
/**
|
|
1644
1399
|
* Whether or not to send events for child resources. For example, if the webhook
|
|
1645
1400
|
* is created for a Company, enabling this will only send events from the Company's
|
|
@@ -1653,7 +1408,7 @@ export interface WebhookCreateParams {
|
|
|
1653
1408
|
/**
|
|
1654
1409
|
* The events to send the webhook for.
|
|
1655
1410
|
*/
|
|
1656
|
-
events?: Array<
|
|
1411
|
+
events?: Array<WebhookEvent> | null;
|
|
1657
1412
|
/**
|
|
1658
1413
|
* The resource to create the webhook for. By default this will use current company
|
|
1659
1414
|
*/
|
|
@@ -1663,7 +1418,7 @@ export interface WebhookUpdateParams {
|
|
|
1663
1418
|
/**
|
|
1664
1419
|
* The different API versions
|
|
1665
1420
|
*/
|
|
1666
|
-
api_version?:
|
|
1421
|
+
api_version?: APIVersion | null;
|
|
1667
1422
|
/**
|
|
1668
1423
|
* Whether or not to send events for child resources.
|
|
1669
1424
|
*/
|
|
@@ -1675,7 +1430,7 @@ export interface WebhookUpdateParams {
|
|
|
1675
1430
|
/**
|
|
1676
1431
|
* The events to send the webhook for.
|
|
1677
1432
|
*/
|
|
1678
|
-
events?: Array<
|
|
1433
|
+
events?: Array<WebhookEvent> | null;
|
|
1679
1434
|
/**
|
|
1680
1435
|
* The URL to send the webhook to.
|
|
1681
1436
|
*/
|
|
@@ -1700,6 +1455,6 @@ export interface WebhookListParams extends CursorPageParams {
|
|
|
1700
1455
|
last?: number | null;
|
|
1701
1456
|
}
|
|
1702
1457
|
export declare namespace Webhooks {
|
|
1703
|
-
export { type
|
|
1458
|
+
export { type APIVersion as APIVersion, type Webhook as Webhook, type WebhookEvent as WebhookEvent, type WebhookCreateResponse as WebhookCreateResponse, type WebhookListResponse as WebhookListResponse, type WebhookDeleteResponse as WebhookDeleteResponse, type InvoiceCreatedWebhookEvent as InvoiceCreatedWebhookEvent, type InvoicePaidWebhookEvent as InvoicePaidWebhookEvent, type InvoicePastDueWebhookEvent as InvoicePastDueWebhookEvent, type InvoiceVoidedWebhookEvent as InvoiceVoidedWebhookEvent, type MembershipActivatedWebhookEvent as MembershipActivatedWebhookEvent, type MembershipDeactivatedWebhookEvent as MembershipDeactivatedWebhookEvent, type EntryCreatedWebhookEvent as EntryCreatedWebhookEvent, type EntryApprovedWebhookEvent as EntryApprovedWebhookEvent, type EntryDeniedWebhookEvent as EntryDeniedWebhookEvent, type EntryDeletedWebhookEvent as EntryDeletedWebhookEvent, type SetupIntentRequiresActionWebhookEvent as SetupIntentRequiresActionWebhookEvent, type SetupIntentSucceededWebhookEvent as SetupIntentSucceededWebhookEvent, type SetupIntentCanceledWebhookEvent as SetupIntentCanceledWebhookEvent, type WithdrawalCreatedWebhookEvent as WithdrawalCreatedWebhookEvent, type WithdrawalUpdatedWebhookEvent as WithdrawalUpdatedWebhookEvent, type CourseLessonInteractionCompletedWebhookEvent as CourseLessonInteractionCompletedWebhookEvent, type PayoutMethodCreatedWebhookEvent as PayoutMethodCreatedWebhookEvent, type VerificationSucceededWebhookEvent as VerificationSucceededWebhookEvent, type PaymentCreatedWebhookEvent as PaymentCreatedWebhookEvent, type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent, type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent, type PaymentPendingWebhookEvent as PaymentPendingWebhookEvent, type DisputeCreatedWebhookEvent as DisputeCreatedWebhookEvent, type DisputeUpdatedWebhookEvent as DisputeUpdatedWebhookEvent, type RefundCreatedWebhookEvent as RefundCreatedWebhookEvent, type RefundUpdatedWebhookEvent as RefundUpdatedWebhookEvent, type MembershipCancelAtPeriodEndChangedWebhookEvent as MembershipCancelAtPeriodEndChangedWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, type WebhookListResponsesCursorPage as WebhookListResponsesCursorPage, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, };
|
|
1704
1459
|
}
|
|
1705
1460
|
//# sourceMappingURL=webhooks.d.mts.map
|