@checkoutpage/sdk 0.1.2 → 0.1.11

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/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- interface CheckoutPageClientOptions {
1
+ interface CheckoutPageApiClientOptions {
2
2
  apiKey: string;
3
3
  baseUrl?: string;
4
4
  }
@@ -8,18 +8,503 @@ interface RequestOptions {
8
8
  body?: unknown;
9
9
  query?: Record<string, string | number | boolean | undefined>;
10
10
  }
11
- declare class CheckoutPageClient {
11
+ declare class CheckoutPageApiClient {
12
12
  private readonly apiKey;
13
13
  private readonly baseUrl;
14
- constructor(options: CheckoutPageClientOptions);
14
+ constructor(options: CheckoutPageApiClientOptions);
15
15
  request<T>(options: RequestOptions): Promise<T>;
16
16
  private buildUrl;
17
17
  private handleResponse;
18
18
  private extractErrorMessage;
19
19
  }
20
20
 
21
+ interface components {
22
+ schemas: {
23
+ /** NotFoundResponse */
24
+ NotFoundResponse: {
25
+ message: string;
26
+ };
27
+ /** Ticket */
28
+ Ticket: Record<string, never>;
29
+ /** @example 6812fe6e9f39b6760576f01c */
30
+ PageId: string;
31
+ /** @example 6812fe6e9f39b6760576f01c */
32
+ TicketId: string;
33
+ /** @example 6812fe6e9f39b6760576f01c */
34
+ CustomerId: string;
35
+ /** @example 6812fe6e9f39b6760576f01c */
36
+ SellerId: string;
37
+ /** @example 6812fe6e9f39b6760576f01c */
38
+ ChargeId: string;
39
+ /** @example 6812fe6e9f39b6760576f01c */
40
+ SubscriptionId: string;
41
+ /** @example 6812fe6e9f39b6760576f01c */
42
+ SubscriptionPaymentId: string;
43
+ /** @example 6812fe6e9f39b6760576f01c */
44
+ ApiKeyId: string;
45
+ Booking: {
46
+ id: string;
47
+ orderId?: string;
48
+ orderStatus?: string;
49
+ customerEmail?: string;
50
+ customerId?: string;
51
+ sellerId?: string;
52
+ pageId?: string;
53
+ currency?: string;
54
+ /** @description The total amount intended to be collected. */
55
+ amount: number;
56
+ /** @description The amount of money paid toward the total. */
57
+ amountPaid?: number;
58
+ /** @description The outstanding amount of money to be paid. */
59
+ amountDue?: number;
60
+ amountUsd?: number;
61
+ amountExcludingTax?: number;
62
+ taxAmount?: number;
63
+ taxBreakdown: {
64
+ taxType?: string;
65
+ taxabilityReason?: string;
66
+ taxableAmount?: number;
67
+ taxAmount?: number;
68
+ taxRateDetails?: {
69
+ country?: string;
70
+ percentageDecimal?: number;
71
+ state?: string;
72
+ taxType?: string;
73
+ };
74
+ }[];
75
+ stripeTaxCalculationId?: string;
76
+ stripeTaxTransactionId?: string;
77
+ dynamicPrice?: number;
78
+ fees?: {
79
+ name?: string;
80
+ amount?: number;
81
+ percentage?: number;
82
+ }[];
83
+ billing?: {
84
+ name?: string;
85
+ companyName?: string;
86
+ email?: string;
87
+ billingEmail?: string;
88
+ phone?: string;
89
+ address?: {
90
+ line1?: string;
91
+ line2?: string;
92
+ city?: string;
93
+ state?: string;
94
+ postalCode?: string;
95
+ country?: string;
96
+ };
97
+ };
98
+ shipping?: {
99
+ name?: string;
100
+ phone?: string;
101
+ address?: {
102
+ line1?: string;
103
+ line2?: string;
104
+ city?: string;
105
+ state?: string;
106
+ postalCode?: string;
107
+ country?: string;
108
+ };
109
+ };
110
+ fields?: {
111
+ fieldId?: string;
112
+ label?: string;
113
+ value?: string;
114
+ /** @enum {string} */
115
+ element?: "checkbox" | "quantity" | "multiple-choice" | "select" | "po-number" | "text" | "textarea" | "number" | "date-time" | "date" | "time" | "email" | "tax-id" | "phone" | "country";
116
+ /** @enum {string} */
117
+ type?: "" | "company-name" | "po-number" | "name" | "first-name" | "last-name" | "email" | "billing-email" | "phone" | "address-line1" | "address-city" | "address-country" | "address-line2" | "address-postal_code" | "address-state" | "shipping-name" | "shipping-phone" | "shipping-address-line1" | "shipping-address-city" | "shipping-address-country" | "shipping-address-line2" | "shipping-address-postal_code" | "shipping-address-state" | "tax-id";
118
+ meta?: string;
119
+ reference?: string;
120
+ }[];
121
+ coupon?: {
122
+ id?: string;
123
+ label?: string;
124
+ code?: string;
125
+ amountOff?: number;
126
+ percentOff?: number;
127
+ discount?: number;
128
+ };
129
+ discount?: {
130
+ minQuantity?: number;
131
+ maxQuantity?: number;
132
+ percentOff?: number;
133
+ amountOff?: number;
134
+ amount?: number;
135
+ };
136
+ livemode?: boolean;
137
+ /** @enum {string} */
138
+ status: "created" | "pending" | "unpaid" | "partially_paid" | "paid" | "canceled" | "failed" | "partial_refund" | "refunded" | "draft" | "draft_expired";
139
+ paymentError?: string;
140
+ paymentMethod?: {
141
+ /** @enum {string} */
142
+ gateway?: "stripe" | "paypal" | "manual";
143
+ method?: string;
144
+ wallet?: string;
145
+ /** @enum {string} */
146
+ mode?: "default" | "express";
147
+ brand?: string;
148
+ last4?: string;
149
+ country?: string;
150
+ exp_month?: number;
151
+ exp_year?: number;
152
+ funding?: string;
153
+ };
154
+ paymentOption?: {
155
+ /** @enum {string} */
156
+ type?: "manual" | "partial" | "full";
157
+ name?: string;
158
+ description?: string;
159
+ instructions?: string;
160
+ partialAmount?: number;
161
+ /** @enum {string} */
162
+ manualType?: "invoice" | "cash_on_delivery";
163
+ };
164
+ locale?: string;
165
+ sessionId?: string;
166
+ userAgent?: string;
167
+ screenWidth?: number;
168
+ visitId?: string;
169
+ queryParameters?: {
170
+ [key: string]: string;
171
+ };
172
+ stripePaymentIntentId?: string;
173
+ stripePaymentIntentClientSecret?: string;
174
+ stripeChargeId?: string;
175
+ upsell?: boolean;
176
+ upsellPageId?: string;
177
+ upsellChargeId?: string;
178
+ upsellSubscriptionId?: string;
179
+ invoiceId?: string;
180
+ transactionIds?: string[];
181
+ /** @description The date this was canceled. */
182
+ canceledAt?: string;
183
+ /** @description The userId that canceled this. If this is a booking, tickets were canceled in addition. */
184
+ canceledBy?: string;
185
+ /** @description The reason for the cancellation */
186
+ canceledReason?: string;
187
+ isAbandoned?: boolean;
188
+ /**
189
+ * Format: date-time
190
+ * @description The date at which the customer recovered their checkout through cart abandonment.
191
+ */
192
+ recoveredAt?: string;
193
+ /** @enum {string} */
194
+ abandonedCartEmailStatus?: "pending" | "first_sent" | "second_sent" | "third_sent" | "skipped";
195
+ /** Format: date-time */
196
+ abandonedCartEmailSentAt?: string;
197
+ /** Format: date-time */
198
+ createdAt: string;
199
+ /** Format: date-time */
200
+ updatedAt: string;
201
+ tickets?: {
202
+ name?: string;
203
+ ticketTypeId?: string;
204
+ capacity?: number;
205
+ reference?: string;
206
+ ticketGroupId?: string;
207
+ ticketGroupName?: string;
208
+ ticketGroupCapacity?: number;
209
+ ticketGroupReference?: string;
210
+ quantity?: number;
211
+ price?: number;
212
+ originalPrice?: number;
213
+ bookingFeeAmount?: number;
214
+ discount?: {
215
+ minQuantity?: number;
216
+ maxQuantity?: number;
217
+ percentOff?: number;
218
+ amountOff?: number;
219
+ amount?: number;
220
+ };
221
+ }[];
222
+ };
223
+ Customer: {
224
+ id: string;
225
+ name?: string;
226
+ companyName?: string;
227
+ email: string;
228
+ phone?: string;
229
+ billingEmail?: string;
230
+ address?: {
231
+ line1?: string;
232
+ line2?: string;
233
+ city?: string;
234
+ state?: string;
235
+ postalCode?: string;
236
+ country?: string;
237
+ };
238
+ shipping?: {
239
+ name?: string;
240
+ phone?: string;
241
+ address?: {
242
+ line1?: string;
243
+ line2?: string;
244
+ city?: string;
245
+ state?: string;
246
+ postalCode?: string;
247
+ country?: string;
248
+ };
249
+ };
250
+ taxId?: string;
251
+ taxIdType?: string;
252
+ sellerId: string;
253
+ stripeCustomerId?: string;
254
+ /** Format: date-time */
255
+ createdAt: string;
256
+ /** Format: date-time */
257
+ updatedAt: string;
258
+ };
259
+ Coupon: {
260
+ id: string;
261
+ label: string;
262
+ code: string;
263
+ amountOff?: number | null;
264
+ percentOff?: number | null;
265
+ appliesToSetupFee?: boolean;
266
+ /** @enum {string} */
267
+ duration: "once" | "repeating" | "forever";
268
+ durationInMonths?: number;
269
+ /** Format: date-time */
270
+ redeemBy?: string;
271
+ maxRedemptions?: number;
272
+ timesRedeemed: number;
273
+ currency?: string;
274
+ /** @example false */
275
+ deleted: boolean;
276
+ sellerId: string;
277
+ pageIds?: string[];
278
+ stripeCouponId?: string;
279
+ /** Format: date-time */
280
+ createdAt: string;
281
+ /** Format: date-time */
282
+ updatedAt: string;
283
+ };
284
+ Payment: {
285
+ id: string;
286
+ orderId?: string;
287
+ orderStatus?: string;
288
+ customerEmail?: string;
289
+ customerId?: string;
290
+ sellerId?: string;
291
+ pageId?: string;
292
+ currency?: string;
293
+ /** @description The total amount intended to be collected. */
294
+ amount: number;
295
+ /** @description The amount of money paid toward the total. */
296
+ amountPaid?: number;
297
+ /** @description The outstanding amount of money to be paid. */
298
+ amountDue?: number;
299
+ amountUsd?: number;
300
+ amountExcludingTax?: number;
301
+ taxAmount?: number;
302
+ taxBreakdown: {
303
+ taxType?: string;
304
+ taxabilityReason?: string;
305
+ taxableAmount?: number;
306
+ taxAmount?: number;
307
+ taxRateDetails?: {
308
+ country?: string;
309
+ percentageDecimal?: number;
310
+ state?: string;
311
+ taxType?: string;
312
+ };
313
+ }[];
314
+ stripeTaxCalculationId?: string;
315
+ stripeTaxTransactionId?: string;
316
+ dynamicPrice?: number;
317
+ fees?: {
318
+ name?: string;
319
+ amount?: number;
320
+ percentage?: number;
321
+ }[];
322
+ billing?: {
323
+ name?: string;
324
+ companyName?: string;
325
+ email?: string;
326
+ billingEmail?: string;
327
+ phone?: string;
328
+ address?: {
329
+ line1?: string;
330
+ line2?: string;
331
+ city?: string;
332
+ state?: string;
333
+ postalCode?: string;
334
+ country?: string;
335
+ };
336
+ };
337
+ shipping?: {
338
+ name?: string;
339
+ phone?: string;
340
+ address?: {
341
+ line1?: string;
342
+ line2?: string;
343
+ city?: string;
344
+ state?: string;
345
+ postalCode?: string;
346
+ country?: string;
347
+ };
348
+ };
349
+ fields?: {
350
+ fieldId?: string;
351
+ label?: string;
352
+ value?: string;
353
+ /** @enum {string} */
354
+ element?: "checkbox" | "quantity" | "multiple-choice" | "select" | "po-number" | "text" | "textarea" | "number" | "date-time" | "date" | "time" | "email" | "tax-id" | "phone" | "country";
355
+ /** @enum {string} */
356
+ type?: "" | "company-name" | "po-number" | "name" | "first-name" | "last-name" | "email" | "billing-email" | "phone" | "address-line1" | "address-city" | "address-country" | "address-line2" | "address-postal_code" | "address-state" | "shipping-name" | "shipping-phone" | "shipping-address-line1" | "shipping-address-city" | "shipping-address-country" | "shipping-address-line2" | "shipping-address-postal_code" | "shipping-address-state" | "tax-id";
357
+ meta?: string;
358
+ reference?: string;
359
+ }[];
360
+ coupon?: {
361
+ id?: string;
362
+ label?: string;
363
+ code?: string;
364
+ amountOff?: number;
365
+ percentOff?: number;
366
+ discount?: number;
367
+ };
368
+ discount?: {
369
+ minQuantity?: number;
370
+ maxQuantity?: number;
371
+ percentOff?: number;
372
+ amountOff?: number;
373
+ amount?: number;
374
+ };
375
+ livemode?: boolean;
376
+ /** @enum {string} */
377
+ status: "created" | "pending" | "unpaid" | "partially_paid" | "paid" | "canceled" | "failed" | "partial_refund" | "refunded" | "draft" | "draft_expired";
378
+ paymentError?: string;
379
+ paymentMethod?: {
380
+ /** @enum {string} */
381
+ gateway?: "stripe" | "paypal" | "manual";
382
+ method?: string;
383
+ wallet?: string;
384
+ /** @enum {string} */
385
+ mode?: "default" | "express";
386
+ brand?: string;
387
+ last4?: string;
388
+ country?: string;
389
+ exp_month?: number;
390
+ exp_year?: number;
391
+ funding?: string;
392
+ };
393
+ paymentOption?: {
394
+ /** @enum {string} */
395
+ type?: "manual" | "partial" | "full";
396
+ name?: string;
397
+ description?: string;
398
+ instructions?: string;
399
+ partialAmount?: number;
400
+ /** @enum {string} */
401
+ manualType?: "invoice" | "cash_on_delivery";
402
+ };
403
+ locale?: string;
404
+ sessionId?: string;
405
+ userAgent?: string;
406
+ screenWidth?: number;
407
+ visitId?: string;
408
+ queryParameters?: {
409
+ [key: string]: string;
410
+ };
411
+ stripePaymentIntentId?: string;
412
+ stripePaymentIntentClientSecret?: string;
413
+ stripeChargeId?: string;
414
+ upsell?: boolean;
415
+ upsellPageId?: string;
416
+ upsellChargeId?: string;
417
+ upsellSubscriptionId?: string;
418
+ invoiceId?: string;
419
+ transactionIds?: string[];
420
+ /** @description The date this was canceled. */
421
+ canceledAt?: string;
422
+ /** @description The userId that canceled this. If this is a booking, tickets were canceled in addition. */
423
+ canceledBy?: string;
424
+ /** @description The reason for the cancellation */
425
+ canceledReason?: string;
426
+ isAbandoned?: boolean;
427
+ /**
428
+ * Format: date-time
429
+ * @description The date at which the customer recovered their checkout through cart abandonment.
430
+ */
431
+ recoveredAt?: string;
432
+ /** @enum {string} */
433
+ abandonedCartEmailStatus?: "pending" | "first_sent" | "second_sent" | "third_sent" | "skipped";
434
+ /** Format: date-time */
435
+ abandonedCartEmailSentAt?: string;
436
+ /** Format: date-time */
437
+ createdAt: string;
438
+ /** Format: date-time */
439
+ updatedAt: string;
440
+ productId?: string;
441
+ productPrice?: number;
442
+ payWhatYouWantPrice?: number;
443
+ discountedFromPrice?: number;
444
+ setupFee?: number;
445
+ quantity?: number;
446
+ sku?: string;
447
+ variants?: {
448
+ name?: string;
449
+ variantId?: string;
450
+ reference?: string;
451
+ /** @enum {string} */
452
+ selectionType?: "single" | "multiple" | "quantity";
453
+ selectedOptions?: {
454
+ optionId?: string;
455
+ optionName?: string;
456
+ sku?: string;
457
+ quantity?: number;
458
+ additionalChargeAmount?: number;
459
+ originalAdditionalChargeAmount?: number;
460
+ discount?: {
461
+ minQuantity?: number;
462
+ maxQuantity?: number;
463
+ percentOff?: number;
464
+ amountOff?: number;
465
+ amount?: number;
466
+ };
467
+ }[];
468
+ }[];
469
+ licenseKeyId?: string;
470
+ };
471
+ };
472
+ responses: {
473
+ /** @description Resource not found */
474
+ NotFoundResponse: {
475
+ headers: {
476
+ [name: string]: unknown;
477
+ };
478
+ content: {
479
+ "application/json": components["schemas"]["NotFoundResponse"];
480
+ };
481
+ };
482
+ /** @description Resource not found */
483
+ Ticket: {
484
+ headers: {
485
+ [name: string]: unknown;
486
+ };
487
+ content: {
488
+ "application/json": components["schemas"]["Ticket"];
489
+ };
490
+ };
491
+ };
492
+ parameters: {
493
+ PageId: components["schemas"]["PageId"];
494
+ TicketId: components["schemas"]["TicketId"];
495
+ CustomerId: components["schemas"]["CustomerId"];
496
+ SellerId: components["schemas"]["SellerId"];
497
+ ChargeId: components["schemas"]["ChargeId"];
498
+ SubscriptionId: components["schemas"]["SubscriptionId"];
499
+ SubscriptionPaymentId: components["schemas"]["SubscriptionPaymentId"];
500
+ ApiKeyId: components["schemas"]["ApiKeyId"];
501
+ };
502
+ requestBodies: never;
503
+ headers: never;
504
+ pathItems: never;
505
+ }
21
506
  interface operations {
22
- "events/tickets/validate-qrcode": {
507
+ "events/validate": {
23
508
  parameters: {
24
509
  query?: never;
25
510
  header?: never;
@@ -39,7 +524,7 @@ interface operations {
39
524
  };
40
525
  };
41
526
  responses: {
42
- /** @description QR code validation successful */
527
+ /** @description Ticket validation successful */
43
528
  200: {
44
529
  headers: {
45
530
  [name: string]: unknown;
@@ -47,26 +532,66 @@ interface operations {
47
532
  content: {
48
533
  "application/json": {
49
534
  success: boolean;
50
- ticket: {
535
+ ticket: components["schemas"]["Ticket"] & {
51
536
  id: string;
52
- status: string;
53
- customerName: string;
537
+ sellerId: string;
538
+ chargeId: string;
539
+ pageId: string;
540
+ /** @enum {string} */
541
+ status: "PAID" | "CANCELED";
542
+ orderId: string;
543
+ customerName?: string;
54
544
  customerEmail: string;
545
+ ticketTypeId: string;
546
+ checkIns: {
547
+ /** @enum {string} */
548
+ method: "QRSCAN" | "MANUAL";
549
+ /** Format: date */
550
+ checkedInAt: string;
551
+ checkedInByUserId: string;
552
+ /** @enum {string} */
553
+ status: "UNCHECKEDIN" | "CHECKEDIN";
554
+ }[];
555
+ latestCheckIn?: {
556
+ /** @enum {string} */
557
+ method: "QRSCAN" | "MANUAL";
558
+ /** Format: date */
559
+ checkedInAt: string;
560
+ checkedInByUserId: string;
561
+ /** @enum {string} */
562
+ status: "UNCHECKEDIN" | "CHECKEDIN";
563
+ };
55
564
  ticketShortId: string;
56
565
  /** @enum {string} */
57
- checkInStatus?: "CHECKEDIN" | "UNCHECKEDIN";
58
- };
59
- metadata?: {
60
- key: string;
61
- value: string;
566
+ checkInStatus?: "UNCHECKEDIN" | "CHECKEDIN";
567
+ originalPrice: number;
568
+ discountAmount: number;
569
+ feeAmount: number;
570
+ taxAmount: number;
571
+ couponAmount: number;
572
+ revenue: number;
573
+ currency?: string;
574
+ livemode: boolean;
575
+ metadata?: {
576
+ key: string;
577
+ value: string;
578
+ /** Format: date */
579
+ addedAt: string;
580
+ }[];
62
581
  /** Format: date */
63
- addedAt: string;
64
- }[];
582
+ orderedAt: string;
583
+ /** Format: date */
584
+ canceledAt?: string;
585
+ /** Format: date */
586
+ createdAt: string;
587
+ /** Format: date */
588
+ updatedAt: string;
589
+ };
65
590
  message?: string;
66
591
  };
67
592
  };
68
593
  };
69
- /** @description Bad request - Invalid QR code format */
594
+ /** @description Bad request - Invalid QR code */
70
595
  400: {
71
596
  headers: {
72
597
  [name: string]: unknown;
@@ -110,11 +635,11 @@ interface operations {
110
635
  };
111
636
  };
112
637
  };
113
- "events/bookings/list": {
638
+ "events/bookings": {
114
639
  parameters: {
115
640
  query?: {
116
641
  search?: string;
117
- status?: string;
642
+ status?: "created" | "pending" | "unpaid" | "partially_paid" | "paid" | "canceled" | "failed" | "partial_refund" | "refunded" | "draft" | "draft_expired";
118
643
  pageId?: string;
119
644
  limit?: string;
120
645
  skip?: string;
@@ -133,209 +658,8 @@ interface operations {
133
658
  content: {
134
659
  "application/json": {
135
660
  has_more: boolean;
136
- total?: number;
137
- data: {
138
- id: string;
139
- orderId?: string;
140
- orderStatus?: string;
141
- stripePaymentId?: string;
142
- customerEmail?: string;
143
- customerId?: string;
144
- sellerId?: string;
145
- pageId?: string;
146
- currency?: string;
147
- /** @description The total amount intended to be collected. */
148
- amount: number;
149
- /** @description The amount of money paid toward the total. */
150
- amountPaid?: number;
151
- /** @description The outstanding amount of money to be paid. */
152
- amountDue?: number;
153
- amountUsd?: number;
154
- amountExcludingTax?: number;
155
- taxAmount?: number;
156
- taxBreakdown: {
157
- taxType?: string;
158
- taxabilityReason?: string;
159
- taxableAmount?: number;
160
- taxAmount?: number;
161
- taxRateDetails?: {
162
- country?: string;
163
- percentageDecimal?: number;
164
- state?: string;
165
- taxType?: string;
166
- };
167
- }[];
168
- stripeTaxCalculationId?: string;
169
- stripeTaxTransactionId?: string;
170
- dynamicPrice?: number;
171
- feeAmount?: number;
172
- fee?: number;
173
- fees?: {
174
- name?: string;
175
- amount?: number;
176
- percentage?: number;
177
- }[];
178
- billing?: {
179
- name?: string;
180
- companyName?: string;
181
- email?: string;
182
- billingEmail?: string;
183
- phone?: string;
184
- address?: {
185
- line1?: string;
186
- line2?: string;
187
- city?: string;
188
- state?: string;
189
- postalCode?: string;
190
- country?: string;
191
- };
192
- };
193
- shipping?: {
194
- name?: string;
195
- phone?: string;
196
- address?: {
197
- line1?: string;
198
- line2?: string;
199
- city?: string;
200
- state?: string;
201
- postalCode?: string;
202
- country?: string;
203
- };
204
- };
205
- fields?: {
206
- fieldId?: string;
207
- label?: string;
208
- value?: string;
209
- /** @enum {string} */
210
- element?: "checkbox" | "quantity" | "multiple-choice" | "select" | "po-number" | "text" | "textarea" | "number" | "date-time" | "date" | "time" | "email" | "tax-id" | "phone" | "country";
211
- /** @enum {string} */
212
- type?: "" | "company-name" | "po-number" | "name" | "first-name" | "last-name" | "email" | "billing-email" | "phone" | "address-line1" | "address-city" | "address-country" | "address-line2" | "address-postal_code" | "address-state" | "shipping-name" | "shipping-phone" | "shipping-address-line1" | "shipping-address-city" | "shipping-address-country" | "shipping-address-line2" | "shipping-address-postal_code" | "shipping-address-state" | "tax-id";
213
- meta?: string;
214
- reference?: string;
215
- }[];
216
- coupon?: {
217
- id?: string;
218
- label?: string;
219
- code?: string;
220
- amountOff?: number;
221
- percentOff?: number;
222
- discount?: number;
223
- };
224
- discount?: {
225
- minQuantity?: number;
226
- maxQuantity?: number;
227
- percentOff?: number;
228
- amountOff?: number;
229
- amount?: number;
230
- };
231
- livemode?: boolean;
232
- /** @enum {string} */
233
- status: "created" | "pending" | "unpaid" | "partially_paid" | "paid" | "canceled" | "failed" | "partial_refund" | "refunded" | "draft" | "draft_expired";
234
- paymentError?: string;
235
- /** @enum {string} */
236
- statusReason?: "api_connection_error" | "api_error" | "authentication_error" | "card_error" | "idempotency_error" | "invalid_request_error" | "rate_limit_error";
237
- paymentMethod?: {
238
- /** @enum {string} */
239
- gateway?: "stripe" | "paypal" | "manual";
240
- method?: string;
241
- wallet?: string;
242
- /** @enum {string} */
243
- mode?: "default" | "express";
244
- brand?: string;
245
- last4?: string;
246
- country?: string;
247
- exp_month?: number;
248
- exp_year?: number;
249
- funding?: string;
250
- };
251
- paymentOption?: {
252
- /** @enum {string} */
253
- type?: "manual" | "partial" | "full";
254
- name?: string;
255
- description?: string;
256
- instructions?: string;
257
- partialAmount?: number;
258
- /** @enum {string} */
259
- manualType?: "invoice" | "cash_on_delivery";
260
- };
261
- locale?: string;
262
- sessionId?: string;
263
- clientIp?: string;
264
- userAgent?: string;
265
- screenWidth?: number;
266
- visitId?: string;
267
- queryParameters?: {
268
- [key: string]: string;
269
- };
270
- stripePaymentIntentId?: string;
271
- stripePaymentIntentClientSecret?: string;
272
- upsell?: boolean;
273
- upsellPageId?: string;
274
- upsellChargeId?: string;
275
- upsellSubscriptionId?: string;
276
- invoiceId?: string;
277
- transactionIds?: string[];
278
- /** @description The date this was canceled. */
279
- canceledAt?: string;
280
- /** @description The userId that canceled this. If this is a booking, tickets were canceled in addition. */
281
- canceledBy?: string;
282
- /** @description The reason for the cancellation */
283
- reason?: string;
284
- isAbandoned?: boolean;
285
- /** Format: date-time */
286
- recoveredAt?: string;
287
- /** @enum {string} */
288
- abandonedCartEmailStatus?: "pending" | "first_sent" | "second_sent" | "third_sent" | "converted" | "skipped";
289
- /** Format: date-time */
290
- abandonedCartEmailSentAt?: string;
291
- /** Format: date-time */
292
- createdAt: string;
293
- /** Format: date-time */
294
- updatedAt: string;
295
- productId?: string;
296
- productPrice?: number;
297
- payWhatYouWantPrice?: number;
298
- discountedFromPrice?: number;
299
- setupFee?: number;
300
- quantity?: number;
301
- sku?: string;
302
- variants?: {
303
- name?: string;
304
- variantId?: string;
305
- reference?: string;
306
- /** @enum {string} */
307
- selectionType?: "single" | "multiple" | "quantity";
308
- sku?: string;
309
- selectedOptions?: {
310
- optionId?: string;
311
- optionName?: string;
312
- sku?: string;
313
- quantity?: number;
314
- additionalChargeAmount?: number;
315
- originalAdditionalChargeAmount?: number;
316
- discount?: {
317
- minQuantity?: number;
318
- maxQuantity?: number;
319
- percentOff?: number;
320
- amountOff?: number;
321
- amount?: number;
322
- };
323
- }[];
324
- additionalChargeAmount?: number;
325
- originalAdditionalChargeAmount?: number;
326
- selectedOptionName?: string;
327
- selectedOptionId?: string;
328
- selectedOptionQuantity?: number;
329
- selectedOptionDiscount?: {
330
- minQuantity?: number;
331
- maxQuantity?: number;
332
- percentOff?: number;
333
- amountOff?: number;
334
- amount?: number;
335
- };
336
- }[];
337
- licenseKeyId?: string;
338
- }[];
661
+ total: number;
662
+ data: components["schemas"]["Booking"][];
339
663
  };
340
664
  };
341
665
  };
@@ -376,42 +700,29 @@ interface operations {
376
700
  };
377
701
  };
378
702
  };
379
- "health/check": {
703
+ "customers/list": {
380
704
  parameters: {
381
- query?: never;
705
+ query?: {
706
+ search?: string;
707
+ limit?: string;
708
+ skip?: string;
709
+ };
382
710
  header?: never;
383
711
  path?: never;
384
712
  cookie?: never;
385
713
  };
386
714
  requestBody?: never;
387
715
  responses: {
388
- /** @description API key health information retrieved successfully */
716
+ /** @description Customers retrieved successfully */
389
717
  200: {
390
718
  headers: {
391
719
  [name: string]: unknown;
392
720
  };
393
721
  content: {
394
722
  "application/json": {
395
- /** @enum {string} */
396
- status: "operational";
397
- apiKey: {
398
- id: string;
399
- name: string;
400
- permissions: string[];
401
- scopes: string[];
402
- isDeleted: boolean;
403
- usageCount: number;
404
- lastUsedAt: string | null;
405
- createdAt: string;
406
- expiresAt: string | null;
407
- keyPreview: string;
408
- };
409
- rateLimit: {
410
- requests: number;
411
- window: number;
412
- } | null;
413
- healthScore: number;
414
- warnings: string[];
723
+ has_more: boolean;
724
+ total: number;
725
+ data: components["schemas"]["Customer"][];
415
726
  };
416
727
  };
417
728
  };
@@ -436,13 +747,6 @@ interface operations {
436
747
  };
437
748
  content?: never;
438
749
  };
439
- /** @description API key not found */
440
- 404: {
441
- headers: {
442
- [name: string]: unknown;
443
- };
444
- content?: never;
445
- };
446
750
  /** @description Rate Limit Exceeded - Please try again later. */
447
751
  429: {
448
752
  headers: {
@@ -459,156 +763,25 @@ interface operations {
459
763
  };
460
764
  };
461
765
  };
462
- "customers/list": {
766
+ "customers/get": {
463
767
  parameters: {
464
- query?: {
465
- search?: string;
466
- limit?: string;
467
- skip?: string;
468
- };
768
+ query?: never;
469
769
  header?: never;
470
- path?: never;
770
+ path: {
771
+ customerId: string;
772
+ };
471
773
  cookie?: never;
472
774
  };
473
775
  requestBody?: never;
474
776
  responses: {
475
- /** @description Customers retrieved successfully */
777
+ /** @description Customer retrieved successfully */
476
778
  200: {
477
779
  headers: {
478
780
  [name: string]: unknown;
479
781
  };
480
782
  content: {
481
783
  "application/json": {
482
- has_more: boolean;
483
- total?: number;
484
- data: {
485
- id: string;
486
- name?: string;
487
- companyName?: string;
488
- email: string;
489
- phone?: string;
490
- billingEmail?: string;
491
- address?: {
492
- line1?: string;
493
- line2?: string;
494
- city?: string;
495
- state?: string;
496
- postalCode?: string;
497
- country?: string;
498
- };
499
- shipping?: {
500
- name?: string;
501
- phone?: string;
502
- address?: {
503
- line1?: string;
504
- line2?: string;
505
- city?: string;
506
- state?: string;
507
- postalCode?: string;
508
- country?: string;
509
- };
510
- };
511
- taxId?: string;
512
- taxIdType?: string;
513
- seller: string;
514
- stripeCustomerId?: string;
515
- /** Format: date-time */
516
- createdAt: string;
517
- /** Format: date-time */
518
- updatedAt: string;
519
- }[];
520
- };
521
- };
522
- };
523
- /** @description Bad request - Invalid request parameters */
524
- 400: {
525
- headers: {
526
- [name: string]: unknown;
527
- };
528
- content?: never;
529
- };
530
- /** @description Unauthorized - Missing or invalid API key */
531
- 401: {
532
- headers: {
533
- [name: string]: unknown;
534
- };
535
- content?: never;
536
- };
537
- /** @description Forbidden - Insufficient permissions or validation error */
538
- 403: {
539
- headers: {
540
- [name: string]: unknown;
541
- };
542
- content?: never;
543
- };
544
- /** @description Rate Limit Exceeded - Please try again later. */
545
- 429: {
546
- headers: {
547
- [name: string]: unknown;
548
- };
549
- content?: never;
550
- };
551
- /** @description Internal server error */
552
- 500: {
553
- headers: {
554
- [name: string]: unknown;
555
- };
556
- content?: never;
557
- };
558
- };
559
- };
560
- "customers/get": {
561
- parameters: {
562
- query?: never;
563
- header?: never;
564
- path: {
565
- customerId: string;
566
- };
567
- cookie?: never;
568
- };
569
- requestBody?: never;
570
- responses: {
571
- /** @description Customer retrieved successfully */
572
- 200: {
573
- headers: {
574
- [name: string]: unknown;
575
- };
576
- content: {
577
- "application/json": {
578
- id: string;
579
- name?: string;
580
- companyName?: string;
581
- email: string;
582
- phone?: string;
583
- billingEmail?: string;
584
- address?: {
585
- line1?: string;
586
- line2?: string;
587
- city?: string;
588
- state?: string;
589
- postalCode?: string;
590
- country?: string;
591
- };
592
- shipping?: {
593
- name?: string;
594
- phone?: string;
595
- address?: {
596
- line1?: string;
597
- line2?: string;
598
- city?: string;
599
- state?: string;
600
- postalCode?: string;
601
- country?: string;
602
- };
603
- };
604
- taxId?: string;
605
- taxIdType?: string;
606
- seller: string;
607
- stripeCustomerId?: string;
608
- /** Format: date-time */
609
- createdAt: string;
610
- /** Format: date-time */
611
- updatedAt: string;
784
+ data: components["schemas"]["Customer"];
612
785
  };
613
786
  };
614
787
  };
@@ -677,31 +850,8 @@ interface operations {
677
850
  content: {
678
851
  "application/json": {
679
852
  has_more: boolean;
680
- total?: number;
681
- data: {
682
- id: string;
683
- label: string;
684
- code: string;
685
- amountOff?: number | null;
686
- percentOff?: number | null;
687
- appliesToSetupFee?: boolean;
688
- /** @enum {string} */
689
- duration: "once" | "repeating" | "forever";
690
- durationInMonths?: number;
691
- /** Format: date-time */
692
- redeemBy?: string;
693
- maxRedemptions?: number;
694
- timesRedeemed: number;
695
- currency?: string;
696
- deleted: boolean;
697
- sellerId: string;
698
- pageIds?: string[];
699
- stripeId?: string;
700
- /** Format: date-time */
701
- createdAt: string;
702
- /** Format: date-time */
703
- updatedAt: string;
704
- }[];
853
+ total: number;
854
+ data: components["schemas"]["Coupon"][];
705
855
  };
706
856
  };
707
857
  };
@@ -763,12 +913,12 @@ interface operations {
763
913
  */
764
914
  code: string;
765
915
  /**
766
- * @description A positive integer representing the amount to subtract from an invoice total (required if percent_off is not passed).
916
+ * @description A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).
767
917
  * @example 100
768
918
  */
769
919
  amountOff?: number;
770
920
  /**
771
- * @description Three-letter ISO code for the currency of the amountOff parameter (required if amountOff is passed).
921
+ * @description Three-letter ISO code for the currency of the amountOff parameter (required if `amountOff` is passed).
772
922
  * @example usd
773
923
  * @enum {string}
774
924
  */
@@ -776,11 +926,11 @@ interface operations {
776
926
  /** @enum {string} */
777
927
  duration: "once" | "repeating" | "forever";
778
928
  /**
779
- * @description A positive integer representing the number of months the coupon applies for (required if duration === repeating)
929
+ * @description A positive integer representing the number of months the coupon applies for (required if `duration === repeating`)
780
930
  * @example 3
781
931
  */
782
932
  durationInMonths?: number;
783
- /** @description A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if amount_off is not passed). */
933
+ /** @description A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). */
784
934
  percentOff?: number;
785
935
  /**
786
936
  * @description Apply discount to setup fee
@@ -790,15 +940,9 @@ interface operations {
790
940
  /**
791
941
  * @description A list of pageIds that this coupon can be used within.
792
942
  * @example [
793
- * {
794
- * "description": "67ee075004de439ab0b675b6"
795
- * },
796
- * {
797
- * "description": "67fcbdac6a91c25ef2d3534a"
798
- * }
943
+ * "67ee075004de439ab0b675b6",
944
+ * "67fcbdac6a91c25ef2d3534a"
799
945
  * ]
800
- * @example 67ee075004de439ab0b675b6
801
- * @example 67fcbdac6a91c25ef2d3534a
802
946
  */
803
947
  pageIds?: string[];
804
948
  /**
@@ -823,28 +967,7 @@ interface operations {
823
967
  };
824
968
  content: {
825
969
  "application/json": {
826
- id: string;
827
- label: string;
828
- code: string;
829
- amountOff?: number | null;
830
- percentOff?: number | null;
831
- appliesToSetupFee?: boolean;
832
- /** @enum {string} */
833
- duration: "once" | "repeating" | "forever";
834
- durationInMonths?: number;
835
- /** Format: date-time */
836
- redeemBy?: string;
837
- maxRedemptions?: number;
838
- timesRedeemed: number;
839
- currency?: string;
840
- deleted: boolean;
841
- sellerId: string;
842
- pageIds?: string[];
843
- stripeId?: string;
844
- /** Format: date-time */
845
- createdAt: string;
846
- /** Format: date-time */
847
- updatedAt: string;
970
+ data: components["schemas"]["Coupon"];
848
971
  };
849
972
  };
850
973
  };
@@ -915,11 +1038,12 @@ interface operations {
915
1038
  content: {
916
1039
  "application/json": {
917
1040
  has_more: boolean;
918
- total?: number;
1041
+ total: number;
919
1042
  data: {
920
1043
  id: string;
921
1044
  orderId?: string;
922
- subscriptionId?: string;
1045
+ stripeSubscriptionId?: string;
1046
+ stripeCustomerId?: string;
923
1047
  customerEmail?: string;
924
1048
  currency?: string;
925
1049
  amount: number;
@@ -949,7 +1073,6 @@ interface operations {
949
1073
  productPrice?: number;
950
1074
  dynamicPrice?: number;
951
1075
  discountedFromPrice?: number;
952
- feePercentage?: number;
953
1076
  sku?: string;
954
1077
  billing?: {
955
1078
  name?: string;
@@ -1016,26 +1139,12 @@ interface operations {
1016
1139
  optionInvoiceItemId?: string;
1017
1140
  optionInvoiceItemPaid?: boolean;
1018
1141
  }[];
1019
- selectedOptionName?: string;
1020
- additionalChargeAmount?: number;
1021
- discountAmount?: number;
1022
1142
  fees?: {
1023
1143
  name?: string;
1024
1144
  amount?: number;
1025
1145
  percentage?: number;
1026
1146
  stripeInvoiceItemId?: string;
1027
1147
  }[];
1028
- additionalChargeAmountTotal?: number;
1029
- additionalChargeAmountUsd?: number;
1030
- sku?: string;
1031
- /** @enum {string} */
1032
- selectedOptionType?: "one_time" | "recurring";
1033
- selectedOptionId?: string;
1034
- selectedOptionQuantity?: number;
1035
- selectedOptionStripePriceId?: string;
1036
- selectedOptionStripeProductId?: string;
1037
- selectedOptionInvoiceItemId?: string;
1038
- selectedOptionInvoiceItemPaid?: boolean;
1039
1148
  }[];
1040
1149
  couponId?: string;
1041
1150
  licenseKeyId?: string;
@@ -1061,7 +1170,6 @@ interface operations {
1061
1170
  };
1062
1171
  locale?: string;
1063
1172
  sessionId?: string;
1064
- clientIp?: string;
1065
1173
  userAgent?: string;
1066
1174
  screenWidth?: number;
1067
1175
  visitId?: string;
@@ -1089,8 +1197,6 @@ interface operations {
1089
1197
  upsellPageId?: string;
1090
1198
  upsellChargeId?: string;
1091
1199
  upsellSubscriptionId?: string;
1092
- stripeSubscriptionId?: string;
1093
- stripeCustomerId?: string;
1094
1200
  sellerId?: string;
1095
1201
  customerId?: string;
1096
1202
  pageId?: string;
@@ -1155,7 +1261,7 @@ interface operations {
1155
1261
  parameters: {
1156
1262
  query?: {
1157
1263
  search?: string;
1158
- status?: string;
1264
+ status?: "created" | "pending" | "unpaid" | "partially_paid" | "paid" | "canceled" | "failed" | "partial_refund" | "refunded" | "draft" | "draft_expired";
1159
1265
  pageId?: string;
1160
1266
  limit?: string;
1161
1267
  skip?: string;
@@ -1174,209 +1280,8 @@ interface operations {
1174
1280
  content: {
1175
1281
  "application/json": {
1176
1282
  has_more: boolean;
1177
- total?: number;
1178
- data: {
1179
- id: string;
1180
- orderId?: string;
1181
- orderStatus?: string;
1182
- stripePaymentId?: string;
1183
- customerEmail?: string;
1184
- customerId?: string;
1185
- sellerId?: string;
1186
- pageId?: string;
1187
- currency?: string;
1188
- /** @description The total amount intended to be collected. */
1189
- amount: number;
1190
- /** @description The amount of money paid toward the total. */
1191
- amountPaid?: number;
1192
- /** @description The outstanding amount of money to be paid. */
1193
- amountDue?: number;
1194
- amountUsd?: number;
1195
- amountExcludingTax?: number;
1196
- taxAmount?: number;
1197
- taxBreakdown: {
1198
- taxType?: string;
1199
- taxabilityReason?: string;
1200
- taxableAmount?: number;
1201
- taxAmount?: number;
1202
- taxRateDetails?: {
1203
- country?: string;
1204
- percentageDecimal?: number;
1205
- state?: string;
1206
- taxType?: string;
1207
- };
1208
- }[];
1209
- stripeTaxCalculationId?: string;
1210
- stripeTaxTransactionId?: string;
1211
- dynamicPrice?: number;
1212
- feeAmount?: number;
1213
- fee?: number;
1214
- fees?: {
1215
- name?: string;
1216
- amount?: number;
1217
- percentage?: number;
1218
- }[];
1219
- billing?: {
1220
- name?: string;
1221
- companyName?: string;
1222
- email?: string;
1223
- billingEmail?: string;
1224
- phone?: string;
1225
- address?: {
1226
- line1?: string;
1227
- line2?: string;
1228
- city?: string;
1229
- state?: string;
1230
- postalCode?: string;
1231
- country?: string;
1232
- };
1233
- };
1234
- shipping?: {
1235
- name?: string;
1236
- phone?: string;
1237
- address?: {
1238
- line1?: string;
1239
- line2?: string;
1240
- city?: string;
1241
- state?: string;
1242
- postalCode?: string;
1243
- country?: string;
1244
- };
1245
- };
1246
- fields?: {
1247
- fieldId?: string;
1248
- label?: string;
1249
- value?: string;
1250
- /** @enum {string} */
1251
- element?: "checkbox" | "quantity" | "multiple-choice" | "select" | "po-number" | "text" | "textarea" | "number" | "date-time" | "date" | "time" | "email" | "tax-id" | "phone" | "country";
1252
- /** @enum {string} */
1253
- type?: "" | "company-name" | "po-number" | "name" | "first-name" | "last-name" | "email" | "billing-email" | "phone" | "address-line1" | "address-city" | "address-country" | "address-line2" | "address-postal_code" | "address-state" | "shipping-name" | "shipping-phone" | "shipping-address-line1" | "shipping-address-city" | "shipping-address-country" | "shipping-address-line2" | "shipping-address-postal_code" | "shipping-address-state" | "tax-id";
1254
- meta?: string;
1255
- reference?: string;
1256
- }[];
1257
- coupon?: {
1258
- id?: string;
1259
- label?: string;
1260
- code?: string;
1261
- amountOff?: number;
1262
- percentOff?: number;
1263
- discount?: number;
1264
- };
1265
- discount?: {
1266
- minQuantity?: number;
1267
- maxQuantity?: number;
1268
- percentOff?: number;
1269
- amountOff?: number;
1270
- amount?: number;
1271
- };
1272
- livemode?: boolean;
1273
- /** @enum {string} */
1274
- status: "created" | "pending" | "unpaid" | "partially_paid" | "paid" | "canceled" | "failed" | "partial_refund" | "refunded" | "draft" | "draft_expired";
1275
- paymentError?: string;
1276
- /** @enum {string} */
1277
- statusReason?: "api_connection_error" | "api_error" | "authentication_error" | "card_error" | "idempotency_error" | "invalid_request_error" | "rate_limit_error";
1278
- paymentMethod?: {
1279
- /** @enum {string} */
1280
- gateway?: "stripe" | "paypal" | "manual";
1281
- method?: string;
1282
- wallet?: string;
1283
- /** @enum {string} */
1284
- mode?: "default" | "express";
1285
- brand?: string;
1286
- last4?: string;
1287
- country?: string;
1288
- exp_month?: number;
1289
- exp_year?: number;
1290
- funding?: string;
1291
- };
1292
- paymentOption?: {
1293
- /** @enum {string} */
1294
- type?: "manual" | "partial" | "full";
1295
- name?: string;
1296
- description?: string;
1297
- instructions?: string;
1298
- partialAmount?: number;
1299
- /** @enum {string} */
1300
- manualType?: "invoice" | "cash_on_delivery";
1301
- };
1302
- locale?: string;
1303
- sessionId?: string;
1304
- clientIp?: string;
1305
- userAgent?: string;
1306
- screenWidth?: number;
1307
- visitId?: string;
1308
- queryParameters?: {
1309
- [key: string]: string;
1310
- };
1311
- stripePaymentIntentId?: string;
1312
- stripePaymentIntentClientSecret?: string;
1313
- upsell?: boolean;
1314
- upsellPageId?: string;
1315
- upsellChargeId?: string;
1316
- upsellSubscriptionId?: string;
1317
- invoiceId?: string;
1318
- transactionIds?: string[];
1319
- /** @description The date this was canceled. */
1320
- canceledAt?: string;
1321
- /** @description The userId that canceled this. If this is a booking, tickets were canceled in addition. */
1322
- canceledBy?: string;
1323
- /** @description The reason for the cancellation */
1324
- reason?: string;
1325
- isAbandoned?: boolean;
1326
- /** Format: date-time */
1327
- recoveredAt?: string;
1328
- /** @enum {string} */
1329
- abandonedCartEmailStatus?: "pending" | "first_sent" | "second_sent" | "third_sent" | "converted" | "skipped";
1330
- /** Format: date-time */
1331
- abandonedCartEmailSentAt?: string;
1332
- /** Format: date-time */
1333
- createdAt: string;
1334
- /** Format: date-time */
1335
- updatedAt: string;
1336
- productId?: string;
1337
- productPrice?: number;
1338
- payWhatYouWantPrice?: number;
1339
- discountedFromPrice?: number;
1340
- setupFee?: number;
1341
- quantity?: number;
1342
- sku?: string;
1343
- variants?: {
1344
- name?: string;
1345
- variantId?: string;
1346
- reference?: string;
1347
- /** @enum {string} */
1348
- selectionType?: "single" | "multiple" | "quantity";
1349
- sku?: string;
1350
- selectedOptions?: {
1351
- optionId?: string;
1352
- optionName?: string;
1353
- sku?: string;
1354
- quantity?: number;
1355
- additionalChargeAmount?: number;
1356
- originalAdditionalChargeAmount?: number;
1357
- discount?: {
1358
- minQuantity?: number;
1359
- maxQuantity?: number;
1360
- percentOff?: number;
1361
- amountOff?: number;
1362
- amount?: number;
1363
- };
1364
- }[];
1365
- additionalChargeAmount?: number;
1366
- originalAdditionalChargeAmount?: number;
1367
- selectedOptionName?: string;
1368
- selectedOptionId?: string;
1369
- selectedOptionQuantity?: number;
1370
- selectedOptionDiscount?: {
1371
- minQuantity?: number;
1372
- maxQuantity?: number;
1373
- percentOff?: number;
1374
- amountOff?: number;
1375
- amount?: number;
1376
- };
1377
- }[];
1378
- licenseKeyId?: string;
1379
- }[];
1283
+ total: number;
1284
+ data: components["schemas"]["Payment"][];
1380
1285
  };
1381
1286
  };
1382
1287
  };
@@ -1435,42 +1340,7 @@ interface operations {
1435
1340
  /** @enum {string} */
1436
1341
  event: "customer.created";
1437
1342
  data: {
1438
- customer: {
1439
- id: string;
1440
- name?: string;
1441
- companyName?: string;
1442
- email: string;
1443
- phone?: string;
1444
- billingEmail?: string;
1445
- address?: {
1446
- line1?: string;
1447
- line2?: string;
1448
- city?: string;
1449
- state?: string;
1450
- postalCode?: string;
1451
- country?: string;
1452
- };
1453
- shipping?: {
1454
- name?: string;
1455
- phone?: string;
1456
- address?: {
1457
- line1?: string;
1458
- line2?: string;
1459
- city?: string;
1460
- state?: string;
1461
- postalCode?: string;
1462
- country?: string;
1463
- };
1464
- };
1465
- taxId?: string;
1466
- taxIdType?: string;
1467
- seller: string;
1468
- stripeCustomerId?: string;
1469
- /** Format: date-time */
1470
- createdAt: string;
1471
- /** Format: date-time */
1472
- updatedAt: string;
1473
- };
1343
+ customer: components["schemas"]["Customer"];
1474
1344
  };
1475
1345
  };
1476
1346
  };
@@ -1503,42 +1373,7 @@ interface operations {
1503
1373
  /** @enum {string} */
1504
1374
  event: "customer.updated";
1505
1375
  data: {
1506
- customer: {
1507
- id: string;
1508
- name?: string;
1509
- companyName?: string;
1510
- email: string;
1511
- phone?: string;
1512
- billingEmail?: string;
1513
- address?: {
1514
- line1?: string;
1515
- line2?: string;
1516
- city?: string;
1517
- state?: string;
1518
- postalCode?: string;
1519
- country?: string;
1520
- };
1521
- shipping?: {
1522
- name?: string;
1523
- phone?: string;
1524
- address?: {
1525
- line1?: string;
1526
- line2?: string;
1527
- city?: string;
1528
- state?: string;
1529
- postalCode?: string;
1530
- country?: string;
1531
- };
1532
- };
1533
- taxId?: string;
1534
- taxIdType?: string;
1535
- seller: string;
1536
- stripeCustomerId?: string;
1537
- /** Format: date-time */
1538
- createdAt: string;
1539
- /** Format: date-time */
1540
- updatedAt: string;
1541
- };
1376
+ customer: components["schemas"]["Customer"];
1542
1377
  };
1543
1378
  };
1544
1379
  };
@@ -1568,1140 +1403,10 @@ interface operations {
1568
1403
  timestamp: string;
1569
1404
  /** @description Unique identifier for idempotency */
1570
1405
  event_id: string;
1571
- /** @enum {string} */
1572
- event: "payment.created";
1573
- data: {
1574
- payment: {
1575
- id: string;
1576
- orderId?: string;
1577
- orderStatus?: string;
1578
- stripePaymentId?: string;
1579
- customerEmail?: string;
1580
- customerId?: string;
1581
- sellerId?: string;
1582
- pageId?: string;
1583
- currency?: string;
1584
- /** @description The total amount intended to be collected. */
1585
- amount: number;
1586
- /** @description The amount of money paid toward the total. */
1587
- amountPaid?: number;
1588
- /** @description The outstanding amount of money to be paid. */
1589
- amountDue?: number;
1590
- amountUsd?: number;
1591
- amountExcludingTax?: number;
1592
- taxAmount?: number;
1593
- taxBreakdown: {
1594
- taxType?: string;
1595
- taxabilityReason?: string;
1596
- taxableAmount?: number;
1597
- taxAmount?: number;
1598
- taxRateDetails?: {
1599
- country?: string;
1600
- percentageDecimal?: number;
1601
- state?: string;
1602
- taxType?: string;
1603
- };
1604
- }[];
1605
- stripeTaxCalculationId?: string;
1606
- stripeTaxTransactionId?: string;
1607
- dynamicPrice?: number;
1608
- feeAmount?: number;
1609
- fee?: number;
1610
- fees?: {
1611
- name?: string;
1612
- amount?: number;
1613
- percentage?: number;
1614
- }[];
1615
- billing?: {
1616
- name?: string;
1617
- companyName?: string;
1618
- email?: string;
1619
- billingEmail?: string;
1620
- phone?: string;
1621
- address?: {
1622
- line1?: string;
1623
- line2?: string;
1624
- city?: string;
1625
- state?: string;
1626
- postalCode?: string;
1627
- country?: string;
1628
- };
1629
- };
1630
- shipping?: {
1631
- name?: string;
1632
- phone?: string;
1633
- address?: {
1634
- line1?: string;
1635
- line2?: string;
1636
- city?: string;
1637
- state?: string;
1638
- postalCode?: string;
1639
- country?: string;
1640
- };
1641
- };
1642
- fields?: {
1643
- fieldId?: string;
1644
- label?: string;
1645
- value?: string;
1646
- /** @enum {string} */
1647
- element?: "checkbox" | "quantity" | "multiple-choice" | "select" | "po-number" | "text" | "textarea" | "number" | "date-time" | "date" | "time" | "email" | "tax-id" | "phone" | "country";
1648
- /** @enum {string} */
1649
- type?: "" | "company-name" | "po-number" | "name" | "first-name" | "last-name" | "email" | "billing-email" | "phone" | "address-line1" | "address-city" | "address-country" | "address-line2" | "address-postal_code" | "address-state" | "shipping-name" | "shipping-phone" | "shipping-address-line1" | "shipping-address-city" | "shipping-address-country" | "shipping-address-line2" | "shipping-address-postal_code" | "shipping-address-state" | "tax-id";
1650
- meta?: string;
1651
- reference?: string;
1652
- }[];
1653
- coupon?: {
1654
- id?: string;
1655
- label?: string;
1656
- code?: string;
1657
- amountOff?: number;
1658
- percentOff?: number;
1659
- discount?: number;
1660
- };
1661
- discount?: {
1662
- minQuantity?: number;
1663
- maxQuantity?: number;
1664
- percentOff?: number;
1665
- amountOff?: number;
1666
- amount?: number;
1667
- };
1668
- livemode?: boolean;
1669
- /** @enum {string} */
1670
- status: "created" | "pending" | "unpaid" | "partially_paid" | "paid" | "canceled" | "failed" | "partial_refund" | "refunded" | "draft" | "draft_expired";
1671
- paymentError?: string;
1672
- /** @enum {string} */
1673
- statusReason?: "api_connection_error" | "api_error" | "authentication_error" | "card_error" | "idempotency_error" | "invalid_request_error" | "rate_limit_error";
1674
- paymentMethod?: {
1675
- /** @enum {string} */
1676
- gateway?: "stripe" | "paypal" | "manual";
1677
- method?: string;
1678
- wallet?: string;
1679
- /** @enum {string} */
1680
- mode?: "default" | "express";
1681
- brand?: string;
1682
- last4?: string;
1683
- country?: string;
1684
- exp_month?: number;
1685
- exp_year?: number;
1686
- funding?: string;
1687
- };
1688
- paymentOption?: {
1689
- /** @enum {string} */
1690
- type?: "manual" | "partial" | "full";
1691
- name?: string;
1692
- description?: string;
1693
- instructions?: string;
1694
- partialAmount?: number;
1695
- /** @enum {string} */
1696
- manualType?: "invoice" | "cash_on_delivery";
1697
- };
1698
- locale?: string;
1699
- sessionId?: string;
1700
- clientIp?: string;
1701
- userAgent?: string;
1702
- screenWidth?: number;
1703
- visitId?: string;
1704
- queryParameters?: {
1705
- [key: string]: string;
1706
- };
1707
- stripePaymentIntentId?: string;
1708
- stripePaymentIntentClientSecret?: string;
1709
- upsell?: boolean;
1710
- upsellPageId?: string;
1711
- upsellChargeId?: string;
1712
- upsellSubscriptionId?: string;
1713
- invoiceId?: string;
1714
- transactionIds?: string[];
1715
- /** @description The date this was canceled. */
1716
- canceledAt?: string;
1717
- /** @description The userId that canceled this. If this is a booking, tickets were canceled in addition. */
1718
- canceledBy?: string;
1719
- /** @description The reason for the cancellation */
1720
- reason?: string;
1721
- isAbandoned?: boolean;
1722
- /** Format: date-time */
1723
- recoveredAt?: string;
1724
- /** @enum {string} */
1725
- abandonedCartEmailStatus?: "pending" | "first_sent" | "second_sent" | "third_sent" | "converted" | "skipped";
1726
- /** Format: date-time */
1727
- abandonedCartEmailSentAt?: string;
1728
- /** Format: date-time */
1729
- createdAt: string;
1730
- /** Format: date-time */
1731
- updatedAt: string;
1732
- productId?: string;
1733
- productPrice?: number;
1734
- payWhatYouWantPrice?: number;
1735
- discountedFromPrice?: number;
1736
- setupFee?: number;
1737
- quantity?: number;
1738
- sku?: string;
1739
- variants?: {
1740
- name?: string;
1741
- variantId?: string;
1742
- reference?: string;
1743
- /** @enum {string} */
1744
- selectionType?: "single" | "multiple" | "quantity";
1745
- sku?: string;
1746
- selectedOptions?: {
1747
- optionId?: string;
1748
- optionName?: string;
1749
- sku?: string;
1750
- quantity?: number;
1751
- additionalChargeAmount?: number;
1752
- originalAdditionalChargeAmount?: number;
1753
- discount?: {
1754
- minQuantity?: number;
1755
- maxQuantity?: number;
1756
- percentOff?: number;
1757
- amountOff?: number;
1758
- amount?: number;
1759
- };
1760
- }[];
1761
- additionalChargeAmount?: number;
1762
- originalAdditionalChargeAmount?: number;
1763
- selectedOptionName?: string;
1764
- selectedOptionId?: string;
1765
- selectedOptionQuantity?: number;
1766
- selectedOptionDiscount?: {
1767
- minQuantity?: number;
1768
- maxQuantity?: number;
1769
- percentOff?: number;
1770
- amountOff?: number;
1771
- amount?: number;
1772
- };
1773
- }[];
1774
- licenseKeyId?: string;
1775
- };
1776
- };
1777
- };
1778
- };
1779
- };
1780
- responses: {
1781
- /** @description Return a 200 status to indicate that the data was received successfully. */
1782
- 200: {
1783
- headers: {
1784
- [name: string]: unknown;
1785
- };
1786
- content?: never;
1787
- };
1788
- };
1789
- };
1790
- "webhooks/payment.paid": {
1791
- parameters: {
1792
- query?: never;
1793
- header?: never;
1794
- path?: never;
1795
- cookie?: never;
1796
- };
1797
- requestBody?: {
1798
- content: {
1799
- "application/json": {
1800
- seller_id: string;
1801
- /** Format: date-time */
1802
- timestamp: string;
1803
- /** @description Unique identifier for idempotency */
1804
- event_id: string;
1805
- /** @enum {string} */
1806
- event: "payment.paid";
1807
- data: {
1808
- payment: {
1809
- id: string;
1810
- orderId?: string;
1811
- orderStatus?: string;
1812
- stripePaymentId?: string;
1813
- customerEmail?: string;
1814
- customerId?: string;
1815
- sellerId?: string;
1816
- pageId?: string;
1817
- currency?: string;
1818
- /** @description The total amount intended to be collected. */
1819
- amount: number;
1820
- /** @description The amount of money paid toward the total. */
1821
- amountPaid?: number;
1822
- /** @description The outstanding amount of money to be paid. */
1823
- amountDue?: number;
1824
- amountUsd?: number;
1825
- amountExcludingTax?: number;
1826
- taxAmount?: number;
1827
- taxBreakdown: {
1828
- taxType?: string;
1829
- taxabilityReason?: string;
1830
- taxableAmount?: number;
1831
- taxAmount?: number;
1832
- taxRateDetails?: {
1833
- country?: string;
1834
- percentageDecimal?: number;
1835
- state?: string;
1836
- taxType?: string;
1837
- };
1838
- }[];
1839
- stripeTaxCalculationId?: string;
1840
- stripeTaxTransactionId?: string;
1841
- dynamicPrice?: number;
1842
- feeAmount?: number;
1843
- fee?: number;
1844
- fees?: {
1845
- name?: string;
1846
- amount?: number;
1847
- percentage?: number;
1848
- }[];
1849
- billing?: {
1850
- name?: string;
1851
- companyName?: string;
1852
- email?: string;
1853
- billingEmail?: string;
1854
- phone?: string;
1855
- address?: {
1856
- line1?: string;
1857
- line2?: string;
1858
- city?: string;
1859
- state?: string;
1860
- postalCode?: string;
1861
- country?: string;
1862
- };
1863
- };
1864
- shipping?: {
1865
- name?: string;
1866
- phone?: string;
1867
- address?: {
1868
- line1?: string;
1869
- line2?: string;
1870
- city?: string;
1871
- state?: string;
1872
- postalCode?: string;
1873
- country?: string;
1874
- };
1875
- };
1876
- fields?: {
1877
- fieldId?: string;
1878
- label?: string;
1879
- value?: string;
1880
- /** @enum {string} */
1881
- element?: "checkbox" | "quantity" | "multiple-choice" | "select" | "po-number" | "text" | "textarea" | "number" | "date-time" | "date" | "time" | "email" | "tax-id" | "phone" | "country";
1882
- /** @enum {string} */
1883
- type?: "" | "company-name" | "po-number" | "name" | "first-name" | "last-name" | "email" | "billing-email" | "phone" | "address-line1" | "address-city" | "address-country" | "address-line2" | "address-postal_code" | "address-state" | "shipping-name" | "shipping-phone" | "shipping-address-line1" | "shipping-address-city" | "shipping-address-country" | "shipping-address-line2" | "shipping-address-postal_code" | "shipping-address-state" | "tax-id";
1884
- meta?: string;
1885
- reference?: string;
1886
- }[];
1887
- coupon?: {
1888
- id?: string;
1889
- label?: string;
1890
- code?: string;
1891
- amountOff?: number;
1892
- percentOff?: number;
1893
- discount?: number;
1894
- };
1895
- discount?: {
1896
- minQuantity?: number;
1897
- maxQuantity?: number;
1898
- percentOff?: number;
1899
- amountOff?: number;
1900
- amount?: number;
1901
- };
1902
- livemode?: boolean;
1903
- /** @enum {string} */
1904
- status: "created" | "pending" | "unpaid" | "partially_paid" | "paid" | "canceled" | "failed" | "partial_refund" | "refunded" | "draft" | "draft_expired";
1905
- paymentError?: string;
1906
- /** @enum {string} */
1907
- statusReason?: "api_connection_error" | "api_error" | "authentication_error" | "card_error" | "idempotency_error" | "invalid_request_error" | "rate_limit_error";
1908
- paymentMethod?: {
1909
- /** @enum {string} */
1910
- gateway?: "stripe" | "paypal" | "manual";
1911
- method?: string;
1912
- wallet?: string;
1913
- /** @enum {string} */
1914
- mode?: "default" | "express";
1915
- brand?: string;
1916
- last4?: string;
1917
- country?: string;
1918
- exp_month?: number;
1919
- exp_year?: number;
1920
- funding?: string;
1921
- };
1922
- paymentOption?: {
1923
- /** @enum {string} */
1924
- type?: "manual" | "partial" | "full";
1925
- name?: string;
1926
- description?: string;
1927
- instructions?: string;
1928
- partialAmount?: number;
1929
- /** @enum {string} */
1930
- manualType?: "invoice" | "cash_on_delivery";
1931
- };
1932
- locale?: string;
1933
- sessionId?: string;
1934
- clientIp?: string;
1935
- userAgent?: string;
1936
- screenWidth?: number;
1937
- visitId?: string;
1938
- queryParameters?: {
1939
- [key: string]: string;
1940
- };
1941
- stripePaymentIntentId?: string;
1942
- stripePaymentIntentClientSecret?: string;
1943
- upsell?: boolean;
1944
- upsellPageId?: string;
1945
- upsellChargeId?: string;
1946
- upsellSubscriptionId?: string;
1947
- invoiceId?: string;
1948
- transactionIds?: string[];
1949
- /** @description The date this was canceled. */
1950
- canceledAt?: string;
1951
- /** @description The userId that canceled this. If this is a booking, tickets were canceled in addition. */
1952
- canceledBy?: string;
1953
- /** @description The reason for the cancellation */
1954
- reason?: string;
1955
- isAbandoned?: boolean;
1956
- /** Format: date-time */
1957
- recoveredAt?: string;
1958
- /** @enum {string} */
1959
- abandonedCartEmailStatus?: "pending" | "first_sent" | "second_sent" | "third_sent" | "converted" | "skipped";
1960
- /** Format: date-time */
1961
- abandonedCartEmailSentAt?: string;
1962
- /** Format: date-time */
1963
- createdAt: string;
1964
- /** Format: date-time */
1965
- updatedAt: string;
1966
- productId?: string;
1967
- productPrice?: number;
1968
- payWhatYouWantPrice?: number;
1969
- discountedFromPrice?: number;
1970
- setupFee?: number;
1971
- quantity?: number;
1972
- sku?: string;
1973
- variants?: {
1974
- name?: string;
1975
- variantId?: string;
1976
- reference?: string;
1977
- /** @enum {string} */
1978
- selectionType?: "single" | "multiple" | "quantity";
1979
- sku?: string;
1980
- selectedOptions?: {
1981
- optionId?: string;
1982
- optionName?: string;
1983
- sku?: string;
1984
- quantity?: number;
1985
- additionalChargeAmount?: number;
1986
- originalAdditionalChargeAmount?: number;
1987
- discount?: {
1988
- minQuantity?: number;
1989
- maxQuantity?: number;
1990
- percentOff?: number;
1991
- amountOff?: number;
1992
- amount?: number;
1993
- };
1994
- }[];
1995
- additionalChargeAmount?: number;
1996
- originalAdditionalChargeAmount?: number;
1997
- selectedOptionName?: string;
1998
- selectedOptionId?: string;
1999
- selectedOptionQuantity?: number;
2000
- selectedOptionDiscount?: {
2001
- minQuantity?: number;
2002
- maxQuantity?: number;
2003
- percentOff?: number;
2004
- amountOff?: number;
2005
- amount?: number;
2006
- };
2007
- }[];
2008
- licenseKeyId?: string;
2009
- };
2010
- };
2011
- };
2012
- };
2013
- };
2014
- responses: {
2015
- /** @description Return a 200 status to indicate that the data was received successfully. */
2016
- 200: {
2017
- headers: {
2018
- [name: string]: unknown;
2019
- };
2020
- content?: never;
2021
- };
2022
- };
2023
- };
2024
- "webhooks/booking.created": {
2025
- parameters: {
2026
- query?: never;
2027
- header?: never;
2028
- path?: never;
2029
- cookie?: never;
2030
- };
2031
- requestBody?: {
2032
- content: {
2033
- "application/json": {
2034
- seller_id: string;
2035
- /** Format: date-time */
2036
- timestamp: string;
2037
- /** @description Unique identifier for idempotency */
2038
- event_id: string;
2039
- /** @enum {string} */
2040
- event: "booking.created";
2041
- data: {
2042
- booking: {
2043
- id: string;
2044
- orderId?: string;
2045
- orderStatus?: string;
2046
- stripePaymentId?: string;
2047
- customerEmail?: string;
2048
- customerId?: string;
2049
- sellerId?: string;
2050
- pageId?: string;
2051
- currency?: string;
2052
- /** @description The total amount intended to be collected. */
2053
- amount: number;
2054
- /** @description The amount of money paid toward the total. */
2055
- amountPaid?: number;
2056
- /** @description The outstanding amount of money to be paid. */
2057
- amountDue?: number;
2058
- amountUsd?: number;
2059
- amountExcludingTax?: number;
2060
- taxAmount?: number;
2061
- taxBreakdown: {
2062
- taxType?: string;
2063
- taxabilityReason?: string;
2064
- taxableAmount?: number;
2065
- taxAmount?: number;
2066
- taxRateDetails?: {
2067
- country?: string;
2068
- percentageDecimal?: number;
2069
- state?: string;
2070
- taxType?: string;
2071
- };
2072
- }[];
2073
- stripeTaxCalculationId?: string;
2074
- stripeTaxTransactionId?: string;
2075
- dynamicPrice?: number;
2076
- feeAmount?: number;
2077
- fee?: number;
2078
- fees?: {
2079
- name?: string;
2080
- amount?: number;
2081
- percentage?: number;
2082
- }[];
2083
- billing?: {
2084
- name?: string;
2085
- companyName?: string;
2086
- email?: string;
2087
- billingEmail?: string;
2088
- phone?: string;
2089
- address?: {
2090
- line1?: string;
2091
- line2?: string;
2092
- city?: string;
2093
- state?: string;
2094
- postalCode?: string;
2095
- country?: string;
2096
- };
2097
- };
2098
- shipping?: {
2099
- name?: string;
2100
- phone?: string;
2101
- address?: {
2102
- line1?: string;
2103
- line2?: string;
2104
- city?: string;
2105
- state?: string;
2106
- postalCode?: string;
2107
- country?: string;
2108
- };
2109
- };
2110
- fields?: {
2111
- fieldId?: string;
2112
- label?: string;
2113
- value?: string;
2114
- /** @enum {string} */
2115
- element?: "checkbox" | "quantity" | "multiple-choice" | "select" | "po-number" | "text" | "textarea" | "number" | "date-time" | "date" | "time" | "email" | "tax-id" | "phone" | "country";
2116
- /** @enum {string} */
2117
- type?: "" | "company-name" | "po-number" | "name" | "first-name" | "last-name" | "email" | "billing-email" | "phone" | "address-line1" | "address-city" | "address-country" | "address-line2" | "address-postal_code" | "address-state" | "shipping-name" | "shipping-phone" | "shipping-address-line1" | "shipping-address-city" | "shipping-address-country" | "shipping-address-line2" | "shipping-address-postal_code" | "shipping-address-state" | "tax-id";
2118
- meta?: string;
2119
- reference?: string;
2120
- }[];
2121
- coupon?: {
2122
- id?: string;
2123
- label?: string;
2124
- code?: string;
2125
- amountOff?: number;
2126
- percentOff?: number;
2127
- discount?: number;
2128
- };
2129
- discount?: {
2130
- minQuantity?: number;
2131
- maxQuantity?: number;
2132
- percentOff?: number;
2133
- amountOff?: number;
2134
- amount?: number;
2135
- };
2136
- livemode?: boolean;
2137
- /** @enum {string} */
2138
- status: "created" | "pending" | "unpaid" | "partially_paid" | "paid" | "canceled" | "failed" | "partial_refund" | "refunded" | "draft" | "draft_expired";
2139
- paymentError?: string;
2140
- /** @enum {string} */
2141
- statusReason?: "api_connection_error" | "api_error" | "authentication_error" | "card_error" | "idempotency_error" | "invalid_request_error" | "rate_limit_error";
2142
- paymentMethod?: {
2143
- /** @enum {string} */
2144
- gateway?: "stripe" | "paypal" | "manual";
2145
- method?: string;
2146
- wallet?: string;
2147
- /** @enum {string} */
2148
- mode?: "default" | "express";
2149
- brand?: string;
2150
- last4?: string;
2151
- country?: string;
2152
- exp_month?: number;
2153
- exp_year?: number;
2154
- funding?: string;
2155
- };
2156
- paymentOption?: {
2157
- /** @enum {string} */
2158
- type?: "manual" | "partial" | "full";
2159
- name?: string;
2160
- description?: string;
2161
- instructions?: string;
2162
- partialAmount?: number;
2163
- /** @enum {string} */
2164
- manualType?: "invoice" | "cash_on_delivery";
2165
- };
2166
- locale?: string;
2167
- sessionId?: string;
2168
- clientIp?: string;
2169
- userAgent?: string;
2170
- screenWidth?: number;
2171
- visitId?: string;
2172
- queryParameters?: {
2173
- [key: string]: string;
2174
- };
2175
- stripePaymentIntentId?: string;
2176
- stripePaymentIntentClientSecret?: string;
2177
- upsell?: boolean;
2178
- upsellPageId?: string;
2179
- upsellChargeId?: string;
2180
- upsellSubscriptionId?: string;
2181
- invoiceId?: string;
2182
- transactionIds?: string[];
2183
- /** @description The date this was canceled. */
2184
- canceledAt?: string;
2185
- /** @description The userId that canceled this. If this is a booking, tickets were canceled in addition. */
2186
- canceledBy?: string;
2187
- /** @description The reason for the cancellation */
2188
- reason?: string;
2189
- isAbandoned?: boolean;
2190
- /** Format: date-time */
2191
- recoveredAt?: string;
2192
- /** @enum {string} */
2193
- abandonedCartEmailStatus?: "pending" | "first_sent" | "second_sent" | "third_sent" | "converted" | "skipped";
2194
- /** Format: date-time */
2195
- abandonedCartEmailSentAt?: string;
2196
- /** Format: date-time */
2197
- createdAt: string;
2198
- /** Format: date-time */
2199
- updatedAt: string;
2200
- productId?: string;
2201
- productPrice?: number;
2202
- payWhatYouWantPrice?: number;
2203
- discountedFromPrice?: number;
2204
- setupFee?: number;
2205
- quantity?: number;
2206
- sku?: string;
2207
- variants?: {
2208
- name?: string;
2209
- variantId?: string;
2210
- reference?: string;
2211
- /** @enum {string} */
2212
- selectionType?: "single" | "multiple" | "quantity";
2213
- sku?: string;
2214
- selectedOptions?: {
2215
- optionId?: string;
2216
- optionName?: string;
2217
- sku?: string;
2218
- quantity?: number;
2219
- additionalChargeAmount?: number;
2220
- originalAdditionalChargeAmount?: number;
2221
- discount?: {
2222
- minQuantity?: number;
2223
- maxQuantity?: number;
2224
- percentOff?: number;
2225
- amountOff?: number;
2226
- amount?: number;
2227
- };
2228
- }[];
2229
- additionalChargeAmount?: number;
2230
- originalAdditionalChargeAmount?: number;
2231
- selectedOptionName?: string;
2232
- selectedOptionId?: string;
2233
- selectedOptionQuantity?: number;
2234
- selectedOptionDiscount?: {
2235
- minQuantity?: number;
2236
- maxQuantity?: number;
2237
- percentOff?: number;
2238
- amountOff?: number;
2239
- amount?: number;
2240
- };
2241
- }[];
2242
- licenseKeyId?: string;
2243
- };
2244
- };
2245
- };
2246
- };
2247
- };
2248
- responses: {
2249
- /** @description Return a 200 status to indicate that the data was received successfully. */
2250
- 200: {
2251
- headers: {
2252
- [name: string]: unknown;
2253
- };
2254
- content?: never;
2255
- };
2256
- };
2257
- };
2258
- "webhooks/booking.paid": {
2259
- parameters: {
2260
- query?: never;
2261
- header?: never;
2262
- path?: never;
2263
- cookie?: never;
2264
- };
2265
- requestBody?: {
2266
- content: {
2267
- "application/json": {
2268
- seller_id: string;
2269
- /** Format: date-time */
2270
- timestamp: string;
2271
- /** @description Unique identifier for idempotency */
2272
- event_id: string;
2273
- /** @enum {string} */
2274
- event: "booking.paid";
2275
- data: {
2276
- booking: {
2277
- id: string;
2278
- orderId?: string;
2279
- orderStatus?: string;
2280
- stripePaymentId?: string;
2281
- customerEmail?: string;
2282
- customerId?: string;
2283
- sellerId?: string;
2284
- pageId?: string;
2285
- currency?: string;
2286
- /** @description The total amount intended to be collected. */
2287
- amount: number;
2288
- /** @description The amount of money paid toward the total. */
2289
- amountPaid?: number;
2290
- /** @description The outstanding amount of money to be paid. */
2291
- amountDue?: number;
2292
- amountUsd?: number;
2293
- amountExcludingTax?: number;
2294
- taxAmount?: number;
2295
- taxBreakdown: {
2296
- taxType?: string;
2297
- taxabilityReason?: string;
2298
- taxableAmount?: number;
2299
- taxAmount?: number;
2300
- taxRateDetails?: {
2301
- country?: string;
2302
- percentageDecimal?: number;
2303
- state?: string;
2304
- taxType?: string;
2305
- };
2306
- }[];
2307
- stripeTaxCalculationId?: string;
2308
- stripeTaxTransactionId?: string;
2309
- dynamicPrice?: number;
2310
- feeAmount?: number;
2311
- fee?: number;
2312
- fees?: {
2313
- name?: string;
2314
- amount?: number;
2315
- percentage?: number;
2316
- }[];
2317
- billing?: {
2318
- name?: string;
2319
- companyName?: string;
2320
- email?: string;
2321
- billingEmail?: string;
2322
- phone?: string;
2323
- address?: {
2324
- line1?: string;
2325
- line2?: string;
2326
- city?: string;
2327
- state?: string;
2328
- postalCode?: string;
2329
- country?: string;
2330
- };
2331
- };
2332
- shipping?: {
2333
- name?: string;
2334
- phone?: string;
2335
- address?: {
2336
- line1?: string;
2337
- line2?: string;
2338
- city?: string;
2339
- state?: string;
2340
- postalCode?: string;
2341
- country?: string;
2342
- };
2343
- };
2344
- fields?: {
2345
- fieldId?: string;
2346
- label?: string;
2347
- value?: string;
2348
- /** @enum {string} */
2349
- element?: "checkbox" | "quantity" | "multiple-choice" | "select" | "po-number" | "text" | "textarea" | "number" | "date-time" | "date" | "time" | "email" | "tax-id" | "phone" | "country";
2350
- /** @enum {string} */
2351
- type?: "" | "company-name" | "po-number" | "name" | "first-name" | "last-name" | "email" | "billing-email" | "phone" | "address-line1" | "address-city" | "address-country" | "address-line2" | "address-postal_code" | "address-state" | "shipping-name" | "shipping-phone" | "shipping-address-line1" | "shipping-address-city" | "shipping-address-country" | "shipping-address-line2" | "shipping-address-postal_code" | "shipping-address-state" | "tax-id";
2352
- meta?: string;
2353
- reference?: string;
2354
- }[];
2355
- coupon?: {
2356
- id?: string;
2357
- label?: string;
2358
- code?: string;
2359
- amountOff?: number;
2360
- percentOff?: number;
2361
- discount?: number;
2362
- };
2363
- discount?: {
2364
- minQuantity?: number;
2365
- maxQuantity?: number;
2366
- percentOff?: number;
2367
- amountOff?: number;
2368
- amount?: number;
2369
- };
2370
- livemode?: boolean;
2371
- /** @enum {string} */
2372
- status: "created" | "pending" | "unpaid" | "partially_paid" | "paid" | "canceled" | "failed" | "partial_refund" | "refunded" | "draft" | "draft_expired";
2373
- paymentError?: string;
2374
- /** @enum {string} */
2375
- statusReason?: "api_connection_error" | "api_error" | "authentication_error" | "card_error" | "idempotency_error" | "invalid_request_error" | "rate_limit_error";
2376
- paymentMethod?: {
2377
- /** @enum {string} */
2378
- gateway?: "stripe" | "paypal" | "manual";
2379
- method?: string;
2380
- wallet?: string;
2381
- /** @enum {string} */
2382
- mode?: "default" | "express";
2383
- brand?: string;
2384
- last4?: string;
2385
- country?: string;
2386
- exp_month?: number;
2387
- exp_year?: number;
2388
- funding?: string;
2389
- };
2390
- paymentOption?: {
2391
- /** @enum {string} */
2392
- type?: "manual" | "partial" | "full";
2393
- name?: string;
2394
- description?: string;
2395
- instructions?: string;
2396
- partialAmount?: number;
2397
- /** @enum {string} */
2398
- manualType?: "invoice" | "cash_on_delivery";
2399
- };
2400
- locale?: string;
2401
- sessionId?: string;
2402
- clientIp?: string;
2403
- userAgent?: string;
2404
- screenWidth?: number;
2405
- visitId?: string;
2406
- queryParameters?: {
2407
- [key: string]: string;
2408
- };
2409
- stripePaymentIntentId?: string;
2410
- stripePaymentIntentClientSecret?: string;
2411
- upsell?: boolean;
2412
- upsellPageId?: string;
2413
- upsellChargeId?: string;
2414
- upsellSubscriptionId?: string;
2415
- invoiceId?: string;
2416
- transactionIds?: string[];
2417
- /** @description The date this was canceled. */
2418
- canceledAt?: string;
2419
- /** @description The userId that canceled this. If this is a booking, tickets were canceled in addition. */
2420
- canceledBy?: string;
2421
- /** @description The reason for the cancellation */
2422
- reason?: string;
2423
- isAbandoned?: boolean;
2424
- /** Format: date-time */
2425
- recoveredAt?: string;
2426
- /** @enum {string} */
2427
- abandonedCartEmailStatus?: "pending" | "first_sent" | "second_sent" | "third_sent" | "converted" | "skipped";
2428
- /** Format: date-time */
2429
- abandonedCartEmailSentAt?: string;
2430
- /** Format: date-time */
2431
- createdAt: string;
2432
- /** Format: date-time */
2433
- updatedAt: string;
2434
- productId?: string;
2435
- productPrice?: number;
2436
- payWhatYouWantPrice?: number;
2437
- discountedFromPrice?: number;
2438
- setupFee?: number;
2439
- quantity?: number;
2440
- sku?: string;
2441
- variants?: {
2442
- name?: string;
2443
- variantId?: string;
2444
- reference?: string;
2445
- /** @enum {string} */
2446
- selectionType?: "single" | "multiple" | "quantity";
2447
- sku?: string;
2448
- selectedOptions?: {
2449
- optionId?: string;
2450
- optionName?: string;
2451
- sku?: string;
2452
- quantity?: number;
2453
- additionalChargeAmount?: number;
2454
- originalAdditionalChargeAmount?: number;
2455
- discount?: {
2456
- minQuantity?: number;
2457
- maxQuantity?: number;
2458
- percentOff?: number;
2459
- amountOff?: number;
2460
- amount?: number;
2461
- };
2462
- }[];
2463
- additionalChargeAmount?: number;
2464
- originalAdditionalChargeAmount?: number;
2465
- selectedOptionName?: string;
2466
- selectedOptionId?: string;
2467
- selectedOptionQuantity?: number;
2468
- selectedOptionDiscount?: {
2469
- minQuantity?: number;
2470
- maxQuantity?: number;
2471
- percentOff?: number;
2472
- amountOff?: number;
2473
- amount?: number;
2474
- };
2475
- }[];
2476
- licenseKeyId?: string;
2477
- };
2478
- };
2479
- };
2480
- };
2481
- };
2482
- responses: {
2483
- /** @description Return a 200 status to indicate that the data was received successfully. */
2484
- 200: {
2485
- headers: {
2486
- [name: string]: unknown;
2487
- };
2488
- content?: never;
2489
- };
2490
- };
2491
- };
2492
- "webhooks/subscription.created": {
2493
- parameters: {
2494
- query?: never;
2495
- header?: never;
2496
- path?: never;
2497
- cookie?: never;
2498
- };
2499
- requestBody?: {
2500
- content: {
2501
- "application/json": {
2502
- seller_id: string;
2503
- /** Format: date-time */
2504
- timestamp: string;
2505
- /** @description Unique identifier for idempotency */
2506
- event_id: string;
2507
- /** @enum {string} */
2508
- event: "subscription.created";
2509
- data: {
2510
- subscription: {
2511
- id: string;
2512
- orderId?: string;
2513
- subscriptionId?: string;
2514
- customerEmail?: string;
2515
- currency?: string;
2516
- amount: number;
2517
- amountUsd?: number;
2518
- interval?: string;
2519
- intervalCount?: number;
2520
- planIterations?: number;
2521
- fees?: {
2522
- name?: string;
2523
- amount?: number;
2524
- percentage?: number;
2525
- stripeProductId?: string;
2526
- }[];
2527
- setupFee?: number;
2528
- setupFeeDiscountAmount?: number;
2529
- setupFeeFees?: {
2530
- name?: string;
2531
- amount?: number;
2532
- percentage?: number;
2533
- stripeInvoiceItemId?: string;
2534
- }[];
2535
- setupFeeTotal?: number;
2536
- setupFeeUsd?: number;
2537
- setupFeeInvoiceItemId?: string;
2538
- setupFeeInvoiceItemPaid?: boolean;
2539
- quantity?: number;
2540
- productPrice?: number;
2541
- dynamicPrice?: number;
2542
- discountedFromPrice?: number;
2543
- feePercentage?: number;
2544
- sku?: string;
2545
- billing?: {
2546
- name?: string;
2547
- companyName?: string;
2548
- email?: string;
2549
- billingEmail?: string;
2550
- phone?: string;
2551
- address?: {
2552
- line1?: string;
2553
- line2?: string;
2554
- city?: string;
2555
- state?: string;
2556
- postalCode?: string;
2557
- country?: string;
2558
- };
2559
- };
2560
- shipping?: {
2561
- name?: string;
2562
- phone?: string;
2563
- address?: {
2564
- line1?: string;
2565
- line2?: string;
2566
- city?: string;
2567
- state?: string;
2568
- postalCode?: string;
2569
- country?: string;
2570
- };
2571
- };
2572
- fields?: {
2573
- fieldId?: string;
2574
- label?: string;
2575
- value?: string;
2576
- /** @enum {string} */
2577
- element?: "checkbox" | "quantity" | "multiple-choice" | "select" | "po-number" | "text" | "textarea" | "number" | "date-time" | "date" | "time" | "email" | "tax-id" | "phone" | "country";
2578
- /** @enum {string} */
2579
- type?: "" | "company-name" | "po-number" | "name" | "first-name" | "last-name" | "email" | "billing-email" | "phone" | "address-line1" | "address-city" | "address-country" | "address-line2" | "address-postal_code" | "address-state" | "shipping-name" | "shipping-phone" | "shipping-address-line1" | "shipping-address-city" | "shipping-address-country" | "shipping-address-line2" | "shipping-address-postal_code" | "shipping-address-state" | "tax-id";
2580
- reference?: string;
2581
- }[];
2582
- variants?: {
2583
- name?: string;
2584
- variantId?: string;
2585
- reference?: string;
2586
- /** @enum {string} */
2587
- selectionType?: "single" | "multiple" | "quantity";
2588
- selectedOptions?: {
2589
- optionId?: string;
2590
- /** @enum {string} */
2591
- optionType?: "one_time" | "recurring";
2592
- optionName?: string;
2593
- sku?: string;
2594
- quantity?: number;
2595
- additionalChargeAmount?: number;
2596
- discountAmount?: number;
2597
- fees?: {
2598
- name?: string;
2599
- amount?: number;
2600
- percentage?: number;
2601
- stripeInvoiceItemId?: string;
2602
- }[];
2603
- additionalChargeAmountTotal?: number;
2604
- additionalChargeAmountUsd?: number;
2605
- optionStripePriceId?: string;
2606
- optionStripeProductId?: string;
2607
- optionInvoiceItemId?: string;
2608
- optionInvoiceItemPaid?: boolean;
2609
- }[];
2610
- selectedOptionName?: string;
2611
- additionalChargeAmount?: number;
2612
- discountAmount?: number;
2613
- fees?: {
2614
- name?: string;
2615
- amount?: number;
2616
- percentage?: number;
2617
- stripeInvoiceItemId?: string;
2618
- }[];
2619
- additionalChargeAmountTotal?: number;
2620
- additionalChargeAmountUsd?: number;
2621
- sku?: string;
2622
- /** @enum {string} */
2623
- selectedOptionType?: "one_time" | "recurring";
2624
- selectedOptionId?: string;
2625
- selectedOptionQuantity?: number;
2626
- selectedOptionStripePriceId?: string;
2627
- selectedOptionStripeProductId?: string;
2628
- selectedOptionInvoiceItemId?: string;
2629
- selectedOptionInvoiceItemPaid?: boolean;
2630
- }[];
2631
- couponId?: string;
2632
- licenseKeyId?: string;
2633
- livemode?: boolean;
2634
- /** @enum {string} */
2635
- status?: "draft" | "draft_expired" | "incomplete" | "incomplete_expired" | "trialing" | "scheduled" | "active" | "past_due" | "canceled" | "unpaid" | "failed" | "completed";
2636
- /** @enum {string} */
2637
- paymentStatus?: "draft" | "deleted" | "open" | "paid" | "uncollectible" | "void" | "requires_payment_method" | "requires_confirmation" | "requires_action" | "processing" | "requires_capture" | "canceled" | "succeeded";
2638
- paymentError?: string;
2639
- paymentMethod?: {
2640
- /** @enum {string} */
2641
- gateway?: "stripe" | "paypal" | "manual";
2642
- method?: string;
2643
- wallet?: string;
2644
- /** @enum {string} */
2645
- mode?: "default" | "express";
2646
- brand?: string;
2647
- last4?: string;
2648
- country?: string;
2649
- exp_month?: number;
2650
- exp_year?: number;
2651
- funding?: string;
2652
- };
2653
- locale?: string;
2654
- sessionId?: string;
2655
- clientIp?: string;
2656
- userAgent?: string;
2657
- screenWidth?: number;
2658
- visitId?: string;
2659
- queryParameters?: {
2660
- key: string;
2661
- value: string;
2662
- }[];
2663
- stripePaymentIntentId?: string;
2664
- stripePaymentIntentClientSecret?: string;
2665
- stripeSetupIntentId?: string;
2666
- /** Format: date-time */
2667
- startDate?: string;
2668
- /** Format: date-time */
2669
- trialEnd?: string;
2670
- /** Format: date-time */
2671
- trialStart?: string;
2672
- /** Format: date-time */
2673
- cancelAt?: string;
2674
- cancelAtPeriodEnd?: boolean;
2675
- /** Format: date-time */
2676
- currentPeriodStart?: string;
2677
- /** Format: date-time */
2678
- currentPeriodEnd?: string;
2679
- upsell?: boolean;
2680
- upsellPageId?: string;
2681
- upsellChargeId?: string;
2682
- upsellSubscriptionId?: string;
2683
- stripeSubscriptionId?: string;
2684
- stripeCustomerId?: string;
2685
- sellerId?: string;
2686
- customerId?: string;
2687
- pageId?: string;
2688
- productId?: string;
2689
- /** Format: date-time */
2690
- canceledAt?: string;
2691
- canceledBy?: string;
2692
- reason?: string;
2693
- isAbandoned?: boolean;
2694
- /** Format: date-time */
2695
- recoveredAt?: string;
2696
- /** @enum {string} */
2697
- abandonedCartEmailStatus?: "pending" | "first_sent" | "second_sent" | "third_sent" | "converted" | "skipped";
2698
- /** Format: date-time */
2699
- abandonedCartEmailSentAt?: string;
2700
- /** Format: date-time */
2701
- createdAt: string;
2702
- /** Format: date-time */
2703
- updatedAt: string;
2704
- };
1406
+ /** @enum {string} */
1407
+ event: "payment.created";
1408
+ data: {
1409
+ payment: components["schemas"]["Payment"];
2705
1410
  };
2706
1411
  };
2707
1412
  };
@@ -2716,7 +1421,7 @@ interface operations {
2716
1421
  };
2717
1422
  };
2718
1423
  };
2719
- "webhooks/subscription.active": {
1424
+ "webhooks/payment.paid": {
2720
1425
  parameters: {
2721
1426
  query?: never;
2722
1427
  header?: never;
@@ -2732,203 +1437,75 @@ interface operations {
2732
1437
  /** @description Unique identifier for idempotency */
2733
1438
  event_id: string;
2734
1439
  /** @enum {string} */
2735
- event: "subscription.active";
1440
+ event: "payment.paid";
2736
1441
  data: {
2737
- subscription: {
2738
- id: string;
2739
- orderId?: string;
2740
- subscriptionId?: string;
2741
- customerEmail?: string;
2742
- currency?: string;
2743
- amount: number;
2744
- amountUsd?: number;
2745
- interval?: string;
2746
- intervalCount?: number;
2747
- planIterations?: number;
2748
- fees?: {
2749
- name?: string;
2750
- amount?: number;
2751
- percentage?: number;
2752
- stripeProductId?: string;
2753
- }[];
2754
- setupFee?: number;
2755
- setupFeeDiscountAmount?: number;
2756
- setupFeeFees?: {
2757
- name?: string;
2758
- amount?: number;
2759
- percentage?: number;
2760
- stripeInvoiceItemId?: string;
2761
- }[];
2762
- setupFeeTotal?: number;
2763
- setupFeeUsd?: number;
2764
- setupFeeInvoiceItemId?: string;
2765
- setupFeeInvoiceItemPaid?: boolean;
2766
- quantity?: number;
2767
- productPrice?: number;
2768
- dynamicPrice?: number;
2769
- discountedFromPrice?: number;
2770
- feePercentage?: number;
2771
- sku?: string;
2772
- billing?: {
2773
- name?: string;
2774
- companyName?: string;
2775
- email?: string;
2776
- billingEmail?: string;
2777
- phone?: string;
2778
- address?: {
2779
- line1?: string;
2780
- line2?: string;
2781
- city?: string;
2782
- state?: string;
2783
- postalCode?: string;
2784
- country?: string;
2785
- };
2786
- };
2787
- shipping?: {
2788
- name?: string;
2789
- phone?: string;
2790
- address?: {
2791
- line1?: string;
2792
- line2?: string;
2793
- city?: string;
2794
- state?: string;
2795
- postalCode?: string;
2796
- country?: string;
2797
- };
2798
- };
2799
- fields?: {
2800
- fieldId?: string;
2801
- label?: string;
2802
- value?: string;
2803
- /** @enum {string} */
2804
- element?: "checkbox" | "quantity" | "multiple-choice" | "select" | "po-number" | "text" | "textarea" | "number" | "date-time" | "date" | "time" | "email" | "tax-id" | "phone" | "country";
2805
- /** @enum {string} */
2806
- type?: "" | "company-name" | "po-number" | "name" | "first-name" | "last-name" | "email" | "billing-email" | "phone" | "address-line1" | "address-city" | "address-country" | "address-line2" | "address-postal_code" | "address-state" | "shipping-name" | "shipping-phone" | "shipping-address-line1" | "shipping-address-city" | "shipping-address-country" | "shipping-address-line2" | "shipping-address-postal_code" | "shipping-address-state" | "tax-id";
2807
- reference?: string;
2808
- }[];
2809
- variants?: {
2810
- name?: string;
2811
- variantId?: string;
2812
- reference?: string;
2813
- /** @enum {string} */
2814
- selectionType?: "single" | "multiple" | "quantity";
2815
- selectedOptions?: {
2816
- optionId?: string;
2817
- /** @enum {string} */
2818
- optionType?: "one_time" | "recurring";
2819
- optionName?: string;
2820
- sku?: string;
2821
- quantity?: number;
2822
- additionalChargeAmount?: number;
2823
- discountAmount?: number;
2824
- fees?: {
2825
- name?: string;
2826
- amount?: number;
2827
- percentage?: number;
2828
- stripeInvoiceItemId?: string;
2829
- }[];
2830
- additionalChargeAmountTotal?: number;
2831
- additionalChargeAmountUsd?: number;
2832
- optionStripePriceId?: string;
2833
- optionStripeProductId?: string;
2834
- optionInvoiceItemId?: string;
2835
- optionInvoiceItemPaid?: boolean;
2836
- }[];
2837
- selectedOptionName?: string;
2838
- additionalChargeAmount?: number;
2839
- discountAmount?: number;
2840
- fees?: {
2841
- name?: string;
2842
- amount?: number;
2843
- percentage?: number;
2844
- stripeInvoiceItemId?: string;
2845
- }[];
2846
- additionalChargeAmountTotal?: number;
2847
- additionalChargeAmountUsd?: number;
2848
- sku?: string;
2849
- /** @enum {string} */
2850
- selectedOptionType?: "one_time" | "recurring";
2851
- selectedOptionId?: string;
2852
- selectedOptionQuantity?: number;
2853
- selectedOptionStripePriceId?: string;
2854
- selectedOptionStripeProductId?: string;
2855
- selectedOptionInvoiceItemId?: string;
2856
- selectedOptionInvoiceItemPaid?: boolean;
2857
- }[];
2858
- couponId?: string;
2859
- licenseKeyId?: string;
2860
- livemode?: boolean;
2861
- /** @enum {string} */
2862
- status?: "draft" | "draft_expired" | "incomplete" | "incomplete_expired" | "trialing" | "scheduled" | "active" | "past_due" | "canceled" | "unpaid" | "failed" | "completed";
2863
- /** @enum {string} */
2864
- paymentStatus?: "draft" | "deleted" | "open" | "paid" | "uncollectible" | "void" | "requires_payment_method" | "requires_confirmation" | "requires_action" | "processing" | "requires_capture" | "canceled" | "succeeded";
2865
- paymentError?: string;
2866
- paymentMethod?: {
2867
- /** @enum {string} */
2868
- gateway?: "stripe" | "paypal" | "manual";
2869
- method?: string;
2870
- wallet?: string;
2871
- /** @enum {string} */
2872
- mode?: "default" | "express";
2873
- brand?: string;
2874
- last4?: string;
2875
- country?: string;
2876
- exp_month?: number;
2877
- exp_year?: number;
2878
- funding?: string;
2879
- };
2880
- locale?: string;
2881
- sessionId?: string;
2882
- clientIp?: string;
2883
- userAgent?: string;
2884
- screenWidth?: number;
2885
- visitId?: string;
2886
- queryParameters?: {
2887
- key: string;
2888
- value: string;
2889
- }[];
2890
- stripePaymentIntentId?: string;
2891
- stripePaymentIntentClientSecret?: string;
2892
- stripeSetupIntentId?: string;
2893
- /** Format: date-time */
2894
- startDate?: string;
2895
- /** Format: date-time */
2896
- trialEnd?: string;
2897
- /** Format: date-time */
2898
- trialStart?: string;
2899
- /** Format: date-time */
2900
- cancelAt?: string;
2901
- cancelAtPeriodEnd?: boolean;
2902
- /** Format: date-time */
2903
- currentPeriodStart?: string;
2904
- /** Format: date-time */
2905
- currentPeriodEnd?: string;
2906
- upsell?: boolean;
2907
- upsellPageId?: string;
2908
- upsellChargeId?: string;
2909
- upsellSubscriptionId?: string;
2910
- stripeSubscriptionId?: string;
2911
- stripeCustomerId?: string;
2912
- sellerId?: string;
2913
- customerId?: string;
2914
- pageId?: string;
2915
- productId?: string;
2916
- /** Format: date-time */
2917
- canceledAt?: string;
2918
- canceledBy?: string;
2919
- reason?: string;
2920
- isAbandoned?: boolean;
2921
- /** Format: date-time */
2922
- recoveredAt?: string;
2923
- /** @enum {string} */
2924
- abandonedCartEmailStatus?: "pending" | "first_sent" | "second_sent" | "third_sent" | "converted" | "skipped";
2925
- /** Format: date-time */
2926
- abandonedCartEmailSentAt?: string;
2927
- /** Format: date-time */
2928
- createdAt: string;
2929
- /** Format: date-time */
2930
- updatedAt: string;
2931
- };
1442
+ payment: components["schemas"]["Payment"];
1443
+ };
1444
+ };
1445
+ };
1446
+ };
1447
+ responses: {
1448
+ /** @description Return a 200 status to indicate that the data was received successfully. */
1449
+ 200: {
1450
+ headers: {
1451
+ [name: string]: unknown;
1452
+ };
1453
+ content?: never;
1454
+ };
1455
+ };
1456
+ };
1457
+ "webhooks/booking.created": {
1458
+ parameters: {
1459
+ query?: never;
1460
+ header?: never;
1461
+ path?: never;
1462
+ cookie?: never;
1463
+ };
1464
+ requestBody?: {
1465
+ content: {
1466
+ "application/json": {
1467
+ seller_id: string;
1468
+ /** Format: date-time */
1469
+ timestamp: string;
1470
+ /** @description Unique identifier for idempotency */
1471
+ event_id: string;
1472
+ /** @enum {string} */
1473
+ event: "booking.created";
1474
+ data: {
1475
+ booking: components["schemas"]["Payment"];
1476
+ };
1477
+ };
1478
+ };
1479
+ };
1480
+ responses: {
1481
+ /** @description Return a 200 status to indicate that the data was received successfully. */
1482
+ 200: {
1483
+ headers: {
1484
+ [name: string]: unknown;
1485
+ };
1486
+ content?: never;
1487
+ };
1488
+ };
1489
+ };
1490
+ "webhooks/booking.paid": {
1491
+ parameters: {
1492
+ query?: never;
1493
+ header?: never;
1494
+ path?: never;
1495
+ cookie?: never;
1496
+ };
1497
+ requestBody?: {
1498
+ content: {
1499
+ "application/json": {
1500
+ seller_id: string;
1501
+ /** Format: date-time */
1502
+ timestamp: string;
1503
+ /** @description Unique identifier for idempotency */
1504
+ event_id: string;
1505
+ /** @enum {string} */
1506
+ event: "booking.paid";
1507
+ data: {
1508
+ booking: components["schemas"]["Payment"];
2932
1509
  };
2933
1510
  };
2934
1511
  };
@@ -3031,20 +1608,77 @@ interface operations {
3031
1608
  }
3032
1609
 
3033
1610
  /**
3034
- * Type definitions for the CheckoutPage API
1611
+ * Type definitions for the Checkout Page API
3035
1612
  *
3036
1613
  * This file exports commonly used types from the generated schema.
3037
1614
  * The full generated schema is available in ./generated/schema.ts
3038
1615
  */
3039
1616
 
3040
1617
  type Customer = operations['customers/get']['responses'][200]['content']['application/json'];
3041
- type Address = NonNullable<Customer['address']>;
3042
- type Shipping = NonNullable<Customer['shipping']>;
1618
+ type CustomerList = operations['customers/list']['responses'][200]['content']['application/json'];
1619
+ type CustomerListArgs = operations['customers/list']['parameters']['query'];
1620
+ type CustomerListParams = Omit<NonNullable<CustomerListArgs>, 'limit' | 'skip'> & {
1621
+ limit?: number;
1622
+ skip?: number;
1623
+ };
1624
+ type Address = NonNullable<Customer['data']['address']>;
1625
+ type Shipping = NonNullable<Customer['data']['shipping']>;
1626
+ type CouponList = operations['coupons/list']['responses'][200]['content']['application/json'];
1627
+ type Coupon = CouponList['data'][number];
1628
+ type CreateCouponResponse = operations['coupons/create']['responses']['201']['content']['application/json'];
1629
+ type CouponListArgs = operations['coupons/list']['parameters']['query'];
1630
+ type CouponListParams = Omit<NonNullable<CouponListArgs>, 'limit' | 'skip'> & {
1631
+ limit?: number;
1632
+ skip?: number;
1633
+ };
1634
+ type CouponCreateArgs = NonNullable<operations['coupons/create']['requestBody']>['content']['application/json'];
1635
+ type NonRepeatingParams = CouponCreateArgs & {
1636
+ duration: 'once' | 'forever';
1637
+ durationInMonths?: never;
1638
+ };
1639
+ type RepeatingParams = CouponCreateArgs & {
1640
+ duration: 'repeating';
1641
+ durationInMonths: number;
1642
+ };
1643
+ type AmountNonRepeating = {
1644
+ type: 'amount';
1645
+ } & Omit<NonRepeatingParams, 'percentOff'>;
1646
+ type AmountRepeating = {
1647
+ type: 'amount';
1648
+ } & Omit<RepeatingParams, 'percentOff'>;
1649
+ type PercentNonRepeating = {
1650
+ type: 'percent';
1651
+ } & Omit<NonRepeatingParams, 'amountOff' | 'currency'>;
1652
+ type PercentRepeating = {
1653
+ type: 'percent';
1654
+ } & Omit<RepeatingParams, 'amountOff' | 'currency'>;
1655
+ type CreateCouponParams = AmountNonRepeating | AmountRepeating | PercentNonRepeating | PercentRepeating;
1656
+ type PaymentList = operations['payments/list']['responses'][200]['content']['application/json'];
1657
+ type Payment = PaymentList['data'][number];
1658
+ type PaymentListArgs = operations['payments/list']['parameters']['query'];
1659
+ type PaymentListParams = Omit<NonNullable<PaymentListArgs>, 'limit' | 'skip'> & {
1660
+ limit?: number;
1661
+ skip?: number;
1662
+ };
3043
1663
 
3044
1664
  declare class CustomerResource {
3045
1665
  private client;
3046
- constructor(client: CheckoutPageClient);
1666
+ constructor(client: CheckoutPageApiClient);
3047
1667
  get(customerId: string): Promise<Customer>;
1668
+ list(args?: CustomerListParams): Promise<CustomerList>;
1669
+ }
1670
+
1671
+ declare class CouponResource {
1672
+ private client;
1673
+ constructor(client: CheckoutPageApiClient);
1674
+ list(args?: CouponListParams): Promise<CouponList>;
1675
+ create(params: CreateCouponParams): Promise<CreateCouponResponse>;
1676
+ }
1677
+
1678
+ declare class PaymentResource {
1679
+ private client;
1680
+ constructor(client: CheckoutPageApiClient);
1681
+ list(args?: PaymentListParams): Promise<PaymentList>;
3048
1682
  }
3049
1683
 
3050
1684
  declare class CheckoutPageError extends Error {
@@ -3056,6 +1690,9 @@ declare class AuthenticationError extends CheckoutPageError {
3056
1690
  declare class NotFoundError extends CheckoutPageError {
3057
1691
  constructor(message?: string);
3058
1692
  }
1693
+ declare class ConflictError extends CheckoutPageError {
1694
+ constructor(message?: string);
1695
+ }
3059
1696
  declare class RateLimitError extends CheckoutPageError {
3060
1697
  constructor(message?: string);
3061
1698
  }
@@ -3068,10 +1705,13 @@ declare class APIError extends CheckoutPageError {
3068
1705
  constructor(message: string, statusCode: number, response?: unknown);
3069
1706
  }
3070
1707
 
3071
- declare class CheckoutPage {
1708
+ declare class CheckoutPageClient {
3072
1709
  readonly customers: CustomerResource;
1710
+ readonly coupons: CouponResource;
1711
+ readonly payments: PaymentResource;
3073
1712
  private readonly client;
3074
- constructor(options: CheckoutPageClientOptions);
1713
+ constructor(options: CheckoutPageApiClientOptions);
3075
1714
  }
1715
+ declare const createCheckoutPageClient: (options: CheckoutPageApiClientOptions) => CheckoutPageClient;
3076
1716
 
3077
- export { APIError, type Address, AuthenticationError, CheckoutPage, type CheckoutPageClientOptions, CheckoutPageError, type Customer, NotFoundError, RateLimitError, type Shipping, ValidationError };
1717
+ export { APIError, type Address, AuthenticationError, type CheckoutPageApiClientOptions, CheckoutPageClient, CheckoutPageError, ConflictError, type Coupon, type CouponList, type Customer, NotFoundError, type Payment, type PaymentList, RateLimitError, type Shipping, ValidationError, createCheckoutPageClient };