dodopayments 2.2.0 → 2.3.0
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 +16 -0
- package/client.d.mts +11 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +11 -5
- package/client.d.ts.map +1 -1
- package/client.js +7 -3
- package/client.js.map +1 -1
- package/client.mjs +7 -3
- package/client.mjs.map +1 -1
- package/package.json +4 -2
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/payments.d.mts +9 -1
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +9 -1
- package/resources/payments.d.ts.map +1 -1
- package/resources/webhooks/index.d.mts +1 -1
- package/resources/webhooks/index.d.mts.map +1 -1
- package/resources/webhooks/index.d.ts +1 -1
- package/resources/webhooks/index.d.ts.map +1 -1
- package/resources/webhooks/index.js.map +1 -1
- package/resources/webhooks/index.mjs.map +1 -1
- package/resources/webhooks/webhooks.d.mts +1231 -1
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +1231 -1
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js +14 -0
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs +14 -0
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/src/client.ts +65 -8
- package/src/resources/index.ts +23 -0
- package/src/resources/payments.ts +9 -1
- package/src/resources/webhooks/index.ts +23 -0
- package/src/resources/webhooks/webhooks.ts +1520 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as DisputesAPI from "../disputes.mjs";
|
|
3
|
+
import * as LicenseKeysAPI from "../license-keys.mjs";
|
|
4
|
+
import * as PaymentsAPI from "../payments.mjs";
|
|
5
|
+
import * as RefundsAPI from "../refunds.mjs";
|
|
6
|
+
import * as SubscriptionsAPI from "../subscriptions.mjs";
|
|
2
7
|
import * as WebhookEventsAPI from "../webhook-events.mjs";
|
|
3
8
|
import * as HeadersAPI from "./headers.mjs";
|
|
4
9
|
import { HeaderRetrieveResponse, HeaderUpdateParams, Headers } from "./headers.mjs";
|
|
@@ -31,6 +36,11 @@ export declare class Webhooks extends APIResource {
|
|
|
31
36
|
* Get webhook secret by id
|
|
32
37
|
*/
|
|
33
38
|
retrieveSecret(webhookID: string, options?: RequestOptions): APIPromise<WebhookRetrieveSecretResponse>;
|
|
39
|
+
unsafeUnwrap(body: string): UnsafeUnwrapWebhookEvent;
|
|
40
|
+
unwrap(body: string, { headers, key }: {
|
|
41
|
+
headers: Record<string, string>;
|
|
42
|
+
key?: string;
|
|
43
|
+
}): UnwrapWebhookEvent;
|
|
34
44
|
}
|
|
35
45
|
export type WebhookDetailsCursorPagePagination = CursorPagePagination<WebhookDetails>;
|
|
36
46
|
export interface WebhookDetails {
|
|
@@ -80,6 +90,1226 @@ export interface WebhookDetails {
|
|
|
80
90
|
export interface WebhookRetrieveSecretResponse {
|
|
81
91
|
secret: string;
|
|
82
92
|
}
|
|
93
|
+
export interface DisputeAcceptedWebhookEvent {
|
|
94
|
+
/**
|
|
95
|
+
* The business identifier
|
|
96
|
+
*/
|
|
97
|
+
business_id: string;
|
|
98
|
+
/**
|
|
99
|
+
* Event-specific data
|
|
100
|
+
*/
|
|
101
|
+
data: DisputeAcceptedWebhookEvent.Data;
|
|
102
|
+
/**
|
|
103
|
+
* The timestamp of when the event occurred
|
|
104
|
+
*/
|
|
105
|
+
timestamp: string;
|
|
106
|
+
/**
|
|
107
|
+
* The event type
|
|
108
|
+
*/
|
|
109
|
+
type: 'dispute.accepted';
|
|
110
|
+
}
|
|
111
|
+
export declare namespace DisputeAcceptedWebhookEvent {
|
|
112
|
+
/**
|
|
113
|
+
* Event-specific data
|
|
114
|
+
*/
|
|
115
|
+
interface Data extends DisputesAPI.Dispute {
|
|
116
|
+
/**
|
|
117
|
+
* The type of payload in the data field
|
|
118
|
+
*/
|
|
119
|
+
payload_type?: 'Dispute';
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
export interface DisputeCancelledWebhookEvent {
|
|
123
|
+
/**
|
|
124
|
+
* The business identifier
|
|
125
|
+
*/
|
|
126
|
+
business_id: string;
|
|
127
|
+
/**
|
|
128
|
+
* Event-specific data
|
|
129
|
+
*/
|
|
130
|
+
data: DisputeCancelledWebhookEvent.Data;
|
|
131
|
+
/**
|
|
132
|
+
* The timestamp of when the event occurred
|
|
133
|
+
*/
|
|
134
|
+
timestamp: string;
|
|
135
|
+
/**
|
|
136
|
+
* The event type
|
|
137
|
+
*/
|
|
138
|
+
type: 'dispute.cancelled';
|
|
139
|
+
}
|
|
140
|
+
export declare namespace DisputeCancelledWebhookEvent {
|
|
141
|
+
/**
|
|
142
|
+
* Event-specific data
|
|
143
|
+
*/
|
|
144
|
+
interface Data extends DisputesAPI.Dispute {
|
|
145
|
+
/**
|
|
146
|
+
* The type of payload in the data field
|
|
147
|
+
*/
|
|
148
|
+
payload_type?: 'Dispute';
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
export interface DisputeChallengedWebhookEvent {
|
|
152
|
+
/**
|
|
153
|
+
* The business identifier
|
|
154
|
+
*/
|
|
155
|
+
business_id: string;
|
|
156
|
+
/**
|
|
157
|
+
* Event-specific data
|
|
158
|
+
*/
|
|
159
|
+
data: DisputeChallengedWebhookEvent.Data;
|
|
160
|
+
/**
|
|
161
|
+
* The timestamp of when the event occurred
|
|
162
|
+
*/
|
|
163
|
+
timestamp: string;
|
|
164
|
+
/**
|
|
165
|
+
* The event type
|
|
166
|
+
*/
|
|
167
|
+
type: 'dispute.challenged';
|
|
168
|
+
}
|
|
169
|
+
export declare namespace DisputeChallengedWebhookEvent {
|
|
170
|
+
/**
|
|
171
|
+
* Event-specific data
|
|
172
|
+
*/
|
|
173
|
+
interface Data extends DisputesAPI.Dispute {
|
|
174
|
+
/**
|
|
175
|
+
* The type of payload in the data field
|
|
176
|
+
*/
|
|
177
|
+
payload_type?: 'Dispute';
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
export interface DisputeExpiredWebhookEvent {
|
|
181
|
+
/**
|
|
182
|
+
* The business identifier
|
|
183
|
+
*/
|
|
184
|
+
business_id: string;
|
|
185
|
+
/**
|
|
186
|
+
* Event-specific data
|
|
187
|
+
*/
|
|
188
|
+
data: DisputeExpiredWebhookEvent.Data;
|
|
189
|
+
/**
|
|
190
|
+
* The timestamp of when the event occurred
|
|
191
|
+
*/
|
|
192
|
+
timestamp: string;
|
|
193
|
+
/**
|
|
194
|
+
* The event type
|
|
195
|
+
*/
|
|
196
|
+
type: 'dispute.expired';
|
|
197
|
+
}
|
|
198
|
+
export declare namespace DisputeExpiredWebhookEvent {
|
|
199
|
+
/**
|
|
200
|
+
* Event-specific data
|
|
201
|
+
*/
|
|
202
|
+
interface Data extends DisputesAPI.Dispute {
|
|
203
|
+
/**
|
|
204
|
+
* The type of payload in the data field
|
|
205
|
+
*/
|
|
206
|
+
payload_type?: 'Dispute';
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
export interface DisputeLostWebhookEvent {
|
|
210
|
+
/**
|
|
211
|
+
* The business identifier
|
|
212
|
+
*/
|
|
213
|
+
business_id: string;
|
|
214
|
+
/**
|
|
215
|
+
* Event-specific data
|
|
216
|
+
*/
|
|
217
|
+
data: DisputeLostWebhookEvent.Data;
|
|
218
|
+
/**
|
|
219
|
+
* The timestamp of when the event occurred
|
|
220
|
+
*/
|
|
221
|
+
timestamp: string;
|
|
222
|
+
/**
|
|
223
|
+
* The event type
|
|
224
|
+
*/
|
|
225
|
+
type: 'dispute.lost';
|
|
226
|
+
}
|
|
227
|
+
export declare namespace DisputeLostWebhookEvent {
|
|
228
|
+
/**
|
|
229
|
+
* Event-specific data
|
|
230
|
+
*/
|
|
231
|
+
interface Data extends DisputesAPI.Dispute {
|
|
232
|
+
/**
|
|
233
|
+
* The type of payload in the data field
|
|
234
|
+
*/
|
|
235
|
+
payload_type?: 'Dispute';
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
export interface DisputeOpenedWebhookEvent {
|
|
239
|
+
/**
|
|
240
|
+
* The business identifier
|
|
241
|
+
*/
|
|
242
|
+
business_id: string;
|
|
243
|
+
/**
|
|
244
|
+
* Event-specific data
|
|
245
|
+
*/
|
|
246
|
+
data: DisputeOpenedWebhookEvent.Data;
|
|
247
|
+
/**
|
|
248
|
+
* The timestamp of when the event occurred
|
|
249
|
+
*/
|
|
250
|
+
timestamp: string;
|
|
251
|
+
/**
|
|
252
|
+
* The event type
|
|
253
|
+
*/
|
|
254
|
+
type: 'dispute.opened';
|
|
255
|
+
}
|
|
256
|
+
export declare namespace DisputeOpenedWebhookEvent {
|
|
257
|
+
/**
|
|
258
|
+
* Event-specific data
|
|
259
|
+
*/
|
|
260
|
+
interface Data extends DisputesAPI.Dispute {
|
|
261
|
+
/**
|
|
262
|
+
* The type of payload in the data field
|
|
263
|
+
*/
|
|
264
|
+
payload_type?: 'Dispute';
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
export interface DisputeWonWebhookEvent {
|
|
268
|
+
/**
|
|
269
|
+
* The business identifier
|
|
270
|
+
*/
|
|
271
|
+
business_id: string;
|
|
272
|
+
/**
|
|
273
|
+
* Event-specific data
|
|
274
|
+
*/
|
|
275
|
+
data: DisputeWonWebhookEvent.Data;
|
|
276
|
+
/**
|
|
277
|
+
* The timestamp of when the event occurred
|
|
278
|
+
*/
|
|
279
|
+
timestamp: string;
|
|
280
|
+
/**
|
|
281
|
+
* The event type
|
|
282
|
+
*/
|
|
283
|
+
type: 'dispute.won';
|
|
284
|
+
}
|
|
285
|
+
export declare namespace DisputeWonWebhookEvent {
|
|
286
|
+
/**
|
|
287
|
+
* Event-specific data
|
|
288
|
+
*/
|
|
289
|
+
interface Data extends DisputesAPI.Dispute {
|
|
290
|
+
/**
|
|
291
|
+
* The type of payload in the data field
|
|
292
|
+
*/
|
|
293
|
+
payload_type?: 'Dispute';
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
export interface LicenseKeyCreatedWebhookEvent {
|
|
297
|
+
/**
|
|
298
|
+
* The business identifier
|
|
299
|
+
*/
|
|
300
|
+
business_id: string;
|
|
301
|
+
/**
|
|
302
|
+
* Event-specific data
|
|
303
|
+
*/
|
|
304
|
+
data: LicenseKeyCreatedWebhookEvent.Data;
|
|
305
|
+
/**
|
|
306
|
+
* The timestamp of when the event occurred
|
|
307
|
+
*/
|
|
308
|
+
timestamp: string;
|
|
309
|
+
/**
|
|
310
|
+
* The event type
|
|
311
|
+
*/
|
|
312
|
+
type: 'license_key.created';
|
|
313
|
+
}
|
|
314
|
+
export declare namespace LicenseKeyCreatedWebhookEvent {
|
|
315
|
+
/**
|
|
316
|
+
* Event-specific data
|
|
317
|
+
*/
|
|
318
|
+
interface Data extends LicenseKeysAPI.LicenseKey {
|
|
319
|
+
/**
|
|
320
|
+
* The type of payload in the data field
|
|
321
|
+
*/
|
|
322
|
+
payload_type?: 'LicenseKey';
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
export interface PaymentCancelledWebhookEvent {
|
|
326
|
+
/**
|
|
327
|
+
* The business identifier
|
|
328
|
+
*/
|
|
329
|
+
business_id: string;
|
|
330
|
+
/**
|
|
331
|
+
* Event-specific data
|
|
332
|
+
*/
|
|
333
|
+
data: PaymentCancelledWebhookEvent.Data;
|
|
334
|
+
/**
|
|
335
|
+
* The timestamp of when the event occurred
|
|
336
|
+
*/
|
|
337
|
+
timestamp: string;
|
|
338
|
+
/**
|
|
339
|
+
* The event type
|
|
340
|
+
*/
|
|
341
|
+
type: 'payment.cancelled';
|
|
342
|
+
}
|
|
343
|
+
export declare namespace PaymentCancelledWebhookEvent {
|
|
344
|
+
/**
|
|
345
|
+
* Event-specific data
|
|
346
|
+
*/
|
|
347
|
+
interface Data extends PaymentsAPI.Payment {
|
|
348
|
+
/**
|
|
349
|
+
* The type of payload in the data field
|
|
350
|
+
*/
|
|
351
|
+
payload_type?: 'Payment';
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
export interface PaymentFailedWebhookEvent {
|
|
355
|
+
/**
|
|
356
|
+
* The business identifier
|
|
357
|
+
*/
|
|
358
|
+
business_id: string;
|
|
359
|
+
/**
|
|
360
|
+
* Event-specific data
|
|
361
|
+
*/
|
|
362
|
+
data: PaymentFailedWebhookEvent.Data;
|
|
363
|
+
/**
|
|
364
|
+
* The timestamp of when the event occurred
|
|
365
|
+
*/
|
|
366
|
+
timestamp: string;
|
|
367
|
+
/**
|
|
368
|
+
* The event type
|
|
369
|
+
*/
|
|
370
|
+
type: 'payment.failed';
|
|
371
|
+
}
|
|
372
|
+
export declare namespace PaymentFailedWebhookEvent {
|
|
373
|
+
/**
|
|
374
|
+
* Event-specific data
|
|
375
|
+
*/
|
|
376
|
+
interface Data extends PaymentsAPI.Payment {
|
|
377
|
+
/**
|
|
378
|
+
* The type of payload in the data field
|
|
379
|
+
*/
|
|
380
|
+
payload_type?: 'Payment';
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
export interface PaymentProcessingWebhookEvent {
|
|
384
|
+
/**
|
|
385
|
+
* The business identifier
|
|
386
|
+
*/
|
|
387
|
+
business_id: string;
|
|
388
|
+
/**
|
|
389
|
+
* Event-specific data
|
|
390
|
+
*/
|
|
391
|
+
data: PaymentProcessingWebhookEvent.Data;
|
|
392
|
+
/**
|
|
393
|
+
* The timestamp of when the event occurred
|
|
394
|
+
*/
|
|
395
|
+
timestamp: string;
|
|
396
|
+
/**
|
|
397
|
+
* The event type
|
|
398
|
+
*/
|
|
399
|
+
type: 'payment.processing';
|
|
400
|
+
}
|
|
401
|
+
export declare namespace PaymentProcessingWebhookEvent {
|
|
402
|
+
/**
|
|
403
|
+
* Event-specific data
|
|
404
|
+
*/
|
|
405
|
+
interface Data extends PaymentsAPI.Payment {
|
|
406
|
+
/**
|
|
407
|
+
* The type of payload in the data field
|
|
408
|
+
*/
|
|
409
|
+
payload_type?: 'Payment';
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
export interface PaymentSucceededWebhookEvent {
|
|
413
|
+
/**
|
|
414
|
+
* The business identifier
|
|
415
|
+
*/
|
|
416
|
+
business_id: string;
|
|
417
|
+
/**
|
|
418
|
+
* Event-specific data
|
|
419
|
+
*/
|
|
420
|
+
data: PaymentSucceededWebhookEvent.Data;
|
|
421
|
+
/**
|
|
422
|
+
* The timestamp of when the event occurred
|
|
423
|
+
*/
|
|
424
|
+
timestamp: string;
|
|
425
|
+
/**
|
|
426
|
+
* The event type
|
|
427
|
+
*/
|
|
428
|
+
type: 'payment.succeeded';
|
|
429
|
+
}
|
|
430
|
+
export declare namespace PaymentSucceededWebhookEvent {
|
|
431
|
+
/**
|
|
432
|
+
* Event-specific data
|
|
433
|
+
*/
|
|
434
|
+
interface Data extends PaymentsAPI.Payment {
|
|
435
|
+
/**
|
|
436
|
+
* The type of payload in the data field
|
|
437
|
+
*/
|
|
438
|
+
payload_type?: 'Payment';
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
export interface RefundFailedWebhookEvent {
|
|
442
|
+
/**
|
|
443
|
+
* The business identifier
|
|
444
|
+
*/
|
|
445
|
+
business_id: string;
|
|
446
|
+
/**
|
|
447
|
+
* Event-specific data
|
|
448
|
+
*/
|
|
449
|
+
data: RefundFailedWebhookEvent.Data;
|
|
450
|
+
/**
|
|
451
|
+
* The timestamp of when the event occurred
|
|
452
|
+
*/
|
|
453
|
+
timestamp: string;
|
|
454
|
+
/**
|
|
455
|
+
* The event type
|
|
456
|
+
*/
|
|
457
|
+
type: 'refund.failed';
|
|
458
|
+
}
|
|
459
|
+
export declare namespace RefundFailedWebhookEvent {
|
|
460
|
+
/**
|
|
461
|
+
* Event-specific data
|
|
462
|
+
*/
|
|
463
|
+
interface Data extends RefundsAPI.Refund {
|
|
464
|
+
/**
|
|
465
|
+
* The type of payload in the data field
|
|
466
|
+
*/
|
|
467
|
+
payload_type?: 'Refund';
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
export interface RefundSucceededWebhookEvent {
|
|
471
|
+
/**
|
|
472
|
+
* The business identifier
|
|
473
|
+
*/
|
|
474
|
+
business_id: string;
|
|
475
|
+
/**
|
|
476
|
+
* Event-specific data
|
|
477
|
+
*/
|
|
478
|
+
data: RefundSucceededWebhookEvent.Data;
|
|
479
|
+
/**
|
|
480
|
+
* The timestamp of when the event occurred
|
|
481
|
+
*/
|
|
482
|
+
timestamp: string;
|
|
483
|
+
/**
|
|
484
|
+
* The event type
|
|
485
|
+
*/
|
|
486
|
+
type: 'refund.succeeded';
|
|
487
|
+
}
|
|
488
|
+
export declare namespace RefundSucceededWebhookEvent {
|
|
489
|
+
/**
|
|
490
|
+
* Event-specific data
|
|
491
|
+
*/
|
|
492
|
+
interface Data extends RefundsAPI.Refund {
|
|
493
|
+
/**
|
|
494
|
+
* The type of payload in the data field
|
|
495
|
+
*/
|
|
496
|
+
payload_type?: 'Refund';
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
export interface SubscriptionActiveWebhookEvent {
|
|
500
|
+
/**
|
|
501
|
+
* The business identifier
|
|
502
|
+
*/
|
|
503
|
+
business_id: string;
|
|
504
|
+
/**
|
|
505
|
+
* Event-specific data
|
|
506
|
+
*/
|
|
507
|
+
data: SubscriptionActiveWebhookEvent.Data;
|
|
508
|
+
/**
|
|
509
|
+
* The timestamp of when the event occurred
|
|
510
|
+
*/
|
|
511
|
+
timestamp: string;
|
|
512
|
+
/**
|
|
513
|
+
* The event type
|
|
514
|
+
*/
|
|
515
|
+
type: 'subscription.active';
|
|
516
|
+
}
|
|
517
|
+
export declare namespace SubscriptionActiveWebhookEvent {
|
|
518
|
+
/**
|
|
519
|
+
* Event-specific data
|
|
520
|
+
*/
|
|
521
|
+
interface Data extends SubscriptionsAPI.Subscription {
|
|
522
|
+
/**
|
|
523
|
+
* The type of payload in the data field
|
|
524
|
+
*/
|
|
525
|
+
payload_type?: 'Subscription';
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
export interface SubscriptionCancelledWebhookEvent {
|
|
529
|
+
/**
|
|
530
|
+
* The business identifier
|
|
531
|
+
*/
|
|
532
|
+
business_id: string;
|
|
533
|
+
/**
|
|
534
|
+
* Event-specific data
|
|
535
|
+
*/
|
|
536
|
+
data: SubscriptionCancelledWebhookEvent.Data;
|
|
537
|
+
/**
|
|
538
|
+
* The timestamp of when the event occurred
|
|
539
|
+
*/
|
|
540
|
+
timestamp: string;
|
|
541
|
+
/**
|
|
542
|
+
* The event type
|
|
543
|
+
*/
|
|
544
|
+
type: 'subscription.cancelled';
|
|
545
|
+
}
|
|
546
|
+
export declare namespace SubscriptionCancelledWebhookEvent {
|
|
547
|
+
/**
|
|
548
|
+
* Event-specific data
|
|
549
|
+
*/
|
|
550
|
+
interface Data extends SubscriptionsAPI.Subscription {
|
|
551
|
+
/**
|
|
552
|
+
* The type of payload in the data field
|
|
553
|
+
*/
|
|
554
|
+
payload_type?: 'Subscription';
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
export interface SubscriptionExpiredWebhookEvent {
|
|
558
|
+
/**
|
|
559
|
+
* The business identifier
|
|
560
|
+
*/
|
|
561
|
+
business_id: string;
|
|
562
|
+
/**
|
|
563
|
+
* Event-specific data
|
|
564
|
+
*/
|
|
565
|
+
data: SubscriptionExpiredWebhookEvent.Data;
|
|
566
|
+
/**
|
|
567
|
+
* The timestamp of when the event occurred
|
|
568
|
+
*/
|
|
569
|
+
timestamp: string;
|
|
570
|
+
/**
|
|
571
|
+
* The event type
|
|
572
|
+
*/
|
|
573
|
+
type: 'subscription.expired';
|
|
574
|
+
}
|
|
575
|
+
export declare namespace SubscriptionExpiredWebhookEvent {
|
|
576
|
+
/**
|
|
577
|
+
* Event-specific data
|
|
578
|
+
*/
|
|
579
|
+
interface Data extends SubscriptionsAPI.Subscription {
|
|
580
|
+
/**
|
|
581
|
+
* The type of payload in the data field
|
|
582
|
+
*/
|
|
583
|
+
payload_type?: 'Subscription';
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
export interface SubscriptionFailedWebhookEvent {
|
|
587
|
+
/**
|
|
588
|
+
* The business identifier
|
|
589
|
+
*/
|
|
590
|
+
business_id: string;
|
|
591
|
+
/**
|
|
592
|
+
* Event-specific data
|
|
593
|
+
*/
|
|
594
|
+
data: SubscriptionFailedWebhookEvent.Data;
|
|
595
|
+
/**
|
|
596
|
+
* The timestamp of when the event occurred
|
|
597
|
+
*/
|
|
598
|
+
timestamp: string;
|
|
599
|
+
/**
|
|
600
|
+
* The event type
|
|
601
|
+
*/
|
|
602
|
+
type: 'subscription.failed';
|
|
603
|
+
}
|
|
604
|
+
export declare namespace SubscriptionFailedWebhookEvent {
|
|
605
|
+
/**
|
|
606
|
+
* Event-specific data
|
|
607
|
+
*/
|
|
608
|
+
interface Data extends SubscriptionsAPI.Subscription {
|
|
609
|
+
/**
|
|
610
|
+
* The type of payload in the data field
|
|
611
|
+
*/
|
|
612
|
+
payload_type?: 'Subscription';
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
export interface SubscriptionOnHoldWebhookEvent {
|
|
616
|
+
/**
|
|
617
|
+
* The business identifier
|
|
618
|
+
*/
|
|
619
|
+
business_id: string;
|
|
620
|
+
/**
|
|
621
|
+
* Event-specific data
|
|
622
|
+
*/
|
|
623
|
+
data: SubscriptionOnHoldWebhookEvent.Data;
|
|
624
|
+
/**
|
|
625
|
+
* The timestamp of when the event occurred
|
|
626
|
+
*/
|
|
627
|
+
timestamp: string;
|
|
628
|
+
/**
|
|
629
|
+
* The event type
|
|
630
|
+
*/
|
|
631
|
+
type: 'subscription.on_hold';
|
|
632
|
+
}
|
|
633
|
+
export declare namespace SubscriptionOnHoldWebhookEvent {
|
|
634
|
+
/**
|
|
635
|
+
* Event-specific data
|
|
636
|
+
*/
|
|
637
|
+
interface Data extends SubscriptionsAPI.Subscription {
|
|
638
|
+
/**
|
|
639
|
+
* The type of payload in the data field
|
|
640
|
+
*/
|
|
641
|
+
payload_type?: 'Subscription';
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
export interface SubscriptionPlanChangedWebhookEvent {
|
|
645
|
+
/**
|
|
646
|
+
* The business identifier
|
|
647
|
+
*/
|
|
648
|
+
business_id: string;
|
|
649
|
+
/**
|
|
650
|
+
* Event-specific data
|
|
651
|
+
*/
|
|
652
|
+
data: SubscriptionPlanChangedWebhookEvent.Data;
|
|
653
|
+
/**
|
|
654
|
+
* The timestamp of when the event occurred
|
|
655
|
+
*/
|
|
656
|
+
timestamp: string;
|
|
657
|
+
/**
|
|
658
|
+
* The event type
|
|
659
|
+
*/
|
|
660
|
+
type: 'subscription.plan_changed';
|
|
661
|
+
}
|
|
662
|
+
export declare namespace SubscriptionPlanChangedWebhookEvent {
|
|
663
|
+
/**
|
|
664
|
+
* Event-specific data
|
|
665
|
+
*/
|
|
666
|
+
interface Data extends SubscriptionsAPI.Subscription {
|
|
667
|
+
/**
|
|
668
|
+
* The type of payload in the data field
|
|
669
|
+
*/
|
|
670
|
+
payload_type?: 'Subscription';
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
export interface SubscriptionRenewedWebhookEvent {
|
|
674
|
+
/**
|
|
675
|
+
* The business identifier
|
|
676
|
+
*/
|
|
677
|
+
business_id: string;
|
|
678
|
+
/**
|
|
679
|
+
* Event-specific data
|
|
680
|
+
*/
|
|
681
|
+
data: SubscriptionRenewedWebhookEvent.Data;
|
|
682
|
+
/**
|
|
683
|
+
* The timestamp of when the event occurred
|
|
684
|
+
*/
|
|
685
|
+
timestamp: string;
|
|
686
|
+
/**
|
|
687
|
+
* The event type
|
|
688
|
+
*/
|
|
689
|
+
type: 'subscription.renewed';
|
|
690
|
+
}
|
|
691
|
+
export declare namespace SubscriptionRenewedWebhookEvent {
|
|
692
|
+
/**
|
|
693
|
+
* Event-specific data
|
|
694
|
+
*/
|
|
695
|
+
interface Data extends SubscriptionsAPI.Subscription {
|
|
696
|
+
/**
|
|
697
|
+
* The type of payload in the data field
|
|
698
|
+
*/
|
|
699
|
+
payload_type?: 'Subscription';
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
export interface DisputeAcceptedWebhookEvent {
|
|
703
|
+
/**
|
|
704
|
+
* The business identifier
|
|
705
|
+
*/
|
|
706
|
+
business_id: string;
|
|
707
|
+
/**
|
|
708
|
+
* Event-specific data
|
|
709
|
+
*/
|
|
710
|
+
data: DisputeAcceptedWebhookEvent.Data;
|
|
711
|
+
/**
|
|
712
|
+
* The timestamp of when the event occurred
|
|
713
|
+
*/
|
|
714
|
+
timestamp: string;
|
|
715
|
+
/**
|
|
716
|
+
* The event type
|
|
717
|
+
*/
|
|
718
|
+
type: 'dispute.accepted';
|
|
719
|
+
}
|
|
720
|
+
export declare namespace DisputeAcceptedWebhookEvent {
|
|
721
|
+
/**
|
|
722
|
+
* Event-specific data
|
|
723
|
+
*/
|
|
724
|
+
interface Data extends DisputesAPI.Dispute {
|
|
725
|
+
/**
|
|
726
|
+
* The type of payload in the data field
|
|
727
|
+
*/
|
|
728
|
+
payload_type?: 'Dispute';
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
export interface DisputeCancelledWebhookEvent {
|
|
732
|
+
/**
|
|
733
|
+
* The business identifier
|
|
734
|
+
*/
|
|
735
|
+
business_id: string;
|
|
736
|
+
/**
|
|
737
|
+
* Event-specific data
|
|
738
|
+
*/
|
|
739
|
+
data: DisputeCancelledWebhookEvent.Data;
|
|
740
|
+
/**
|
|
741
|
+
* The timestamp of when the event occurred
|
|
742
|
+
*/
|
|
743
|
+
timestamp: string;
|
|
744
|
+
/**
|
|
745
|
+
* The event type
|
|
746
|
+
*/
|
|
747
|
+
type: 'dispute.cancelled';
|
|
748
|
+
}
|
|
749
|
+
export declare namespace DisputeCancelledWebhookEvent {
|
|
750
|
+
/**
|
|
751
|
+
* Event-specific data
|
|
752
|
+
*/
|
|
753
|
+
interface Data extends DisputesAPI.Dispute {
|
|
754
|
+
/**
|
|
755
|
+
* The type of payload in the data field
|
|
756
|
+
*/
|
|
757
|
+
payload_type?: 'Dispute';
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
export interface DisputeChallengedWebhookEvent {
|
|
761
|
+
/**
|
|
762
|
+
* The business identifier
|
|
763
|
+
*/
|
|
764
|
+
business_id: string;
|
|
765
|
+
/**
|
|
766
|
+
* Event-specific data
|
|
767
|
+
*/
|
|
768
|
+
data: DisputeChallengedWebhookEvent.Data;
|
|
769
|
+
/**
|
|
770
|
+
* The timestamp of when the event occurred
|
|
771
|
+
*/
|
|
772
|
+
timestamp: string;
|
|
773
|
+
/**
|
|
774
|
+
* The event type
|
|
775
|
+
*/
|
|
776
|
+
type: 'dispute.challenged';
|
|
777
|
+
}
|
|
778
|
+
export declare namespace DisputeChallengedWebhookEvent {
|
|
779
|
+
/**
|
|
780
|
+
* Event-specific data
|
|
781
|
+
*/
|
|
782
|
+
interface Data extends DisputesAPI.Dispute {
|
|
783
|
+
/**
|
|
784
|
+
* The type of payload in the data field
|
|
785
|
+
*/
|
|
786
|
+
payload_type?: 'Dispute';
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
export interface DisputeExpiredWebhookEvent {
|
|
790
|
+
/**
|
|
791
|
+
* The business identifier
|
|
792
|
+
*/
|
|
793
|
+
business_id: string;
|
|
794
|
+
/**
|
|
795
|
+
* Event-specific data
|
|
796
|
+
*/
|
|
797
|
+
data: DisputeExpiredWebhookEvent.Data;
|
|
798
|
+
/**
|
|
799
|
+
* The timestamp of when the event occurred
|
|
800
|
+
*/
|
|
801
|
+
timestamp: string;
|
|
802
|
+
/**
|
|
803
|
+
* The event type
|
|
804
|
+
*/
|
|
805
|
+
type: 'dispute.expired';
|
|
806
|
+
}
|
|
807
|
+
export declare namespace DisputeExpiredWebhookEvent {
|
|
808
|
+
/**
|
|
809
|
+
* Event-specific data
|
|
810
|
+
*/
|
|
811
|
+
interface Data extends DisputesAPI.Dispute {
|
|
812
|
+
/**
|
|
813
|
+
* The type of payload in the data field
|
|
814
|
+
*/
|
|
815
|
+
payload_type?: 'Dispute';
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
export interface DisputeLostWebhookEvent {
|
|
819
|
+
/**
|
|
820
|
+
* The business identifier
|
|
821
|
+
*/
|
|
822
|
+
business_id: string;
|
|
823
|
+
/**
|
|
824
|
+
* Event-specific data
|
|
825
|
+
*/
|
|
826
|
+
data: DisputeLostWebhookEvent.Data;
|
|
827
|
+
/**
|
|
828
|
+
* The timestamp of when the event occurred
|
|
829
|
+
*/
|
|
830
|
+
timestamp: string;
|
|
831
|
+
/**
|
|
832
|
+
* The event type
|
|
833
|
+
*/
|
|
834
|
+
type: 'dispute.lost';
|
|
835
|
+
}
|
|
836
|
+
export declare namespace DisputeLostWebhookEvent {
|
|
837
|
+
/**
|
|
838
|
+
* Event-specific data
|
|
839
|
+
*/
|
|
840
|
+
interface Data extends DisputesAPI.Dispute {
|
|
841
|
+
/**
|
|
842
|
+
* The type of payload in the data field
|
|
843
|
+
*/
|
|
844
|
+
payload_type?: 'Dispute';
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
export interface DisputeOpenedWebhookEvent {
|
|
848
|
+
/**
|
|
849
|
+
* The business identifier
|
|
850
|
+
*/
|
|
851
|
+
business_id: string;
|
|
852
|
+
/**
|
|
853
|
+
* Event-specific data
|
|
854
|
+
*/
|
|
855
|
+
data: DisputeOpenedWebhookEvent.Data;
|
|
856
|
+
/**
|
|
857
|
+
* The timestamp of when the event occurred
|
|
858
|
+
*/
|
|
859
|
+
timestamp: string;
|
|
860
|
+
/**
|
|
861
|
+
* The event type
|
|
862
|
+
*/
|
|
863
|
+
type: 'dispute.opened';
|
|
864
|
+
}
|
|
865
|
+
export declare namespace DisputeOpenedWebhookEvent {
|
|
866
|
+
/**
|
|
867
|
+
* Event-specific data
|
|
868
|
+
*/
|
|
869
|
+
interface Data extends DisputesAPI.Dispute {
|
|
870
|
+
/**
|
|
871
|
+
* The type of payload in the data field
|
|
872
|
+
*/
|
|
873
|
+
payload_type?: 'Dispute';
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
export interface DisputeWonWebhookEvent {
|
|
877
|
+
/**
|
|
878
|
+
* The business identifier
|
|
879
|
+
*/
|
|
880
|
+
business_id: string;
|
|
881
|
+
/**
|
|
882
|
+
* Event-specific data
|
|
883
|
+
*/
|
|
884
|
+
data: DisputeWonWebhookEvent.Data;
|
|
885
|
+
/**
|
|
886
|
+
* The timestamp of when the event occurred
|
|
887
|
+
*/
|
|
888
|
+
timestamp: string;
|
|
889
|
+
/**
|
|
890
|
+
* The event type
|
|
891
|
+
*/
|
|
892
|
+
type: 'dispute.won';
|
|
893
|
+
}
|
|
894
|
+
export declare namespace DisputeWonWebhookEvent {
|
|
895
|
+
/**
|
|
896
|
+
* Event-specific data
|
|
897
|
+
*/
|
|
898
|
+
interface Data extends DisputesAPI.Dispute {
|
|
899
|
+
/**
|
|
900
|
+
* The type of payload in the data field
|
|
901
|
+
*/
|
|
902
|
+
payload_type?: 'Dispute';
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
export interface LicenseKeyCreatedWebhookEvent {
|
|
906
|
+
/**
|
|
907
|
+
* The business identifier
|
|
908
|
+
*/
|
|
909
|
+
business_id: string;
|
|
910
|
+
/**
|
|
911
|
+
* Event-specific data
|
|
912
|
+
*/
|
|
913
|
+
data: LicenseKeyCreatedWebhookEvent.Data;
|
|
914
|
+
/**
|
|
915
|
+
* The timestamp of when the event occurred
|
|
916
|
+
*/
|
|
917
|
+
timestamp: string;
|
|
918
|
+
/**
|
|
919
|
+
* The event type
|
|
920
|
+
*/
|
|
921
|
+
type: 'license_key.created';
|
|
922
|
+
}
|
|
923
|
+
export declare namespace LicenseKeyCreatedWebhookEvent {
|
|
924
|
+
/**
|
|
925
|
+
* Event-specific data
|
|
926
|
+
*/
|
|
927
|
+
interface Data extends LicenseKeysAPI.LicenseKey {
|
|
928
|
+
/**
|
|
929
|
+
* The type of payload in the data field
|
|
930
|
+
*/
|
|
931
|
+
payload_type?: 'LicenseKey';
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
export interface PaymentCancelledWebhookEvent {
|
|
935
|
+
/**
|
|
936
|
+
* The business identifier
|
|
937
|
+
*/
|
|
938
|
+
business_id: string;
|
|
939
|
+
/**
|
|
940
|
+
* Event-specific data
|
|
941
|
+
*/
|
|
942
|
+
data: PaymentCancelledWebhookEvent.Data;
|
|
943
|
+
/**
|
|
944
|
+
* The timestamp of when the event occurred
|
|
945
|
+
*/
|
|
946
|
+
timestamp: string;
|
|
947
|
+
/**
|
|
948
|
+
* The event type
|
|
949
|
+
*/
|
|
950
|
+
type: 'payment.cancelled';
|
|
951
|
+
}
|
|
952
|
+
export declare namespace PaymentCancelledWebhookEvent {
|
|
953
|
+
/**
|
|
954
|
+
* Event-specific data
|
|
955
|
+
*/
|
|
956
|
+
interface Data extends PaymentsAPI.Payment {
|
|
957
|
+
/**
|
|
958
|
+
* The type of payload in the data field
|
|
959
|
+
*/
|
|
960
|
+
payload_type?: 'Payment';
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
export interface PaymentFailedWebhookEvent {
|
|
964
|
+
/**
|
|
965
|
+
* The business identifier
|
|
966
|
+
*/
|
|
967
|
+
business_id: string;
|
|
968
|
+
/**
|
|
969
|
+
* Event-specific data
|
|
970
|
+
*/
|
|
971
|
+
data: PaymentFailedWebhookEvent.Data;
|
|
972
|
+
/**
|
|
973
|
+
* The timestamp of when the event occurred
|
|
974
|
+
*/
|
|
975
|
+
timestamp: string;
|
|
976
|
+
/**
|
|
977
|
+
* The event type
|
|
978
|
+
*/
|
|
979
|
+
type: 'payment.failed';
|
|
980
|
+
}
|
|
981
|
+
export declare namespace PaymentFailedWebhookEvent {
|
|
982
|
+
/**
|
|
983
|
+
* Event-specific data
|
|
984
|
+
*/
|
|
985
|
+
interface Data extends PaymentsAPI.Payment {
|
|
986
|
+
/**
|
|
987
|
+
* The type of payload in the data field
|
|
988
|
+
*/
|
|
989
|
+
payload_type?: 'Payment';
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
export interface PaymentProcessingWebhookEvent {
|
|
993
|
+
/**
|
|
994
|
+
* The business identifier
|
|
995
|
+
*/
|
|
996
|
+
business_id: string;
|
|
997
|
+
/**
|
|
998
|
+
* Event-specific data
|
|
999
|
+
*/
|
|
1000
|
+
data: PaymentProcessingWebhookEvent.Data;
|
|
1001
|
+
/**
|
|
1002
|
+
* The timestamp of when the event occurred
|
|
1003
|
+
*/
|
|
1004
|
+
timestamp: string;
|
|
1005
|
+
/**
|
|
1006
|
+
* The event type
|
|
1007
|
+
*/
|
|
1008
|
+
type: 'payment.processing';
|
|
1009
|
+
}
|
|
1010
|
+
export declare namespace PaymentProcessingWebhookEvent {
|
|
1011
|
+
/**
|
|
1012
|
+
* Event-specific data
|
|
1013
|
+
*/
|
|
1014
|
+
interface Data extends PaymentsAPI.Payment {
|
|
1015
|
+
/**
|
|
1016
|
+
* The type of payload in the data field
|
|
1017
|
+
*/
|
|
1018
|
+
payload_type?: 'Payment';
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
export interface PaymentSucceededWebhookEvent {
|
|
1022
|
+
/**
|
|
1023
|
+
* The business identifier
|
|
1024
|
+
*/
|
|
1025
|
+
business_id: string;
|
|
1026
|
+
/**
|
|
1027
|
+
* Event-specific data
|
|
1028
|
+
*/
|
|
1029
|
+
data: PaymentSucceededWebhookEvent.Data;
|
|
1030
|
+
/**
|
|
1031
|
+
* The timestamp of when the event occurred
|
|
1032
|
+
*/
|
|
1033
|
+
timestamp: string;
|
|
1034
|
+
/**
|
|
1035
|
+
* The event type
|
|
1036
|
+
*/
|
|
1037
|
+
type: 'payment.succeeded';
|
|
1038
|
+
}
|
|
1039
|
+
export declare namespace PaymentSucceededWebhookEvent {
|
|
1040
|
+
/**
|
|
1041
|
+
* Event-specific data
|
|
1042
|
+
*/
|
|
1043
|
+
interface Data extends PaymentsAPI.Payment {
|
|
1044
|
+
/**
|
|
1045
|
+
* The type of payload in the data field
|
|
1046
|
+
*/
|
|
1047
|
+
payload_type?: 'Payment';
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
export interface RefundFailedWebhookEvent {
|
|
1051
|
+
/**
|
|
1052
|
+
* The business identifier
|
|
1053
|
+
*/
|
|
1054
|
+
business_id: string;
|
|
1055
|
+
/**
|
|
1056
|
+
* Event-specific data
|
|
1057
|
+
*/
|
|
1058
|
+
data: RefundFailedWebhookEvent.Data;
|
|
1059
|
+
/**
|
|
1060
|
+
* The timestamp of when the event occurred
|
|
1061
|
+
*/
|
|
1062
|
+
timestamp: string;
|
|
1063
|
+
/**
|
|
1064
|
+
* The event type
|
|
1065
|
+
*/
|
|
1066
|
+
type: 'refund.failed';
|
|
1067
|
+
}
|
|
1068
|
+
export declare namespace RefundFailedWebhookEvent {
|
|
1069
|
+
/**
|
|
1070
|
+
* Event-specific data
|
|
1071
|
+
*/
|
|
1072
|
+
interface Data extends RefundsAPI.Refund {
|
|
1073
|
+
/**
|
|
1074
|
+
* The type of payload in the data field
|
|
1075
|
+
*/
|
|
1076
|
+
payload_type?: 'Refund';
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
export interface RefundSucceededWebhookEvent {
|
|
1080
|
+
/**
|
|
1081
|
+
* The business identifier
|
|
1082
|
+
*/
|
|
1083
|
+
business_id: string;
|
|
1084
|
+
/**
|
|
1085
|
+
* Event-specific data
|
|
1086
|
+
*/
|
|
1087
|
+
data: RefundSucceededWebhookEvent.Data;
|
|
1088
|
+
/**
|
|
1089
|
+
* The timestamp of when the event occurred
|
|
1090
|
+
*/
|
|
1091
|
+
timestamp: string;
|
|
1092
|
+
/**
|
|
1093
|
+
* The event type
|
|
1094
|
+
*/
|
|
1095
|
+
type: 'refund.succeeded';
|
|
1096
|
+
}
|
|
1097
|
+
export declare namespace RefundSucceededWebhookEvent {
|
|
1098
|
+
/**
|
|
1099
|
+
* Event-specific data
|
|
1100
|
+
*/
|
|
1101
|
+
interface Data extends RefundsAPI.Refund {
|
|
1102
|
+
/**
|
|
1103
|
+
* The type of payload in the data field
|
|
1104
|
+
*/
|
|
1105
|
+
payload_type?: 'Refund';
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
export interface SubscriptionActiveWebhookEvent {
|
|
1109
|
+
/**
|
|
1110
|
+
* The business identifier
|
|
1111
|
+
*/
|
|
1112
|
+
business_id: string;
|
|
1113
|
+
/**
|
|
1114
|
+
* Event-specific data
|
|
1115
|
+
*/
|
|
1116
|
+
data: SubscriptionActiveWebhookEvent.Data;
|
|
1117
|
+
/**
|
|
1118
|
+
* The timestamp of when the event occurred
|
|
1119
|
+
*/
|
|
1120
|
+
timestamp: string;
|
|
1121
|
+
/**
|
|
1122
|
+
* The event type
|
|
1123
|
+
*/
|
|
1124
|
+
type: 'subscription.active';
|
|
1125
|
+
}
|
|
1126
|
+
export declare namespace SubscriptionActiveWebhookEvent {
|
|
1127
|
+
/**
|
|
1128
|
+
* Event-specific data
|
|
1129
|
+
*/
|
|
1130
|
+
interface Data extends SubscriptionsAPI.Subscription {
|
|
1131
|
+
/**
|
|
1132
|
+
* The type of payload in the data field
|
|
1133
|
+
*/
|
|
1134
|
+
payload_type?: 'Subscription';
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
export interface SubscriptionCancelledWebhookEvent {
|
|
1138
|
+
/**
|
|
1139
|
+
* The business identifier
|
|
1140
|
+
*/
|
|
1141
|
+
business_id: string;
|
|
1142
|
+
/**
|
|
1143
|
+
* Event-specific data
|
|
1144
|
+
*/
|
|
1145
|
+
data: SubscriptionCancelledWebhookEvent.Data;
|
|
1146
|
+
/**
|
|
1147
|
+
* The timestamp of when the event occurred
|
|
1148
|
+
*/
|
|
1149
|
+
timestamp: string;
|
|
1150
|
+
/**
|
|
1151
|
+
* The event type
|
|
1152
|
+
*/
|
|
1153
|
+
type: 'subscription.cancelled';
|
|
1154
|
+
}
|
|
1155
|
+
export declare namespace SubscriptionCancelledWebhookEvent {
|
|
1156
|
+
/**
|
|
1157
|
+
* Event-specific data
|
|
1158
|
+
*/
|
|
1159
|
+
interface Data extends SubscriptionsAPI.Subscription {
|
|
1160
|
+
/**
|
|
1161
|
+
* The type of payload in the data field
|
|
1162
|
+
*/
|
|
1163
|
+
payload_type?: 'Subscription';
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
export interface SubscriptionExpiredWebhookEvent {
|
|
1167
|
+
/**
|
|
1168
|
+
* The business identifier
|
|
1169
|
+
*/
|
|
1170
|
+
business_id: string;
|
|
1171
|
+
/**
|
|
1172
|
+
* Event-specific data
|
|
1173
|
+
*/
|
|
1174
|
+
data: SubscriptionExpiredWebhookEvent.Data;
|
|
1175
|
+
/**
|
|
1176
|
+
* The timestamp of when the event occurred
|
|
1177
|
+
*/
|
|
1178
|
+
timestamp: string;
|
|
1179
|
+
/**
|
|
1180
|
+
* The event type
|
|
1181
|
+
*/
|
|
1182
|
+
type: 'subscription.expired';
|
|
1183
|
+
}
|
|
1184
|
+
export declare namespace SubscriptionExpiredWebhookEvent {
|
|
1185
|
+
/**
|
|
1186
|
+
* Event-specific data
|
|
1187
|
+
*/
|
|
1188
|
+
interface Data extends SubscriptionsAPI.Subscription {
|
|
1189
|
+
/**
|
|
1190
|
+
* The type of payload in the data field
|
|
1191
|
+
*/
|
|
1192
|
+
payload_type?: 'Subscription';
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
export interface SubscriptionFailedWebhookEvent {
|
|
1196
|
+
/**
|
|
1197
|
+
* The business identifier
|
|
1198
|
+
*/
|
|
1199
|
+
business_id: string;
|
|
1200
|
+
/**
|
|
1201
|
+
* Event-specific data
|
|
1202
|
+
*/
|
|
1203
|
+
data: SubscriptionFailedWebhookEvent.Data;
|
|
1204
|
+
/**
|
|
1205
|
+
* The timestamp of when the event occurred
|
|
1206
|
+
*/
|
|
1207
|
+
timestamp: string;
|
|
1208
|
+
/**
|
|
1209
|
+
* The event type
|
|
1210
|
+
*/
|
|
1211
|
+
type: 'subscription.failed';
|
|
1212
|
+
}
|
|
1213
|
+
export declare namespace SubscriptionFailedWebhookEvent {
|
|
1214
|
+
/**
|
|
1215
|
+
* Event-specific data
|
|
1216
|
+
*/
|
|
1217
|
+
interface Data extends SubscriptionsAPI.Subscription {
|
|
1218
|
+
/**
|
|
1219
|
+
* The type of payload in the data field
|
|
1220
|
+
*/
|
|
1221
|
+
payload_type?: 'Subscription';
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
export interface SubscriptionOnHoldWebhookEvent {
|
|
1225
|
+
/**
|
|
1226
|
+
* The business identifier
|
|
1227
|
+
*/
|
|
1228
|
+
business_id: string;
|
|
1229
|
+
/**
|
|
1230
|
+
* Event-specific data
|
|
1231
|
+
*/
|
|
1232
|
+
data: SubscriptionOnHoldWebhookEvent.Data;
|
|
1233
|
+
/**
|
|
1234
|
+
* The timestamp of when the event occurred
|
|
1235
|
+
*/
|
|
1236
|
+
timestamp: string;
|
|
1237
|
+
/**
|
|
1238
|
+
* The event type
|
|
1239
|
+
*/
|
|
1240
|
+
type: 'subscription.on_hold';
|
|
1241
|
+
}
|
|
1242
|
+
export declare namespace SubscriptionOnHoldWebhookEvent {
|
|
1243
|
+
/**
|
|
1244
|
+
* Event-specific data
|
|
1245
|
+
*/
|
|
1246
|
+
interface Data extends SubscriptionsAPI.Subscription {
|
|
1247
|
+
/**
|
|
1248
|
+
* The type of payload in the data field
|
|
1249
|
+
*/
|
|
1250
|
+
payload_type?: 'Subscription';
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
export interface SubscriptionPlanChangedWebhookEvent {
|
|
1254
|
+
/**
|
|
1255
|
+
* The business identifier
|
|
1256
|
+
*/
|
|
1257
|
+
business_id: string;
|
|
1258
|
+
/**
|
|
1259
|
+
* Event-specific data
|
|
1260
|
+
*/
|
|
1261
|
+
data: SubscriptionPlanChangedWebhookEvent.Data;
|
|
1262
|
+
/**
|
|
1263
|
+
* The timestamp of when the event occurred
|
|
1264
|
+
*/
|
|
1265
|
+
timestamp: string;
|
|
1266
|
+
/**
|
|
1267
|
+
* The event type
|
|
1268
|
+
*/
|
|
1269
|
+
type: 'subscription.plan_changed';
|
|
1270
|
+
}
|
|
1271
|
+
export declare namespace SubscriptionPlanChangedWebhookEvent {
|
|
1272
|
+
/**
|
|
1273
|
+
* Event-specific data
|
|
1274
|
+
*/
|
|
1275
|
+
interface Data extends SubscriptionsAPI.Subscription {
|
|
1276
|
+
/**
|
|
1277
|
+
* The type of payload in the data field
|
|
1278
|
+
*/
|
|
1279
|
+
payload_type?: 'Subscription';
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
export interface SubscriptionRenewedWebhookEvent {
|
|
1283
|
+
/**
|
|
1284
|
+
* The business identifier
|
|
1285
|
+
*/
|
|
1286
|
+
business_id: string;
|
|
1287
|
+
/**
|
|
1288
|
+
* Event-specific data
|
|
1289
|
+
*/
|
|
1290
|
+
data: SubscriptionRenewedWebhookEvent.Data;
|
|
1291
|
+
/**
|
|
1292
|
+
* The timestamp of when the event occurred
|
|
1293
|
+
*/
|
|
1294
|
+
timestamp: string;
|
|
1295
|
+
/**
|
|
1296
|
+
* The event type
|
|
1297
|
+
*/
|
|
1298
|
+
type: 'subscription.renewed';
|
|
1299
|
+
}
|
|
1300
|
+
export declare namespace SubscriptionRenewedWebhookEvent {
|
|
1301
|
+
/**
|
|
1302
|
+
* Event-specific data
|
|
1303
|
+
*/
|
|
1304
|
+
interface Data extends SubscriptionsAPI.Subscription {
|
|
1305
|
+
/**
|
|
1306
|
+
* The type of payload in the data field
|
|
1307
|
+
*/
|
|
1308
|
+
payload_type?: 'Subscription';
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
export type UnsafeUnwrapWebhookEvent = DisputeAcceptedWebhookEvent | DisputeCancelledWebhookEvent | DisputeChallengedWebhookEvent | DisputeExpiredWebhookEvent | DisputeLostWebhookEvent | DisputeOpenedWebhookEvent | DisputeWonWebhookEvent | LicenseKeyCreatedWebhookEvent | PaymentCancelledWebhookEvent | PaymentFailedWebhookEvent | PaymentProcessingWebhookEvent | PaymentSucceededWebhookEvent | RefundFailedWebhookEvent | RefundSucceededWebhookEvent | SubscriptionActiveWebhookEvent | SubscriptionCancelledWebhookEvent | SubscriptionExpiredWebhookEvent | SubscriptionFailedWebhookEvent | SubscriptionOnHoldWebhookEvent | SubscriptionPlanChangedWebhookEvent | SubscriptionRenewedWebhookEvent;
|
|
1312
|
+
export type UnwrapWebhookEvent = DisputeAcceptedWebhookEvent | DisputeCancelledWebhookEvent | DisputeChallengedWebhookEvent | DisputeExpiredWebhookEvent | DisputeLostWebhookEvent | DisputeOpenedWebhookEvent | DisputeWonWebhookEvent | LicenseKeyCreatedWebhookEvent | PaymentCancelledWebhookEvent | PaymentFailedWebhookEvent | PaymentProcessingWebhookEvent | PaymentSucceededWebhookEvent | RefundFailedWebhookEvent | RefundSucceededWebhookEvent | SubscriptionActiveWebhookEvent | SubscriptionCancelledWebhookEvent | SubscriptionExpiredWebhookEvent | SubscriptionFailedWebhookEvent | SubscriptionOnHoldWebhookEvent | SubscriptionPlanChangedWebhookEvent | SubscriptionRenewedWebhookEvent;
|
|
83
1313
|
export interface WebhookCreateParams {
|
|
84
1314
|
/**
|
|
85
1315
|
* Url of the webhook
|
|
@@ -149,7 +1379,7 @@ export interface WebhookUpdateParams {
|
|
|
149
1379
|
export interface WebhookListParams extends CursorPagePaginationParams {
|
|
150
1380
|
}
|
|
151
1381
|
export declare namespace Webhooks {
|
|
152
|
-
export { type WebhookDetails as WebhookDetails, type WebhookRetrieveSecretResponse as WebhookRetrieveSecretResponse, type WebhookDetailsCursorPagePagination as WebhookDetailsCursorPagePagination, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, };
|
|
1382
|
+
export { type WebhookDetails as WebhookDetails, type WebhookRetrieveSecretResponse as WebhookRetrieveSecretResponse, type DisputeAcceptedWebhookEvent as DisputeAcceptedWebhookEvent, type DisputeCancelledWebhookEvent as DisputeCancelledWebhookEvent, type DisputeChallengedWebhookEvent as DisputeChallengedWebhookEvent, type DisputeExpiredWebhookEvent as DisputeExpiredWebhookEvent, type DisputeLostWebhookEvent as DisputeLostWebhookEvent, type DisputeOpenedWebhookEvent as DisputeOpenedWebhookEvent, type DisputeWonWebhookEvent as DisputeWonWebhookEvent, type LicenseKeyCreatedWebhookEvent as LicenseKeyCreatedWebhookEvent, type PaymentCancelledWebhookEvent as PaymentCancelledWebhookEvent, type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent, type PaymentProcessingWebhookEvent as PaymentProcessingWebhookEvent, type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent, type RefundFailedWebhookEvent as RefundFailedWebhookEvent, type RefundSucceededWebhookEvent as RefundSucceededWebhookEvent, type SubscriptionActiveWebhookEvent as SubscriptionActiveWebhookEvent, type SubscriptionCancelledWebhookEvent as SubscriptionCancelledWebhookEvent, type SubscriptionExpiredWebhookEvent as SubscriptionExpiredWebhookEvent, type SubscriptionFailedWebhookEvent as SubscriptionFailedWebhookEvent, type SubscriptionOnHoldWebhookEvent as SubscriptionOnHoldWebhookEvent, type SubscriptionPlanChangedWebhookEvent as SubscriptionPlanChangedWebhookEvent, type SubscriptionRenewedWebhookEvent as SubscriptionRenewedWebhookEvent, type UnsafeUnwrapWebhookEvent as UnsafeUnwrapWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, type WebhookDetailsCursorPagePagination as WebhookDetailsCursorPagePagination, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, };
|
|
153
1383
|
export { Headers as Headers, type HeaderRetrieveResponse as HeaderRetrieveResponse, type HeaderUpdateParams as HeaderUpdateParams, };
|
|
154
1384
|
}
|
|
155
1385
|
//# sourceMappingURL=webhooks.d.mts.map
|