@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
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import * as DisputesAPI from './disputes';
|
|
5
5
|
import * as PaymentsAPI from './payments';
|
|
6
|
+
import * as PayoutMethodsAPI from './payout-methods';
|
|
6
7
|
import * as RefundsAPI from './refunds';
|
|
7
8
|
import * as SetupIntentsAPI from './setup-intents';
|
|
8
9
|
import * as Shared from './shared';
|
|
10
|
+
import * as VerificationsAPI from './verifications';
|
|
9
11
|
import * as WithdrawalsAPI from './withdrawals';
|
|
10
|
-
import { Webhook } from 'standardwebhooks';
|
|
12
|
+
import { Webhook as Webhook_ } from 'standardwebhooks';
|
|
11
13
|
import { APIPromise } from '../core/api-promise';
|
|
12
14
|
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
13
15
|
import { RequestOptions } from '../internal/request-options';
|
|
@@ -46,7 +48,7 @@ export class Webhooks extends APIResource {
|
|
|
46
48
|
* );
|
|
47
49
|
* ```
|
|
48
50
|
*/
|
|
49
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<
|
|
51
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<Webhook> {
|
|
50
52
|
return this._client.get(path`/webhooks/${id}`, options);
|
|
51
53
|
}
|
|
52
54
|
|
|
@@ -68,7 +70,7 @@ export class Webhooks extends APIResource {
|
|
|
68
70
|
id: string,
|
|
69
71
|
body: WebhookUpdateParams | null | undefined = {},
|
|
70
72
|
options?: RequestOptions,
|
|
71
|
-
): APIPromise<
|
|
73
|
+
): APIPromise<Webhook> {
|
|
72
74
|
return this._client.patch(path`/webhooks/${id}`, { body, ...options });
|
|
73
75
|
}
|
|
74
76
|
|
|
@@ -121,7 +123,7 @@ export class Webhooks extends APIResource {
|
|
|
121
123
|
if (headers !== undefined) {
|
|
122
124
|
const keyStr: string | null = key === undefined ? this._client.webhookKey : key;
|
|
123
125
|
if (keyStr === null) throw new Error('Webhook key must not be null in order to unwrap');
|
|
124
|
-
const wh = new
|
|
126
|
+
const wh = new Webhook_(keyStr);
|
|
125
127
|
wh.verify(body, headers);
|
|
126
128
|
}
|
|
127
129
|
return JSON.parse(body) as UnwrapWebhookEvent;
|
|
@@ -131,131 +133,24 @@ export class Webhooks extends APIResource {
|
|
|
131
133
|
export type WebhookListResponsesCursorPage = CursorPage<WebhookListResponse>;
|
|
132
134
|
|
|
133
135
|
/**
|
|
134
|
-
*
|
|
136
|
+
* The different API versions
|
|
135
137
|
*/
|
|
136
|
-
export
|
|
137
|
-
/**
|
|
138
|
-
* The ID of the webhook
|
|
139
|
-
*/
|
|
140
|
-
id: string;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* The API version for this webhook
|
|
144
|
-
*/
|
|
145
|
-
api_version: 'v1' | 'v2' | 'v5';
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Whether or not to send events for child resources. For example, if the webhook
|
|
149
|
-
* is created for a Company, enabling this will only send events from the Company's
|
|
150
|
-
* sub-merchants (child companies).
|
|
151
|
-
*/
|
|
152
|
-
child_resource_events: boolean;
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* The timestamp of when the webhook was created
|
|
156
|
-
*/
|
|
157
|
-
created_at: string;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Whether or not this webhook is turned on or not
|
|
161
|
-
*/
|
|
162
|
-
enabled: boolean;
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* The number of events this webhooks is configured to receive
|
|
166
|
-
*/
|
|
167
|
-
events: Array<
|
|
168
|
-
| 'invoice.created'
|
|
169
|
-
| 'invoice.paid'
|
|
170
|
-
| 'invoice.past_due'
|
|
171
|
-
| 'invoice.voided'
|
|
172
|
-
| 'membership.activated'
|
|
173
|
-
| 'membership.deactivated'
|
|
174
|
-
| 'entry.created'
|
|
175
|
-
| 'entry.approved'
|
|
176
|
-
| 'entry.denied'
|
|
177
|
-
| 'entry.deleted'
|
|
178
|
-
| 'setup_intent.requires_action'
|
|
179
|
-
| 'setup_intent.succeeded'
|
|
180
|
-
| 'setup_intent.canceled'
|
|
181
|
-
| 'withdrawal.created'
|
|
182
|
-
| 'withdrawal.updated'
|
|
183
|
-
| 'course_lesson_interaction.completed'
|
|
184
|
-
| 'payout_method.created'
|
|
185
|
-
| 'verification.succeeded'
|
|
186
|
-
| 'payment.created'
|
|
187
|
-
| 'payment.succeeded'
|
|
188
|
-
| 'payment.failed'
|
|
189
|
-
| 'payment.pending'
|
|
190
|
-
| 'dispute.created'
|
|
191
|
-
| 'dispute.updated'
|
|
192
|
-
| 'refund.created'
|
|
193
|
-
| 'refund.updated'
|
|
194
|
-
| 'membership.cancel_at_period_end_changed'
|
|
195
|
-
>;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* The resource ID
|
|
199
|
-
*/
|
|
200
|
-
resource_id: string;
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* The list of events that can be tested with this webhook
|
|
204
|
-
*/
|
|
205
|
-
testable_events: Array<
|
|
206
|
-
| 'invoice.created'
|
|
207
|
-
| 'invoice.paid'
|
|
208
|
-
| 'invoice.past_due'
|
|
209
|
-
| 'invoice.voided'
|
|
210
|
-
| 'membership.activated'
|
|
211
|
-
| 'membership.deactivated'
|
|
212
|
-
| 'entry.created'
|
|
213
|
-
| 'entry.approved'
|
|
214
|
-
| 'entry.denied'
|
|
215
|
-
| 'entry.deleted'
|
|
216
|
-
| 'setup_intent.requires_action'
|
|
217
|
-
| 'setup_intent.succeeded'
|
|
218
|
-
| 'setup_intent.canceled'
|
|
219
|
-
| 'withdrawal.created'
|
|
220
|
-
| 'withdrawal.updated'
|
|
221
|
-
| 'course_lesson_interaction.completed'
|
|
222
|
-
| 'payout_method.created'
|
|
223
|
-
| 'verification.succeeded'
|
|
224
|
-
| 'payment.created'
|
|
225
|
-
| 'payment.succeeded'
|
|
226
|
-
| 'payment.failed'
|
|
227
|
-
| 'payment.pending'
|
|
228
|
-
| 'dispute.created'
|
|
229
|
-
| 'dispute.updated'
|
|
230
|
-
| 'refund.created'
|
|
231
|
-
| 'refund.updated'
|
|
232
|
-
| 'membership.cancel_at_period_end_changed'
|
|
233
|
-
>;
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* The URL the webhook events will be sent to
|
|
237
|
-
*/
|
|
238
|
-
url: string;
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* A unique secret key that will be sent with each webhook event
|
|
242
|
-
*/
|
|
243
|
-
webhook_secret: string;
|
|
244
|
-
}
|
|
138
|
+
export type APIVersion = 'v1' | 'v2' | 'v5';
|
|
245
139
|
|
|
246
140
|
/**
|
|
247
|
-
* A webhook
|
|
141
|
+
* A webhook endpoint that receives event notifications for a company via HTTP
|
|
142
|
+
* POST.
|
|
248
143
|
*/
|
|
249
|
-
export interface
|
|
144
|
+
export interface Webhook {
|
|
250
145
|
/**
|
|
251
|
-
* The
|
|
146
|
+
* The unique identifier for the webhook.
|
|
252
147
|
*/
|
|
253
148
|
id: string;
|
|
254
149
|
|
|
255
150
|
/**
|
|
256
151
|
* The API version for this webhook
|
|
257
152
|
*/
|
|
258
|
-
api_version:
|
|
153
|
+
api_version: APIVersion;
|
|
259
154
|
|
|
260
155
|
/**
|
|
261
156
|
* Whether or not to send events for child resources. For example, if the webhook
|
|
@@ -265,7 +160,7 @@ export interface WebhookRetrieveResponse {
|
|
|
265
160
|
child_resource_events: boolean;
|
|
266
161
|
|
|
267
162
|
/**
|
|
268
|
-
* The
|
|
163
|
+
* The datetime the webhook was created.
|
|
269
164
|
*/
|
|
270
165
|
created_at: string;
|
|
271
166
|
|
|
@@ -277,35 +172,7 @@ export interface WebhookRetrieveResponse {
|
|
|
277
172
|
/**
|
|
278
173
|
* The number of events this webhooks is configured to receive
|
|
279
174
|
*/
|
|
280
|
-
events: Array<
|
|
281
|
-
| 'invoice.created'
|
|
282
|
-
| 'invoice.paid'
|
|
283
|
-
| 'invoice.past_due'
|
|
284
|
-
| 'invoice.voided'
|
|
285
|
-
| 'membership.activated'
|
|
286
|
-
| 'membership.deactivated'
|
|
287
|
-
| 'entry.created'
|
|
288
|
-
| 'entry.approved'
|
|
289
|
-
| 'entry.denied'
|
|
290
|
-
| 'entry.deleted'
|
|
291
|
-
| 'setup_intent.requires_action'
|
|
292
|
-
| 'setup_intent.succeeded'
|
|
293
|
-
| 'setup_intent.canceled'
|
|
294
|
-
| 'withdrawal.created'
|
|
295
|
-
| 'withdrawal.updated'
|
|
296
|
-
| 'course_lesson_interaction.completed'
|
|
297
|
-
| 'payout_method.created'
|
|
298
|
-
| 'verification.succeeded'
|
|
299
|
-
| 'payment.created'
|
|
300
|
-
| 'payment.succeeded'
|
|
301
|
-
| 'payment.failed'
|
|
302
|
-
| 'payment.pending'
|
|
303
|
-
| 'dispute.created'
|
|
304
|
-
| 'dispute.updated'
|
|
305
|
-
| 'refund.created'
|
|
306
|
-
| 'refund.updated'
|
|
307
|
-
| 'membership.cancel_at_period_end_changed'
|
|
308
|
-
>;
|
|
175
|
+
events: Array<WebhookEvent>;
|
|
309
176
|
|
|
310
177
|
/**
|
|
311
178
|
* The resource ID
|
|
@@ -315,35 +182,7 @@ export interface WebhookRetrieveResponse {
|
|
|
315
182
|
/**
|
|
316
183
|
* The list of events that can be tested with this webhook
|
|
317
184
|
*/
|
|
318
|
-
testable_events: Array<
|
|
319
|
-
| 'invoice.created'
|
|
320
|
-
| 'invoice.paid'
|
|
321
|
-
| 'invoice.past_due'
|
|
322
|
-
| 'invoice.voided'
|
|
323
|
-
| 'membership.activated'
|
|
324
|
-
| 'membership.deactivated'
|
|
325
|
-
| 'entry.created'
|
|
326
|
-
| 'entry.approved'
|
|
327
|
-
| 'entry.denied'
|
|
328
|
-
| 'entry.deleted'
|
|
329
|
-
| 'setup_intent.requires_action'
|
|
330
|
-
| 'setup_intent.succeeded'
|
|
331
|
-
| 'setup_intent.canceled'
|
|
332
|
-
| 'withdrawal.created'
|
|
333
|
-
| 'withdrawal.updated'
|
|
334
|
-
| 'course_lesson_interaction.completed'
|
|
335
|
-
| 'payout_method.created'
|
|
336
|
-
| 'verification.succeeded'
|
|
337
|
-
| 'payment.created'
|
|
338
|
-
| 'payment.succeeded'
|
|
339
|
-
| 'payment.failed'
|
|
340
|
-
| 'payment.pending'
|
|
341
|
-
| 'dispute.created'
|
|
342
|
-
| 'dispute.updated'
|
|
343
|
-
| 'refund.created'
|
|
344
|
-
| 'refund.updated'
|
|
345
|
-
| 'membership.cancel_at_period_end_changed'
|
|
346
|
-
>;
|
|
185
|
+
testable_events: Array<WebhookEvent>;
|
|
347
186
|
|
|
348
187
|
/**
|
|
349
188
|
* The URL the webhook events will be sent to
|
|
@@ -352,18 +191,51 @@ export interface WebhookRetrieveResponse {
|
|
|
352
191
|
}
|
|
353
192
|
|
|
354
193
|
/**
|
|
355
|
-
*
|
|
194
|
+
* The different event types available
|
|
195
|
+
*/
|
|
196
|
+
export type WebhookEvent =
|
|
197
|
+
| 'invoice.created'
|
|
198
|
+
| 'invoice.paid'
|
|
199
|
+
| 'invoice.past_due'
|
|
200
|
+
| 'invoice.voided'
|
|
201
|
+
| 'membership.activated'
|
|
202
|
+
| 'membership.deactivated'
|
|
203
|
+
| 'entry.created'
|
|
204
|
+
| 'entry.approved'
|
|
205
|
+
| 'entry.denied'
|
|
206
|
+
| 'entry.deleted'
|
|
207
|
+
| 'setup_intent.requires_action'
|
|
208
|
+
| 'setup_intent.succeeded'
|
|
209
|
+
| 'setup_intent.canceled'
|
|
210
|
+
| 'withdrawal.created'
|
|
211
|
+
| 'withdrawal.updated'
|
|
212
|
+
| 'course_lesson_interaction.completed'
|
|
213
|
+
| 'payout_method.created'
|
|
214
|
+
| 'verification.succeeded'
|
|
215
|
+
| 'payment.created'
|
|
216
|
+
| 'payment.succeeded'
|
|
217
|
+
| 'payment.failed'
|
|
218
|
+
| 'payment.pending'
|
|
219
|
+
| 'dispute.created'
|
|
220
|
+
| 'dispute.updated'
|
|
221
|
+
| 'refund.created'
|
|
222
|
+
| 'refund.updated'
|
|
223
|
+
| 'membership.cancel_at_period_end_changed';
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* A webhook endpoint that receives event notifications for a company via HTTP
|
|
227
|
+
* POST.
|
|
356
228
|
*/
|
|
357
|
-
export interface
|
|
229
|
+
export interface WebhookCreateResponse {
|
|
358
230
|
/**
|
|
359
|
-
* The
|
|
231
|
+
* The unique identifier for the webhook.
|
|
360
232
|
*/
|
|
361
233
|
id: string;
|
|
362
234
|
|
|
363
235
|
/**
|
|
364
236
|
* The API version for this webhook
|
|
365
237
|
*/
|
|
366
|
-
api_version:
|
|
238
|
+
api_version: APIVersion;
|
|
367
239
|
|
|
368
240
|
/**
|
|
369
241
|
* Whether or not to send events for child resources. For example, if the webhook
|
|
@@ -373,7 +245,7 @@ export interface WebhookUpdateResponse {
|
|
|
373
245
|
child_resource_events: boolean;
|
|
374
246
|
|
|
375
247
|
/**
|
|
376
|
-
* The
|
|
248
|
+
* The datetime the webhook was created.
|
|
377
249
|
*/
|
|
378
250
|
created_at: string;
|
|
379
251
|
|
|
@@ -385,35 +257,7 @@ export interface WebhookUpdateResponse {
|
|
|
385
257
|
/**
|
|
386
258
|
* The number of events this webhooks is configured to receive
|
|
387
259
|
*/
|
|
388
|
-
events: Array<
|
|
389
|
-
| 'invoice.created'
|
|
390
|
-
| 'invoice.paid'
|
|
391
|
-
| 'invoice.past_due'
|
|
392
|
-
| 'invoice.voided'
|
|
393
|
-
| 'membership.activated'
|
|
394
|
-
| 'membership.deactivated'
|
|
395
|
-
| 'entry.created'
|
|
396
|
-
| 'entry.approved'
|
|
397
|
-
| 'entry.denied'
|
|
398
|
-
| 'entry.deleted'
|
|
399
|
-
| 'setup_intent.requires_action'
|
|
400
|
-
| 'setup_intent.succeeded'
|
|
401
|
-
| 'setup_intent.canceled'
|
|
402
|
-
| 'withdrawal.created'
|
|
403
|
-
| 'withdrawal.updated'
|
|
404
|
-
| 'course_lesson_interaction.completed'
|
|
405
|
-
| 'payout_method.created'
|
|
406
|
-
| 'verification.succeeded'
|
|
407
|
-
| 'payment.created'
|
|
408
|
-
| 'payment.succeeded'
|
|
409
|
-
| 'payment.failed'
|
|
410
|
-
| 'payment.pending'
|
|
411
|
-
| 'dispute.created'
|
|
412
|
-
| 'dispute.updated'
|
|
413
|
-
| 'refund.created'
|
|
414
|
-
| 'refund.updated'
|
|
415
|
-
| 'membership.cancel_at_period_end_changed'
|
|
416
|
-
>;
|
|
260
|
+
events: Array<WebhookEvent>;
|
|
417
261
|
|
|
418
262
|
/**
|
|
419
263
|
* The resource ID
|
|
@@ -423,55 +267,33 @@ export interface WebhookUpdateResponse {
|
|
|
423
267
|
/**
|
|
424
268
|
* The list of events that can be tested with this webhook
|
|
425
269
|
*/
|
|
426
|
-
testable_events: Array<
|
|
427
|
-
| 'invoice.created'
|
|
428
|
-
| 'invoice.paid'
|
|
429
|
-
| 'invoice.past_due'
|
|
430
|
-
| 'invoice.voided'
|
|
431
|
-
| 'membership.activated'
|
|
432
|
-
| 'membership.deactivated'
|
|
433
|
-
| 'entry.created'
|
|
434
|
-
| 'entry.approved'
|
|
435
|
-
| 'entry.denied'
|
|
436
|
-
| 'entry.deleted'
|
|
437
|
-
| 'setup_intent.requires_action'
|
|
438
|
-
| 'setup_intent.succeeded'
|
|
439
|
-
| 'setup_intent.canceled'
|
|
440
|
-
| 'withdrawal.created'
|
|
441
|
-
| 'withdrawal.updated'
|
|
442
|
-
| 'course_lesson_interaction.completed'
|
|
443
|
-
| 'payout_method.created'
|
|
444
|
-
| 'verification.succeeded'
|
|
445
|
-
| 'payment.created'
|
|
446
|
-
| 'payment.succeeded'
|
|
447
|
-
| 'payment.failed'
|
|
448
|
-
| 'payment.pending'
|
|
449
|
-
| 'dispute.created'
|
|
450
|
-
| 'dispute.updated'
|
|
451
|
-
| 'refund.created'
|
|
452
|
-
| 'refund.updated'
|
|
453
|
-
| 'membership.cancel_at_period_end_changed'
|
|
454
|
-
>;
|
|
270
|
+
testable_events: Array<WebhookEvent>;
|
|
455
271
|
|
|
456
272
|
/**
|
|
457
273
|
* The URL the webhook events will be sent to
|
|
458
274
|
*/
|
|
459
275
|
url: string;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* A unique secret key that will be sent with each webhook event
|
|
279
|
+
*/
|
|
280
|
+
webhook_secret: string;
|
|
460
281
|
}
|
|
461
282
|
|
|
462
283
|
/**
|
|
463
|
-
* A webhook
|
|
284
|
+
* A webhook endpoint that receives event notifications for a company via HTTP
|
|
285
|
+
* POST.
|
|
464
286
|
*/
|
|
465
287
|
export interface WebhookListResponse {
|
|
466
288
|
/**
|
|
467
|
-
* The
|
|
289
|
+
* The unique identifier for the webhook.
|
|
468
290
|
*/
|
|
469
291
|
id: string;
|
|
470
292
|
|
|
471
293
|
/**
|
|
472
294
|
* The API version for this webhook
|
|
473
295
|
*/
|
|
474
|
-
api_version:
|
|
296
|
+
api_version: APIVersion;
|
|
475
297
|
|
|
476
298
|
/**
|
|
477
299
|
* Whether or not to send events for child resources. For example, if the webhook
|
|
@@ -481,7 +303,7 @@ export interface WebhookListResponse {
|
|
|
481
303
|
child_resource_events: boolean;
|
|
482
304
|
|
|
483
305
|
/**
|
|
484
|
-
* The
|
|
306
|
+
* The datetime the webhook was created.
|
|
485
307
|
*/
|
|
486
308
|
created_at: string;
|
|
487
309
|
|
|
@@ -493,35 +315,7 @@ export interface WebhookListResponse {
|
|
|
493
315
|
/**
|
|
494
316
|
* The number of events this webhooks is configured to receive
|
|
495
317
|
*/
|
|
496
|
-
events: Array<
|
|
497
|
-
| 'invoice.created'
|
|
498
|
-
| 'invoice.paid'
|
|
499
|
-
| 'invoice.past_due'
|
|
500
|
-
| 'invoice.voided'
|
|
501
|
-
| 'membership.activated'
|
|
502
|
-
| 'membership.deactivated'
|
|
503
|
-
| 'entry.created'
|
|
504
|
-
| 'entry.approved'
|
|
505
|
-
| 'entry.denied'
|
|
506
|
-
| 'entry.deleted'
|
|
507
|
-
| 'setup_intent.requires_action'
|
|
508
|
-
| 'setup_intent.succeeded'
|
|
509
|
-
| 'setup_intent.canceled'
|
|
510
|
-
| 'withdrawal.created'
|
|
511
|
-
| 'withdrawal.updated'
|
|
512
|
-
| 'course_lesson_interaction.completed'
|
|
513
|
-
| 'payout_method.created'
|
|
514
|
-
| 'verification.succeeded'
|
|
515
|
-
| 'payment.created'
|
|
516
|
-
| 'payment.succeeded'
|
|
517
|
-
| 'payment.failed'
|
|
518
|
-
| 'payment.pending'
|
|
519
|
-
| 'dispute.created'
|
|
520
|
-
| 'dispute.updated'
|
|
521
|
-
| 'refund.created'
|
|
522
|
-
| 'refund.updated'
|
|
523
|
-
| 'membership.cancel_at_period_end_changed'
|
|
524
|
-
>;
|
|
318
|
+
events: Array<WebhookEvent>;
|
|
525
319
|
|
|
526
320
|
/**
|
|
527
321
|
* The URL the webhook events will be sent to
|
|
@@ -674,8 +468,8 @@ export interface MembershipActivatedWebhookEvent {
|
|
|
674
468
|
api_version: 'v1';
|
|
675
469
|
|
|
676
470
|
/**
|
|
677
|
-
* A membership represents
|
|
678
|
-
*
|
|
471
|
+
* A membership represents an active relationship between a user and a product. It
|
|
472
|
+
* tracks the user's access, billing status, and renewal schedule.
|
|
679
473
|
*/
|
|
680
474
|
data: Shared.Membership;
|
|
681
475
|
|
|
@@ -707,8 +501,8 @@ export interface MembershipDeactivatedWebhookEvent {
|
|
|
707
501
|
api_version: 'v1';
|
|
708
502
|
|
|
709
503
|
/**
|
|
710
|
-
* A membership represents
|
|
711
|
-
*
|
|
504
|
+
* A membership represents an active relationship between a user and a product. It
|
|
505
|
+
* tracks the user's access, billing status, and renewal schedule.
|
|
712
506
|
*/
|
|
713
507
|
data: Shared.Membership;
|
|
714
508
|
|
|
@@ -740,7 +534,7 @@ export interface EntryCreatedWebhookEvent {
|
|
|
740
534
|
api_version: 'v1';
|
|
741
535
|
|
|
742
536
|
/**
|
|
743
|
-
* An
|
|
537
|
+
* An entry represents a user's signup for a waitlisted plan.
|
|
744
538
|
*/
|
|
745
539
|
data: Shared.Entry;
|
|
746
540
|
|
|
@@ -772,7 +566,7 @@ export interface EntryApprovedWebhookEvent {
|
|
|
772
566
|
api_version: 'v1';
|
|
773
567
|
|
|
774
568
|
/**
|
|
775
|
-
* An
|
|
569
|
+
* An entry represents a user's signup for a waitlisted plan.
|
|
776
570
|
*/
|
|
777
571
|
data: Shared.Entry;
|
|
778
572
|
|
|
@@ -804,7 +598,7 @@ export interface EntryDeniedWebhookEvent {
|
|
|
804
598
|
api_version: 'v1';
|
|
805
599
|
|
|
806
600
|
/**
|
|
807
|
-
* An
|
|
601
|
+
* An entry represents a user's signup for a waitlisted plan.
|
|
808
602
|
*/
|
|
809
603
|
data: Shared.Entry;
|
|
810
604
|
|
|
@@ -836,7 +630,7 @@ export interface EntryDeletedWebhookEvent {
|
|
|
836
630
|
api_version: 'v1';
|
|
837
631
|
|
|
838
632
|
/**
|
|
839
|
-
* An
|
|
633
|
+
* An entry represents a user's signup for a waitlisted plan.
|
|
840
634
|
*/
|
|
841
635
|
data: Shared.Entry;
|
|
842
636
|
|
|
@@ -868,8 +662,7 @@ export interface SetupIntentRequiresActionWebhookEvent {
|
|
|
868
662
|
api_version: 'v1';
|
|
869
663
|
|
|
870
664
|
/**
|
|
871
|
-
*
|
|
872
|
-
* to add a payment method to their account without making a purchase.
|
|
665
|
+
* A setup intent allows a user to save a payment method without making a purchase.
|
|
873
666
|
*/
|
|
874
667
|
data: SetupIntentsAPI.SetupIntent;
|
|
875
668
|
|
|
@@ -901,8 +694,7 @@ export interface SetupIntentSucceededWebhookEvent {
|
|
|
901
694
|
api_version: 'v1';
|
|
902
695
|
|
|
903
696
|
/**
|
|
904
|
-
*
|
|
905
|
-
* to add a payment method to their account without making a purchase.
|
|
697
|
+
* A setup intent allows a user to save a payment method without making a purchase.
|
|
906
698
|
*/
|
|
907
699
|
data: SetupIntentsAPI.SetupIntent;
|
|
908
700
|
|
|
@@ -934,8 +726,7 @@ export interface SetupIntentCanceledWebhookEvent {
|
|
|
934
726
|
api_version: 'v1';
|
|
935
727
|
|
|
936
728
|
/**
|
|
937
|
-
*
|
|
938
|
-
* to add a payment method to their account without making a purchase.
|
|
729
|
+
* A setup intent allows a user to save a payment method without making a purchase.
|
|
939
730
|
*/
|
|
940
731
|
data: SetupIntentsAPI.SetupIntent;
|
|
941
732
|
|
|
@@ -967,9 +758,10 @@ export interface WithdrawalCreatedWebhookEvent {
|
|
|
967
758
|
api_version: 'v1';
|
|
968
759
|
|
|
969
760
|
/**
|
|
970
|
-
* A withdrawal request
|
|
761
|
+
* A withdrawal represents a request to transfer funds from a company's ledger
|
|
762
|
+
* account to an external payout method.
|
|
971
763
|
*/
|
|
972
|
-
data:
|
|
764
|
+
data: WithdrawalsAPI.Withdrawal;
|
|
973
765
|
|
|
974
766
|
/**
|
|
975
767
|
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
@@ -987,188 +779,6 @@ export interface WithdrawalCreatedWebhookEvent {
|
|
|
987
779
|
company_id?: string | null;
|
|
988
780
|
}
|
|
989
781
|
|
|
990
|
-
export namespace WithdrawalCreatedWebhookEvent {
|
|
991
|
-
/**
|
|
992
|
-
* A withdrawal request.
|
|
993
|
-
*/
|
|
994
|
-
export interface Data {
|
|
995
|
-
/**
|
|
996
|
-
* Internal ID of the withdrawal request.
|
|
997
|
-
*/
|
|
998
|
-
id: string;
|
|
999
|
-
|
|
1000
|
-
/**
|
|
1001
|
-
* How much money was attempted to be withdrawn, in a float type.
|
|
1002
|
-
*/
|
|
1003
|
-
amount: number;
|
|
1004
|
-
|
|
1005
|
-
/**
|
|
1006
|
-
* When the withdrawal request was created.
|
|
1007
|
-
*/
|
|
1008
|
-
created_at: string;
|
|
1009
|
-
|
|
1010
|
-
/**
|
|
1011
|
-
* The currency of the withdrawal request.
|
|
1012
|
-
*/
|
|
1013
|
-
currency: Shared.Currency;
|
|
1014
|
-
|
|
1015
|
-
/**
|
|
1016
|
-
* The different error codes a payout can be in.
|
|
1017
|
-
*/
|
|
1018
|
-
error_code:
|
|
1019
|
-
| 'account_closed'
|
|
1020
|
-
| 'account_does_not_exist'
|
|
1021
|
-
| 'account_information_invalid'
|
|
1022
|
-
| 'account_number_invalid_region'
|
|
1023
|
-
| 'account_frozen'
|
|
1024
|
-
| 'account_lookup_failed'
|
|
1025
|
-
| 'account_not_found'
|
|
1026
|
-
| 'amount_out_of_bounds'
|
|
1027
|
-
| 'attributes_not_validated'
|
|
1028
|
-
| 'b2b_payments_prohibited'
|
|
1029
|
-
| 'bank_statement_required'
|
|
1030
|
-
| 'compliance_review'
|
|
1031
|
-
| 'currency_not_supported'
|
|
1032
|
-
| 'deposit_canceled'
|
|
1033
|
-
| 'deposit_failed'
|
|
1034
|
-
| 'deposit_rejected'
|
|
1035
|
-
| 'destination_unavailable'
|
|
1036
|
-
| 'exceeded_account_limit'
|
|
1037
|
-
| 'expired_quote'
|
|
1038
|
-
| 'generic_payout_error'
|
|
1039
|
-
| 'technical_problem'
|
|
1040
|
-
| 'identification_number_invalid'
|
|
1041
|
-
| 'invalid_account_number'
|
|
1042
|
-
| 'invalid_bank_code'
|
|
1043
|
-
| 'invalid_beneficiary'
|
|
1044
|
-
| 'invalid_mailing_address'
|
|
1045
|
-
| 'invalid_branch_number'
|
|
1046
|
-
| 'invalid_branch_code'
|
|
1047
|
-
| 'invalid_phone_number'
|
|
1048
|
-
| 'invalid_routing_number'
|
|
1049
|
-
| 'invalid_swift_code'
|
|
1050
|
-
| 'invalid_company_details'
|
|
1051
|
-
| 'manual_cancelation'
|
|
1052
|
-
| 'misc_error'
|
|
1053
|
-
| 'missing_city_and_country'
|
|
1054
|
-
| 'missing_phone_number'
|
|
1055
|
-
| 'missing_remittance_info'
|
|
1056
|
-
| 'payee_name_invalid'
|
|
1057
|
-
| 'receiving_account_locked'
|
|
1058
|
-
| 'rejected_by_compliance'
|
|
1059
|
-
| 'rtp_not_supported'
|
|
1060
|
-
| 'non_transaction_account'
|
|
1061
|
-
| 'source_token_insufficient_funds'
|
|
1062
|
-
| 'ssn_invalid'
|
|
1063
|
-
| 'wallet_screenshot_required'
|
|
1064
|
-
| 'unsupported_region'
|
|
1065
|
-
| null;
|
|
1066
|
-
|
|
1067
|
-
/**
|
|
1068
|
-
* The error message for the withdrawal, if any.
|
|
1069
|
-
*/
|
|
1070
|
-
error_message: string | null;
|
|
1071
|
-
|
|
1072
|
-
/**
|
|
1073
|
-
* The estimated availability date for the withdrawal, if any.
|
|
1074
|
-
*/
|
|
1075
|
-
estimated_availability: string | null;
|
|
1076
|
-
|
|
1077
|
-
/**
|
|
1078
|
-
* The fee amount that was charged for the withdrawal. This is in the same currency
|
|
1079
|
-
* as the withdrawal amount.
|
|
1080
|
-
*/
|
|
1081
|
-
fee_amount: number;
|
|
1082
|
-
|
|
1083
|
-
/**
|
|
1084
|
-
* The different fee types for a withdrawal.
|
|
1085
|
-
*/
|
|
1086
|
-
fee_type: WithdrawalsAPI.WithdrawalFeeTypes | null;
|
|
1087
|
-
|
|
1088
|
-
/**
|
|
1089
|
-
* The ledger account associated with the withdrawal.
|
|
1090
|
-
*/
|
|
1091
|
-
ledger_account: Data.LedgerAccount;
|
|
1092
|
-
|
|
1093
|
-
/**
|
|
1094
|
-
* The markup fee that was charged for the withdrawal. This is in the same currency
|
|
1095
|
-
* as the withdrawal amount. This only applies to platform accounts using Whop
|
|
1096
|
-
* Rails.
|
|
1097
|
-
*/
|
|
1098
|
-
markup_fee: number;
|
|
1099
|
-
|
|
1100
|
-
/**
|
|
1101
|
-
* The payout token used for the withdrawal, if applicable.
|
|
1102
|
-
*/
|
|
1103
|
-
payout_token: Data.PayoutToken | null;
|
|
1104
|
-
|
|
1105
|
-
/**
|
|
1106
|
-
* The speed of the withdrawal.
|
|
1107
|
-
*/
|
|
1108
|
-
speed: WithdrawalsAPI.WithdrawalSpeeds;
|
|
1109
|
-
|
|
1110
|
-
/**
|
|
1111
|
-
* Status of the withdrawal.
|
|
1112
|
-
*/
|
|
1113
|
-
status: WithdrawalsAPI.WithdrawalStatus;
|
|
1114
|
-
|
|
1115
|
-
/**
|
|
1116
|
-
* The trace code for the payout, if applicable. Provided on ACH transactions when
|
|
1117
|
-
* available.
|
|
1118
|
-
*/
|
|
1119
|
-
trace_code: string | null;
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
export namespace Data {
|
|
1123
|
-
/**
|
|
1124
|
-
* The ledger account associated with the withdrawal.
|
|
1125
|
-
*/
|
|
1126
|
-
export interface LedgerAccount {
|
|
1127
|
-
/**
|
|
1128
|
-
* The ID of the LedgerAccount.
|
|
1129
|
-
*/
|
|
1130
|
-
id: string;
|
|
1131
|
-
|
|
1132
|
-
/**
|
|
1133
|
-
* The ID of the company associated with this ledger account.
|
|
1134
|
-
*/
|
|
1135
|
-
company_id: string | null;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
/**
|
|
1139
|
-
* The payout token used for the withdrawal, if applicable.
|
|
1140
|
-
*/
|
|
1141
|
-
export interface PayoutToken {
|
|
1142
|
-
/**
|
|
1143
|
-
* The ID of the payout token
|
|
1144
|
-
*/
|
|
1145
|
-
id: string;
|
|
1146
|
-
|
|
1147
|
-
/**
|
|
1148
|
-
* The date and time the payout token was created
|
|
1149
|
-
*/
|
|
1150
|
-
created_at: string;
|
|
1151
|
-
|
|
1152
|
-
/**
|
|
1153
|
-
* The currency code of the payout destination. This is the currency that payouts
|
|
1154
|
-
* will be made in for this token.
|
|
1155
|
-
*/
|
|
1156
|
-
destination_currency_code: string;
|
|
1157
|
-
|
|
1158
|
-
/**
|
|
1159
|
-
* An optional nickname for the payout token to help the user identify it. This is
|
|
1160
|
-
* not used by the provider and is only for the user's reference.
|
|
1161
|
-
*/
|
|
1162
|
-
nickname: string | null;
|
|
1163
|
-
|
|
1164
|
-
/**
|
|
1165
|
-
* The name of the payer associated with the payout token.
|
|
1166
|
-
*/
|
|
1167
|
-
payer_name: string | null;
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
782
|
export interface WithdrawalUpdatedWebhookEvent {
|
|
1173
783
|
/**
|
|
1174
784
|
* A unique ID for every single webhook request
|
|
@@ -1181,9 +791,10 @@ export interface WithdrawalUpdatedWebhookEvent {
|
|
|
1181
791
|
api_version: 'v1';
|
|
1182
792
|
|
|
1183
793
|
/**
|
|
1184
|
-
* A withdrawal request
|
|
794
|
+
* A withdrawal represents a request to transfer funds from a company's ledger
|
|
795
|
+
* account to an external payout method.
|
|
1185
796
|
*/
|
|
1186
|
-
data:
|
|
797
|
+
data: WithdrawalsAPI.Withdrawal;
|
|
1187
798
|
|
|
1188
799
|
/**
|
|
1189
800
|
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
@@ -1201,188 +812,6 @@ export interface WithdrawalUpdatedWebhookEvent {
|
|
|
1201
812
|
company_id?: string | null;
|
|
1202
813
|
}
|
|
1203
814
|
|
|
1204
|
-
export namespace WithdrawalUpdatedWebhookEvent {
|
|
1205
|
-
/**
|
|
1206
|
-
* A withdrawal request.
|
|
1207
|
-
*/
|
|
1208
|
-
export interface Data {
|
|
1209
|
-
/**
|
|
1210
|
-
* Internal ID of the withdrawal request.
|
|
1211
|
-
*/
|
|
1212
|
-
id: string;
|
|
1213
|
-
|
|
1214
|
-
/**
|
|
1215
|
-
* How much money was attempted to be withdrawn, in a float type.
|
|
1216
|
-
*/
|
|
1217
|
-
amount: number;
|
|
1218
|
-
|
|
1219
|
-
/**
|
|
1220
|
-
* When the withdrawal request was created.
|
|
1221
|
-
*/
|
|
1222
|
-
created_at: string;
|
|
1223
|
-
|
|
1224
|
-
/**
|
|
1225
|
-
* The currency of the withdrawal request.
|
|
1226
|
-
*/
|
|
1227
|
-
currency: Shared.Currency;
|
|
1228
|
-
|
|
1229
|
-
/**
|
|
1230
|
-
* The different error codes a payout can be in.
|
|
1231
|
-
*/
|
|
1232
|
-
error_code:
|
|
1233
|
-
| 'account_closed'
|
|
1234
|
-
| 'account_does_not_exist'
|
|
1235
|
-
| 'account_information_invalid'
|
|
1236
|
-
| 'account_number_invalid_region'
|
|
1237
|
-
| 'account_frozen'
|
|
1238
|
-
| 'account_lookup_failed'
|
|
1239
|
-
| 'account_not_found'
|
|
1240
|
-
| 'amount_out_of_bounds'
|
|
1241
|
-
| 'attributes_not_validated'
|
|
1242
|
-
| 'b2b_payments_prohibited'
|
|
1243
|
-
| 'bank_statement_required'
|
|
1244
|
-
| 'compliance_review'
|
|
1245
|
-
| 'currency_not_supported'
|
|
1246
|
-
| 'deposit_canceled'
|
|
1247
|
-
| 'deposit_failed'
|
|
1248
|
-
| 'deposit_rejected'
|
|
1249
|
-
| 'destination_unavailable'
|
|
1250
|
-
| 'exceeded_account_limit'
|
|
1251
|
-
| 'expired_quote'
|
|
1252
|
-
| 'generic_payout_error'
|
|
1253
|
-
| 'technical_problem'
|
|
1254
|
-
| 'identification_number_invalid'
|
|
1255
|
-
| 'invalid_account_number'
|
|
1256
|
-
| 'invalid_bank_code'
|
|
1257
|
-
| 'invalid_beneficiary'
|
|
1258
|
-
| 'invalid_mailing_address'
|
|
1259
|
-
| 'invalid_branch_number'
|
|
1260
|
-
| 'invalid_branch_code'
|
|
1261
|
-
| 'invalid_phone_number'
|
|
1262
|
-
| 'invalid_routing_number'
|
|
1263
|
-
| 'invalid_swift_code'
|
|
1264
|
-
| 'invalid_company_details'
|
|
1265
|
-
| 'manual_cancelation'
|
|
1266
|
-
| 'misc_error'
|
|
1267
|
-
| 'missing_city_and_country'
|
|
1268
|
-
| 'missing_phone_number'
|
|
1269
|
-
| 'missing_remittance_info'
|
|
1270
|
-
| 'payee_name_invalid'
|
|
1271
|
-
| 'receiving_account_locked'
|
|
1272
|
-
| 'rejected_by_compliance'
|
|
1273
|
-
| 'rtp_not_supported'
|
|
1274
|
-
| 'non_transaction_account'
|
|
1275
|
-
| 'source_token_insufficient_funds'
|
|
1276
|
-
| 'ssn_invalid'
|
|
1277
|
-
| 'wallet_screenshot_required'
|
|
1278
|
-
| 'unsupported_region'
|
|
1279
|
-
| null;
|
|
1280
|
-
|
|
1281
|
-
/**
|
|
1282
|
-
* The error message for the withdrawal, if any.
|
|
1283
|
-
*/
|
|
1284
|
-
error_message: string | null;
|
|
1285
|
-
|
|
1286
|
-
/**
|
|
1287
|
-
* The estimated availability date for the withdrawal, if any.
|
|
1288
|
-
*/
|
|
1289
|
-
estimated_availability: string | null;
|
|
1290
|
-
|
|
1291
|
-
/**
|
|
1292
|
-
* The fee amount that was charged for the withdrawal. This is in the same currency
|
|
1293
|
-
* as the withdrawal amount.
|
|
1294
|
-
*/
|
|
1295
|
-
fee_amount: number;
|
|
1296
|
-
|
|
1297
|
-
/**
|
|
1298
|
-
* The different fee types for a withdrawal.
|
|
1299
|
-
*/
|
|
1300
|
-
fee_type: WithdrawalsAPI.WithdrawalFeeTypes | null;
|
|
1301
|
-
|
|
1302
|
-
/**
|
|
1303
|
-
* The ledger account associated with the withdrawal.
|
|
1304
|
-
*/
|
|
1305
|
-
ledger_account: Data.LedgerAccount;
|
|
1306
|
-
|
|
1307
|
-
/**
|
|
1308
|
-
* The markup fee that was charged for the withdrawal. This is in the same currency
|
|
1309
|
-
* as the withdrawal amount. This only applies to platform accounts using Whop
|
|
1310
|
-
* Rails.
|
|
1311
|
-
*/
|
|
1312
|
-
markup_fee: number;
|
|
1313
|
-
|
|
1314
|
-
/**
|
|
1315
|
-
* The payout token used for the withdrawal, if applicable.
|
|
1316
|
-
*/
|
|
1317
|
-
payout_token: Data.PayoutToken | null;
|
|
1318
|
-
|
|
1319
|
-
/**
|
|
1320
|
-
* The speed of the withdrawal.
|
|
1321
|
-
*/
|
|
1322
|
-
speed: WithdrawalsAPI.WithdrawalSpeeds;
|
|
1323
|
-
|
|
1324
|
-
/**
|
|
1325
|
-
* Status of the withdrawal.
|
|
1326
|
-
*/
|
|
1327
|
-
status: WithdrawalsAPI.WithdrawalStatus;
|
|
1328
|
-
|
|
1329
|
-
/**
|
|
1330
|
-
* The trace code for the payout, if applicable. Provided on ACH transactions when
|
|
1331
|
-
* available.
|
|
1332
|
-
*/
|
|
1333
|
-
trace_code: string | null;
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
|
-
export namespace Data {
|
|
1337
|
-
/**
|
|
1338
|
-
* The ledger account associated with the withdrawal.
|
|
1339
|
-
*/
|
|
1340
|
-
export interface LedgerAccount {
|
|
1341
|
-
/**
|
|
1342
|
-
* The ID of the LedgerAccount.
|
|
1343
|
-
*/
|
|
1344
|
-
id: string;
|
|
1345
|
-
|
|
1346
|
-
/**
|
|
1347
|
-
* The ID of the company associated with this ledger account.
|
|
1348
|
-
*/
|
|
1349
|
-
company_id: string | null;
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
/**
|
|
1353
|
-
* The payout token used for the withdrawal, if applicable.
|
|
1354
|
-
*/
|
|
1355
|
-
export interface PayoutToken {
|
|
1356
|
-
/**
|
|
1357
|
-
* The ID of the payout token
|
|
1358
|
-
*/
|
|
1359
|
-
id: string;
|
|
1360
|
-
|
|
1361
|
-
/**
|
|
1362
|
-
* The date and time the payout token was created
|
|
1363
|
-
*/
|
|
1364
|
-
created_at: string;
|
|
1365
|
-
|
|
1366
|
-
/**
|
|
1367
|
-
* The currency code of the payout destination. This is the currency that payouts
|
|
1368
|
-
* will be made in for this token.
|
|
1369
|
-
*/
|
|
1370
|
-
destination_currency_code: string;
|
|
1371
|
-
|
|
1372
|
-
/**
|
|
1373
|
-
* An optional nickname for the payout token to help the user identify it. This is
|
|
1374
|
-
* not used by the provider and is only for the user's reference.
|
|
1375
|
-
*/
|
|
1376
|
-
nickname: string | null;
|
|
1377
|
-
|
|
1378
|
-
/**
|
|
1379
|
-
* The name of the payer associated with the payout token.
|
|
1380
|
-
*/
|
|
1381
|
-
payer_name: string | null;
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
815
|
export interface CourseLessonInteractionCompletedWebhookEvent {
|
|
1387
816
|
/**
|
|
1388
817
|
* A unique ID for every single webhook request
|
|
@@ -1453,7 +882,7 @@ export namespace PayoutMethodCreatedWebhookEvent {
|
|
|
1453
882
|
*/
|
|
1454
883
|
export interface Data {
|
|
1455
884
|
/**
|
|
1456
|
-
* The
|
|
885
|
+
* The unique identifier for the payout token.
|
|
1457
886
|
*/
|
|
1458
887
|
id: string;
|
|
1459
888
|
|
|
@@ -1469,7 +898,7 @@ export namespace PayoutMethodCreatedWebhookEvent {
|
|
|
1469
898
|
company: Data.Company | null;
|
|
1470
899
|
|
|
1471
900
|
/**
|
|
1472
|
-
* The
|
|
901
|
+
* The datetime the payout token was created.
|
|
1473
902
|
*/
|
|
1474
903
|
created_at: string;
|
|
1475
904
|
|
|
@@ -1507,7 +936,7 @@ export namespace PayoutMethodCreatedWebhookEvent {
|
|
|
1507
936
|
*/
|
|
1508
937
|
export interface Company {
|
|
1509
938
|
/**
|
|
1510
|
-
* The
|
|
939
|
+
* The unique identifier for the company.
|
|
1511
940
|
*/
|
|
1512
941
|
id: string;
|
|
1513
942
|
}
|
|
@@ -1519,7 +948,7 @@ export namespace PayoutMethodCreatedWebhookEvent {
|
|
|
1519
948
|
/**
|
|
1520
949
|
* The category of the payout destination
|
|
1521
950
|
*/
|
|
1522
|
-
category:
|
|
951
|
+
category: PayoutMethodsAPI.PayoutDestinationCategory;
|
|
1523
952
|
|
|
1524
953
|
/**
|
|
1525
954
|
* The country code of the payout destination
|
|
@@ -1572,34 +1001,14 @@ export namespace VerificationSucceededWebhookEvent {
|
|
|
1572
1001
|
*/
|
|
1573
1002
|
export interface Data {
|
|
1574
1003
|
/**
|
|
1575
|
-
*
|
|
1004
|
+
* The unique identifier for the verification.
|
|
1576
1005
|
*/
|
|
1577
1006
|
id: string;
|
|
1578
1007
|
|
|
1579
1008
|
/**
|
|
1580
1009
|
* An error code for a verification attempt.
|
|
1581
1010
|
*/
|
|
1582
|
-
last_error_code:
|
|
1583
|
-
| 'abandoned'
|
|
1584
|
-
| 'consent_declined'
|
|
1585
|
-
| 'country_not_supported'
|
|
1586
|
-
| 'device_not_supported'
|
|
1587
|
-
| 'document_expired'
|
|
1588
|
-
| 'document_type_not_supported'
|
|
1589
|
-
| 'document_unverified_other'
|
|
1590
|
-
| 'email_unverified_other'
|
|
1591
|
-
| 'email_verification_declined'
|
|
1592
|
-
| 'id_number_insufficient_document_data'
|
|
1593
|
-
| 'id_number_mismatch'
|
|
1594
|
-
| 'id_number_unverified_other'
|
|
1595
|
-
| 'phone_unverified_other'
|
|
1596
|
-
| 'phone_verification_declined'
|
|
1597
|
-
| 'selfie_document_missing_photo'
|
|
1598
|
-
| 'selfie_face_mismatch'
|
|
1599
|
-
| 'selfie_manipulated'
|
|
1600
|
-
| 'selfie_unverified_other'
|
|
1601
|
-
| 'under_supported_age'
|
|
1602
|
-
| null;
|
|
1011
|
+
last_error_code: VerificationsAPI.VerificationErrorCode | null;
|
|
1603
1012
|
|
|
1604
1013
|
/**
|
|
1605
1014
|
* The last error reason that occurred during the verification.
|
|
@@ -1609,20 +1018,7 @@ export namespace VerificationSucceededWebhookEvent {
|
|
|
1609
1018
|
/**
|
|
1610
1019
|
* The status of the verification.
|
|
1611
1020
|
*/
|
|
1612
|
-
status:
|
|
1613
|
-
| 'requires_input'
|
|
1614
|
-
| 'processing'
|
|
1615
|
-
| 'verified'
|
|
1616
|
-
| 'canceled'
|
|
1617
|
-
| 'created'
|
|
1618
|
-
| 'started'
|
|
1619
|
-
| 'submitted'
|
|
1620
|
-
| 'approved'
|
|
1621
|
-
| 'declined'
|
|
1622
|
-
| 'resubmission_requested'
|
|
1623
|
-
| 'expired'
|
|
1624
|
-
| 'abandoned'
|
|
1625
|
-
| 'review';
|
|
1021
|
+
status: VerificationsAPI.VerificationStatus;
|
|
1626
1022
|
}
|
|
1627
1023
|
}
|
|
1628
1024
|
|
|
@@ -1638,7 +1034,8 @@ export interface PaymentCreatedWebhookEvent {
|
|
|
1638
1034
|
api_version: 'v1';
|
|
1639
1035
|
|
|
1640
1036
|
/**
|
|
1641
|
-
*
|
|
1037
|
+
* A payment represents a completed or attempted charge for a membership. Payments
|
|
1038
|
+
* track the amount, status, currency, and payment method used.
|
|
1642
1039
|
*/
|
|
1643
1040
|
data: Shared.Payment;
|
|
1644
1041
|
|
|
@@ -1670,7 +1067,8 @@ export interface PaymentSucceededWebhookEvent {
|
|
|
1670
1067
|
api_version: 'v1';
|
|
1671
1068
|
|
|
1672
1069
|
/**
|
|
1673
|
-
*
|
|
1070
|
+
* A payment represents a completed or attempted charge for a membership. Payments
|
|
1071
|
+
* track the amount, status, currency, and payment method used.
|
|
1674
1072
|
*/
|
|
1675
1073
|
data: Shared.Payment;
|
|
1676
1074
|
|
|
@@ -1702,7 +1100,8 @@ export interface PaymentFailedWebhookEvent {
|
|
|
1702
1100
|
api_version: 'v1';
|
|
1703
1101
|
|
|
1704
1102
|
/**
|
|
1705
|
-
*
|
|
1103
|
+
* A payment represents a completed or attempted charge for a membership. Payments
|
|
1104
|
+
* track the amount, status, currency, and payment method used.
|
|
1706
1105
|
*/
|
|
1707
1106
|
data: Shared.Payment;
|
|
1708
1107
|
|
|
@@ -1734,7 +1133,8 @@ export interface PaymentPendingWebhookEvent {
|
|
|
1734
1133
|
api_version: 'v1';
|
|
1735
1134
|
|
|
1736
1135
|
/**
|
|
1737
|
-
*
|
|
1136
|
+
* A payment represents a completed or attempted charge for a membership. Payments
|
|
1137
|
+
* track the amount, status, currency, and payment method used.
|
|
1738
1138
|
*/
|
|
1739
1139
|
data: Shared.Payment;
|
|
1740
1140
|
|
|
@@ -1766,7 +1166,8 @@ export interface DisputeCreatedWebhookEvent {
|
|
|
1766
1166
|
api_version: 'v1';
|
|
1767
1167
|
|
|
1768
1168
|
/**
|
|
1769
|
-
*
|
|
1169
|
+
* A dispute is a chargeback or payment challenge filed against a company,
|
|
1170
|
+
* including evidence and response status.
|
|
1770
1171
|
*/
|
|
1771
1172
|
data: DisputesAPI.Dispute;
|
|
1772
1173
|
|
|
@@ -1798,7 +1199,8 @@ export interface DisputeUpdatedWebhookEvent {
|
|
|
1798
1199
|
api_version: 'v1';
|
|
1799
1200
|
|
|
1800
1201
|
/**
|
|
1801
|
-
*
|
|
1202
|
+
* A dispute is a chargeback or payment challenge filed against a company,
|
|
1203
|
+
* including evidence and response status.
|
|
1802
1204
|
*/
|
|
1803
1205
|
data: DisputesAPI.Dispute;
|
|
1804
1206
|
|
|
@@ -1830,7 +1232,8 @@ export interface RefundCreatedWebhookEvent {
|
|
|
1830
1232
|
api_version: 'v1';
|
|
1831
1233
|
|
|
1832
1234
|
/**
|
|
1833
|
-
*
|
|
1235
|
+
* A refund represents a full or partial reversal of a payment, including the
|
|
1236
|
+
* amount, status, and payment provider.
|
|
1834
1237
|
*/
|
|
1835
1238
|
data: RefundCreatedWebhookEvent.Data;
|
|
1836
1239
|
|
|
@@ -1852,21 +1255,23 @@ export interface RefundCreatedWebhookEvent {
|
|
|
1852
1255
|
|
|
1853
1256
|
export namespace RefundCreatedWebhookEvent {
|
|
1854
1257
|
/**
|
|
1855
|
-
*
|
|
1258
|
+
* A refund represents a full or partial reversal of a payment, including the
|
|
1259
|
+
* amount, status, and payment provider.
|
|
1856
1260
|
*/
|
|
1857
1261
|
export interface Data {
|
|
1858
1262
|
/**
|
|
1859
|
-
* The
|
|
1263
|
+
* The unique identifier for the refund.
|
|
1860
1264
|
*/
|
|
1861
1265
|
id: string;
|
|
1862
1266
|
|
|
1863
1267
|
/**
|
|
1864
|
-
* The amount of the refund.
|
|
1268
|
+
* The amount of the refund. Provided as a number in the specified currency. Eg:
|
|
1269
|
+
* 10.43 for $10.43 USD.
|
|
1865
1270
|
*/
|
|
1866
1271
|
amount: number;
|
|
1867
1272
|
|
|
1868
1273
|
/**
|
|
1869
|
-
* The
|
|
1274
|
+
* The datetime the refund was created.
|
|
1870
1275
|
*/
|
|
1871
1276
|
created_at: string;
|
|
1872
1277
|
|
|
@@ -1917,7 +1322,7 @@ export namespace RefundCreatedWebhookEvent {
|
|
|
1917
1322
|
*/
|
|
1918
1323
|
export interface Payment {
|
|
1919
1324
|
/**
|
|
1920
|
-
* The payment
|
|
1325
|
+
* The unique identifier for the payment.
|
|
1921
1326
|
*/
|
|
1922
1327
|
id: string;
|
|
1923
1328
|
|
|
@@ -1937,7 +1342,7 @@ export namespace RefundCreatedWebhookEvent {
|
|
|
1937
1342
|
card_last4: string | null;
|
|
1938
1343
|
|
|
1939
1344
|
/**
|
|
1940
|
-
* The datetime the payment was created
|
|
1345
|
+
* The datetime the payment was created.
|
|
1941
1346
|
*/
|
|
1942
1347
|
created_at: string;
|
|
1943
1348
|
|
|
@@ -1998,7 +1403,7 @@ export namespace RefundCreatedWebhookEvent {
|
|
|
1998
1403
|
*/
|
|
1999
1404
|
export interface Member {
|
|
2000
1405
|
/**
|
|
2001
|
-
* The
|
|
1406
|
+
* The unique identifier for the company member.
|
|
2002
1407
|
*/
|
|
2003
1408
|
id: string;
|
|
2004
1409
|
|
|
@@ -2013,7 +1418,7 @@ export namespace RefundCreatedWebhookEvent {
|
|
|
2013
1418
|
*/
|
|
2014
1419
|
export interface Membership {
|
|
2015
1420
|
/**
|
|
2016
|
-
* The
|
|
1421
|
+
* The unique identifier for the membership.
|
|
2017
1422
|
*/
|
|
2018
1423
|
id: string;
|
|
2019
1424
|
|
|
@@ -2028,7 +1433,7 @@ export namespace RefundCreatedWebhookEvent {
|
|
|
2028
1433
|
*/
|
|
2029
1434
|
export interface User {
|
|
2030
1435
|
/**
|
|
2031
|
-
* The
|
|
1436
|
+
* The unique identifier for the user.
|
|
2032
1437
|
*/
|
|
2033
1438
|
id: string;
|
|
2034
1439
|
|
|
@@ -2063,7 +1468,8 @@ export interface RefundUpdatedWebhookEvent {
|
|
|
2063
1468
|
api_version: 'v1';
|
|
2064
1469
|
|
|
2065
1470
|
/**
|
|
2066
|
-
*
|
|
1471
|
+
* A refund represents a full or partial reversal of a payment, including the
|
|
1472
|
+
* amount, status, and payment provider.
|
|
2067
1473
|
*/
|
|
2068
1474
|
data: RefundUpdatedWebhookEvent.Data;
|
|
2069
1475
|
|
|
@@ -2085,21 +1491,23 @@ export interface RefundUpdatedWebhookEvent {
|
|
|
2085
1491
|
|
|
2086
1492
|
export namespace RefundUpdatedWebhookEvent {
|
|
2087
1493
|
/**
|
|
2088
|
-
*
|
|
1494
|
+
* A refund represents a full or partial reversal of a payment, including the
|
|
1495
|
+
* amount, status, and payment provider.
|
|
2089
1496
|
*/
|
|
2090
1497
|
export interface Data {
|
|
2091
1498
|
/**
|
|
2092
|
-
* The
|
|
1499
|
+
* The unique identifier for the refund.
|
|
2093
1500
|
*/
|
|
2094
1501
|
id: string;
|
|
2095
1502
|
|
|
2096
1503
|
/**
|
|
2097
|
-
* The amount of the refund.
|
|
1504
|
+
* The amount of the refund. Provided as a number in the specified currency. Eg:
|
|
1505
|
+
* 10.43 for $10.43 USD.
|
|
2098
1506
|
*/
|
|
2099
1507
|
amount: number;
|
|
2100
1508
|
|
|
2101
1509
|
/**
|
|
2102
|
-
* The
|
|
1510
|
+
* The datetime the refund was created.
|
|
2103
1511
|
*/
|
|
2104
1512
|
created_at: string;
|
|
2105
1513
|
|
|
@@ -2150,7 +1558,7 @@ export namespace RefundUpdatedWebhookEvent {
|
|
|
2150
1558
|
*/
|
|
2151
1559
|
export interface Payment {
|
|
2152
1560
|
/**
|
|
2153
|
-
* The payment
|
|
1561
|
+
* The unique identifier for the payment.
|
|
2154
1562
|
*/
|
|
2155
1563
|
id: string;
|
|
2156
1564
|
|
|
@@ -2170,7 +1578,7 @@ export namespace RefundUpdatedWebhookEvent {
|
|
|
2170
1578
|
card_last4: string | null;
|
|
2171
1579
|
|
|
2172
1580
|
/**
|
|
2173
|
-
* The datetime the payment was created
|
|
1581
|
+
* The datetime the payment was created.
|
|
2174
1582
|
*/
|
|
2175
1583
|
created_at: string;
|
|
2176
1584
|
|
|
@@ -2231,7 +1639,7 @@ export namespace RefundUpdatedWebhookEvent {
|
|
|
2231
1639
|
*/
|
|
2232
1640
|
export interface Member {
|
|
2233
1641
|
/**
|
|
2234
|
-
* The
|
|
1642
|
+
* The unique identifier for the company member.
|
|
2235
1643
|
*/
|
|
2236
1644
|
id: string;
|
|
2237
1645
|
|
|
@@ -2246,7 +1654,7 @@ export namespace RefundUpdatedWebhookEvent {
|
|
|
2246
1654
|
*/
|
|
2247
1655
|
export interface Membership {
|
|
2248
1656
|
/**
|
|
2249
|
-
* The
|
|
1657
|
+
* The unique identifier for the membership.
|
|
2250
1658
|
*/
|
|
2251
1659
|
id: string;
|
|
2252
1660
|
|
|
@@ -2261,7 +1669,7 @@ export namespace RefundUpdatedWebhookEvent {
|
|
|
2261
1669
|
*/
|
|
2262
1670
|
export interface User {
|
|
2263
1671
|
/**
|
|
2264
|
-
* The
|
|
1672
|
+
* The unique identifier for the user.
|
|
2265
1673
|
*/
|
|
2266
1674
|
id: string;
|
|
2267
1675
|
|
|
@@ -2296,8 +1704,8 @@ export interface MembershipCancelAtPeriodEndChangedWebhookEvent {
|
|
|
2296
1704
|
api_version: 'v1';
|
|
2297
1705
|
|
|
2298
1706
|
/**
|
|
2299
|
-
* A membership represents
|
|
2300
|
-
*
|
|
1707
|
+
* A membership represents an active relationship between a user and a product. It
|
|
1708
|
+
* tracks the user's access, billing status, and renewal schedule.
|
|
2301
1709
|
*/
|
|
2302
1710
|
data: Shared.Membership;
|
|
2303
1711
|
|
|
@@ -2355,7 +1763,7 @@ export interface WebhookCreateParams {
|
|
|
2355
1763
|
/**
|
|
2356
1764
|
* The different API versions
|
|
2357
1765
|
*/
|
|
2358
|
-
api_version?:
|
|
1766
|
+
api_version?: APIVersion | null;
|
|
2359
1767
|
|
|
2360
1768
|
/**
|
|
2361
1769
|
* Whether or not to send events for child resources. For example, if the webhook
|
|
@@ -2372,35 +1780,7 @@ export interface WebhookCreateParams {
|
|
|
2372
1780
|
/**
|
|
2373
1781
|
* The events to send the webhook for.
|
|
2374
1782
|
*/
|
|
2375
|
-
events?: Array<
|
|
2376
|
-
| 'invoice.created'
|
|
2377
|
-
| 'invoice.paid'
|
|
2378
|
-
| 'invoice.past_due'
|
|
2379
|
-
| 'invoice.voided'
|
|
2380
|
-
| 'membership.activated'
|
|
2381
|
-
| 'membership.deactivated'
|
|
2382
|
-
| 'entry.created'
|
|
2383
|
-
| 'entry.approved'
|
|
2384
|
-
| 'entry.denied'
|
|
2385
|
-
| 'entry.deleted'
|
|
2386
|
-
| 'setup_intent.requires_action'
|
|
2387
|
-
| 'setup_intent.succeeded'
|
|
2388
|
-
| 'setup_intent.canceled'
|
|
2389
|
-
| 'withdrawal.created'
|
|
2390
|
-
| 'withdrawal.updated'
|
|
2391
|
-
| 'course_lesson_interaction.completed'
|
|
2392
|
-
| 'payout_method.created'
|
|
2393
|
-
| 'verification.succeeded'
|
|
2394
|
-
| 'payment.created'
|
|
2395
|
-
| 'payment.succeeded'
|
|
2396
|
-
| 'payment.failed'
|
|
2397
|
-
| 'payment.pending'
|
|
2398
|
-
| 'dispute.created'
|
|
2399
|
-
| 'dispute.updated'
|
|
2400
|
-
| 'refund.created'
|
|
2401
|
-
| 'refund.updated'
|
|
2402
|
-
| 'membership.cancel_at_period_end_changed'
|
|
2403
|
-
> | null;
|
|
1783
|
+
events?: Array<WebhookEvent> | null;
|
|
2404
1784
|
|
|
2405
1785
|
/**
|
|
2406
1786
|
* The resource to create the webhook for. By default this will use current company
|
|
@@ -2412,7 +1792,7 @@ export interface WebhookUpdateParams {
|
|
|
2412
1792
|
/**
|
|
2413
1793
|
* The different API versions
|
|
2414
1794
|
*/
|
|
2415
|
-
api_version?:
|
|
1795
|
+
api_version?: APIVersion | null;
|
|
2416
1796
|
|
|
2417
1797
|
/**
|
|
2418
1798
|
* Whether or not to send events for child resources.
|
|
@@ -2427,35 +1807,7 @@ export interface WebhookUpdateParams {
|
|
|
2427
1807
|
/**
|
|
2428
1808
|
* The events to send the webhook for.
|
|
2429
1809
|
*/
|
|
2430
|
-
events?: Array<
|
|
2431
|
-
| 'invoice.created'
|
|
2432
|
-
| 'invoice.paid'
|
|
2433
|
-
| 'invoice.past_due'
|
|
2434
|
-
| 'invoice.voided'
|
|
2435
|
-
| 'membership.activated'
|
|
2436
|
-
| 'membership.deactivated'
|
|
2437
|
-
| 'entry.created'
|
|
2438
|
-
| 'entry.approved'
|
|
2439
|
-
| 'entry.denied'
|
|
2440
|
-
| 'entry.deleted'
|
|
2441
|
-
| 'setup_intent.requires_action'
|
|
2442
|
-
| 'setup_intent.succeeded'
|
|
2443
|
-
| 'setup_intent.canceled'
|
|
2444
|
-
| 'withdrawal.created'
|
|
2445
|
-
| 'withdrawal.updated'
|
|
2446
|
-
| 'course_lesson_interaction.completed'
|
|
2447
|
-
| 'payout_method.created'
|
|
2448
|
-
| 'verification.succeeded'
|
|
2449
|
-
| 'payment.created'
|
|
2450
|
-
| 'payment.succeeded'
|
|
2451
|
-
| 'payment.failed'
|
|
2452
|
-
| 'payment.pending'
|
|
2453
|
-
| 'dispute.created'
|
|
2454
|
-
| 'dispute.updated'
|
|
2455
|
-
| 'refund.created'
|
|
2456
|
-
| 'refund.updated'
|
|
2457
|
-
| 'membership.cancel_at_period_end_changed'
|
|
2458
|
-
> | null;
|
|
1810
|
+
events?: Array<WebhookEvent> | null;
|
|
2459
1811
|
|
|
2460
1812
|
/**
|
|
2461
1813
|
* The URL to send the webhook to.
|
|
@@ -2487,9 +1839,10 @@ export interface WebhookListParams extends CursorPageParams {
|
|
|
2487
1839
|
|
|
2488
1840
|
export declare namespace Webhooks {
|
|
2489
1841
|
export {
|
|
1842
|
+
type APIVersion as APIVersion,
|
|
1843
|
+
type Webhook as Webhook,
|
|
1844
|
+
type WebhookEvent as WebhookEvent,
|
|
2490
1845
|
type WebhookCreateResponse as WebhookCreateResponse,
|
|
2491
|
-
type WebhookRetrieveResponse as WebhookRetrieveResponse,
|
|
2492
|
-
type WebhookUpdateResponse as WebhookUpdateResponse,
|
|
2493
1846
|
type WebhookListResponse as WebhookListResponse,
|
|
2494
1847
|
type WebhookDeleteResponse as WebhookDeleteResponse,
|
|
2495
1848
|
type InvoiceCreatedWebhookEvent as InvoiceCreatedWebhookEvent,
|