stripe 16.0.0 → 16.2.0-beta.1

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.
Files changed (154) hide show
  1. package/CHANGELOG.md +761 -109
  2. package/README.md +33 -0
  3. package/VERSION +1 -1
  4. package/cjs/RequestSender.js +66 -5
  5. package/cjs/StripeResource.js +1 -1
  6. package/cjs/apiVersion.js +2 -1
  7. package/cjs/multipart.js +1 -1
  8. package/cjs/resources/AccountNotices.js +21 -0
  9. package/cjs/resources/Capital/FinancingOffers.js +21 -0
  10. package/cjs/resources/Capital/FinancingSummary.js +12 -0
  11. package/cjs/resources/Capital/FinancingTransactions.js +17 -0
  12. package/cjs/resources/FinancialConnections/Accounts.js +5 -0
  13. package/cjs/resources/GiftCards/Cards.js +23 -0
  14. package/cjs/resources/GiftCards/Transactions.js +33 -0
  15. package/cjs/resources/Invoices.js +25 -0
  16. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
  17. package/cjs/resources/Margins.js +22 -0
  18. package/cjs/resources/OAuth.js +1 -1
  19. package/cjs/resources/Orders.js +24 -0
  20. package/cjs/resources/PaymentIntents.js +4 -0
  21. package/cjs/resources/QuotePhases.js +22 -0
  22. package/cjs/resources/Quotes.js +32 -0
  23. package/cjs/resources/SubscriptionSchedules.js +4 -0
  24. package/cjs/resources/Tax/Forms.js +20 -0
  25. package/cjs/resources/Terminal/Readers.js +12 -0
  26. package/cjs/resources.js +36 -10
  27. package/cjs/stripe.core.js +6 -3
  28. package/cjs/utils.js +30 -3
  29. package/esm/RequestSender.js +67 -6
  30. package/esm/StripeResource.js +2 -2
  31. package/esm/apiVersion.js +1 -0
  32. package/esm/multipart.js +2 -2
  33. package/esm/resources/AccountNotices.js +18 -0
  34. package/esm/resources/Capital/FinancingOffers.js +18 -0
  35. package/esm/resources/Capital/FinancingSummary.js +9 -0
  36. package/esm/resources/Capital/FinancingTransactions.js +14 -0
  37. package/esm/resources/FinancialConnections/Accounts.js +5 -0
  38. package/esm/resources/GiftCards/Cards.js +20 -0
  39. package/esm/resources/GiftCards/Transactions.js +30 -0
  40. package/esm/resources/Invoices.js +25 -0
  41. package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
  42. package/esm/resources/Margins.js +19 -0
  43. package/esm/resources/OAuth.js +2 -2
  44. package/esm/resources/Orders.js +21 -0
  45. package/esm/resources/PaymentIntents.js +4 -0
  46. package/esm/resources/QuotePhases.js +19 -0
  47. package/esm/resources/Quotes.js +32 -0
  48. package/esm/resources/SubscriptionSchedules.js +4 -0
  49. package/esm/resources/Tax/Forms.js +17 -0
  50. package/esm/resources/Terminal/Readers.js +12 -0
  51. package/esm/resources.js +22 -0
  52. package/esm/stripe.core.js +6 -3
  53. package/esm/utils.js +27 -1
  54. package/package.json +1 -1
  55. package/types/AccountLinksResource.d.ts +5 -1
  56. package/types/AccountNotices.d.ts +110 -0
  57. package/types/AccountNoticesResource.d.ts +98 -0
  58. package/types/AccountSessions.d.ts +15 -0
  59. package/types/AccountSessionsResource.d.ts +205 -0
  60. package/types/Accounts.d.ts +88 -1
  61. package/types/AccountsResource.d.ts +204 -0
  62. package/types/Billing/MetersResource.d.ts +6 -2
  63. package/types/Capabilities.d.ts +1 -1
  64. package/types/Capital/FinancingOffers.d.ts +188 -0
  65. package/types/Capital/FinancingOffersResource.d.ts +97 -0
  66. package/types/Capital/FinancingSummary.d.ts +106 -0
  67. package/types/Capital/FinancingSummaryResource.d.ts +27 -0
  68. package/types/Capital/FinancingTransactions.d.ts +135 -0
  69. package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
  70. package/types/Charges.d.ts +67 -0
  71. package/types/ChargesResource.d.ts +1294 -0
  72. package/types/Checkout/Sessions.d.ts +36 -1
  73. package/types/Checkout/SessionsResource.d.ts +15 -1
  74. package/types/ConfirmationTokens.d.ts +83 -0
  75. package/types/Coupons.d.ts +1 -1
  76. package/types/CouponsResource.d.ts +1 -1
  77. package/types/CreditNotes.d.ts +21 -0
  78. package/types/CreditNotesResource.d.ts +72 -0
  79. package/types/CustomerSessions.d.ts +48 -0
  80. package/types/CustomerSessionsResource.d.ts +48 -0
  81. package/types/CustomersResource.d.ts +2 -0
  82. package/types/Disputes.d.ts +167 -0
  83. package/types/DisputesResource.d.ts +120 -0
  84. package/types/EventTypes.d.ts +426 -0
  85. package/types/Events.d.ts +83 -0
  86. package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
  87. package/types/FinancialConnections/Accounts.d.ts +29 -1
  88. package/types/FinancialConnections/AccountsResource.d.ts +35 -3
  89. package/types/FinancialConnections/Sessions.d.ts +58 -1
  90. package/types/FinancialConnections/SessionsResource.d.ts +47 -1
  91. package/types/GiftCards/Cards.d.ts +118 -0
  92. package/types/GiftCards/CardsResource.d.ts +159 -0
  93. package/types/GiftCards/Transactions.d.ts +129 -0
  94. package/types/GiftCards/TransactionsResource.d.ts +201 -0
  95. package/types/InvoiceItems.d.ts +5 -0
  96. package/types/InvoiceItemsResource.d.ts +98 -0
  97. package/types/InvoiceLineItems.d.ts +22 -0
  98. package/types/InvoicePayments.d.ts +91 -0
  99. package/types/Invoices.d.ts +123 -1
  100. package/types/InvoicesResource.d.ts +6477 -2302
  101. package/types/Issuing/CardholdersResource.d.ts +2 -1
  102. package/types/Issuing/Cards.d.ts +34 -0
  103. package/types/Issuing/CardsResource.d.ts +125 -0
  104. package/types/Issuing/CreditUnderwritingRecords.d.ts +446 -0
  105. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1017 -0
  106. package/types/LineItems.d.ts +7 -0
  107. package/types/Mandates.d.ts +77 -0
  108. package/types/Margins.d.ts +56 -0
  109. package/types/MarginsResource.d.ts +114 -0
  110. package/types/Orders.d.ts +1057 -0
  111. package/types/OrdersResource.d.ts +2711 -0
  112. package/types/PaymentIntents.d.ts +476 -1
  113. package/types/PaymentIntentsResource.d.ts +6735 -3354
  114. package/types/PaymentLinks.d.ts +4 -1
  115. package/types/PaymentLinksResource.d.ts +8 -2
  116. package/types/PaymentMethods.d.ts +62 -0
  117. package/types/PaymentMethodsResource.d.ts +110 -0
  118. package/types/Prices.d.ts +22 -0
  119. package/types/PricesResource.d.ts +22 -0
  120. package/types/Products.d.ts +39 -0
  121. package/types/ProductsResource.d.ts +36 -0
  122. package/types/QuoteLines.d.ts +634 -0
  123. package/types/QuotePhases.d.ts +198 -0
  124. package/types/QuotePhasesResource.d.ts +67 -0
  125. package/types/QuotePreviewInvoices.d.ts +1528 -0
  126. package/types/QuotePreviewSubscriptionSchedules.d.ts +778 -0
  127. package/types/Quotes.d.ts +578 -1
  128. package/types/QuotesResource.d.ts +3174 -265
  129. package/types/SetupAttempts.d.ts +8 -0
  130. package/types/SetupIntents.d.ts +117 -1
  131. package/types/SetupIntentsResource.d.ts +531 -3
  132. package/types/Sources.d.ts +23 -0
  133. package/types/SubscriptionItems.d.ts +21 -0
  134. package/types/SubscriptionItemsResource.d.ts +109 -0
  135. package/types/SubscriptionSchedules.d.ts +164 -0
  136. package/types/SubscriptionSchedulesResource.d.ts +1234 -16
  137. package/types/Subscriptions.d.ts +54 -1
  138. package/types/SubscriptionsResource.d.ts +369 -2
  139. package/types/Tax/Forms.d.ts +133 -0
  140. package/types/Tax/FormsResource.d.ts +90 -0
  141. package/types/Terminal/Configurations.d.ts +14 -0
  142. package/types/Terminal/ConfigurationsResource.d.ts +36 -0
  143. package/types/Terminal/Readers.d.ts +278 -0
  144. package/types/Terminal/ReadersResource.d.ts +208 -0
  145. package/types/TestHelpers/ConfirmationTokensResource.d.ts +55 -0
  146. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
  147. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
  148. package/types/Treasury/OutboundTransfers.d.ts +26 -0
  149. package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
  150. package/types/Treasury/ReceivedCredits.d.ts +26 -0
  151. package/types/Treasury/ReceivedDebits.d.ts +31 -0
  152. package/types/WebhookEndpointsResource.d.ts +50 -0
  153. package/types/index.d.ts +61 -0
  154. package/types/lib.d.ts +12 -0
@@ -186,6 +186,11 @@ declare module 'stripe' {
186
186
  */
187
187
  metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
188
188
 
189
+ /**
190
+ * Provides industry-specific information about the charge.
191
+ */
192
+ payment_details?: ChargeUpdateParams.PaymentDetails;
193
+
189
194
  /**
190
195
  * This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address.
191
196
  */
@@ -214,6 +219,648 @@ declare module 'stripe' {
214
219
  type UserReport = 'fraudulent' | 'safe';
215
220
  }
216
221
 
222
+ interface PaymentDetails {
223
+ /**
224
+ * Car rental details for this PaymentIntent.
225
+ */
226
+ car_rental?: PaymentDetails.CarRental;
227
+
228
+ /**
229
+ * Event details for this PaymentIntent
230
+ */
231
+ event_details?: PaymentDetails.EventDetails;
232
+
233
+ /**
234
+ * Flight reservation details for this PaymentIntent
235
+ */
236
+ flight?: PaymentDetails.Flight;
237
+
238
+ /**
239
+ * Lodging reservation details for this PaymentIntent
240
+ */
241
+ lodging?: PaymentDetails.Lodging;
242
+
243
+ /**
244
+ * Subscription details for this PaymentIntent
245
+ */
246
+ subscription?: PaymentDetails.Subscription;
247
+ }
248
+
249
+ namespace PaymentDetails {
250
+ interface CarRental {
251
+ /**
252
+ * Affiliate details for this purchase.
253
+ */
254
+ affiliate?: CarRental.Affiliate;
255
+
256
+ /**
257
+ * The booking number associated with the car rental.
258
+ */
259
+ booking_number: string;
260
+
261
+ /**
262
+ * Class code of the car.
263
+ */
264
+ car_class_code?: string;
265
+
266
+ /**
267
+ * Make of the car.
268
+ */
269
+ car_make?: string;
270
+
271
+ /**
272
+ * Model of the car.
273
+ */
274
+ car_model?: string;
275
+
276
+ /**
277
+ * The name of the rental car company.
278
+ */
279
+ company?: string;
280
+
281
+ /**
282
+ * The customer service phone number of the car rental company.
283
+ */
284
+ customer_service_phone_number?: string;
285
+
286
+ /**
287
+ * Number of days the car is being rented.
288
+ */
289
+ days_rented: number;
290
+
291
+ /**
292
+ * Delivery details for this purchase.
293
+ */
294
+ delivery?: CarRental.Delivery;
295
+
296
+ /**
297
+ * The details of the passengers in the travel reservation
298
+ */
299
+ drivers?: Array<CarRental.Driver>;
300
+
301
+ /**
302
+ * List of additional charges being billed.
303
+ */
304
+ extra_charges?: Array<CarRental.ExtraCharge>;
305
+
306
+ /**
307
+ * Indicates if the customer did not keep nor cancel their booking.
308
+ */
309
+ no_show?: boolean;
310
+
311
+ /**
312
+ * Car pick-up address.
313
+ */
314
+ pickup_address?: Stripe.AddressParam;
315
+
316
+ /**
317
+ * Car pick-up time. Measured in seconds since the Unix epoch.
318
+ */
319
+ pickup_at: number;
320
+
321
+ /**
322
+ * Rental rate.
323
+ */
324
+ rate_amount?: number;
325
+
326
+ /**
327
+ * The frequency at which the rate amount is applied. One of `day`, `week` or `month`
328
+ */
329
+ rate_interval?: CarRental.RateInterval;
330
+
331
+ /**
332
+ * The name of the person or entity renting the car.
333
+ */
334
+ renter_name?: string;
335
+
336
+ /**
337
+ * Car return address.
338
+ */
339
+ return_address?: Stripe.AddressParam;
340
+
341
+ /**
342
+ * Car return time. Measured in seconds since the Unix epoch.
343
+ */
344
+ return_at: number;
345
+
346
+ /**
347
+ * Indicates whether the goods or services are tax-exempt or tax is not collected.
348
+ */
349
+ tax_exempt?: boolean;
350
+ }
351
+
352
+ namespace CarRental {
353
+ interface Affiliate {
354
+ /**
355
+ * The name of the affiliate that originated the purchase.
356
+ */
357
+ name: string;
358
+ }
359
+
360
+ interface Delivery {
361
+ /**
362
+ * The delivery method for the payment
363
+ */
364
+ mode?: Delivery.Mode;
365
+
366
+ /**
367
+ * Details of the recipient.
368
+ */
369
+ recipient?: Delivery.Recipient;
370
+ }
371
+
372
+ namespace Delivery {
373
+ type Mode = 'email' | 'phone' | 'pickup' | 'post';
374
+
375
+ interface Recipient {
376
+ /**
377
+ * The email of the recipient the ticket is delivered to.
378
+ */
379
+ email?: string;
380
+
381
+ /**
382
+ * The name of the recipient the ticket is delivered to.
383
+ */
384
+ name?: string;
385
+
386
+ /**
387
+ * The phone number of the recipient the ticket is delivered to.
388
+ */
389
+ phone?: string;
390
+ }
391
+ }
392
+
393
+ interface Driver {
394
+ /**
395
+ * Full name of the person or entity on the car reservation.
396
+ */
397
+ name: string;
398
+ }
399
+
400
+ type ExtraCharge =
401
+ | 'extra_mileage'
402
+ | 'gas'
403
+ | 'late_return'
404
+ | 'one_way_service'
405
+ | 'parking_violation';
406
+
407
+ type RateInterval = 'day' | 'month' | 'week';
408
+ }
409
+
410
+ interface EventDetails {
411
+ /**
412
+ * Indicates if the tickets are digitally checked when entering the venue.
413
+ */
414
+ access_controlled_venue?: boolean;
415
+
416
+ /**
417
+ * The event location's address.
418
+ */
419
+ address?: Stripe.AddressParam;
420
+
421
+ /**
422
+ * Affiliate details for this purchase.
423
+ */
424
+ affiliate?: EventDetails.Affiliate;
425
+
426
+ /**
427
+ * The name of the company
428
+ */
429
+ company?: string;
430
+
431
+ /**
432
+ * Delivery details for this purchase.
433
+ */
434
+ delivery?: EventDetails.Delivery;
435
+
436
+ /**
437
+ * Event end time. Measured in seconds since the Unix epoch.
438
+ */
439
+ ends_at?: number;
440
+
441
+ /**
442
+ * Type of the event entertainment (concert, sports event etc)
443
+ */
444
+ genre?: string;
445
+
446
+ /**
447
+ * The name of the event.
448
+ */
449
+ name: string;
450
+
451
+ /**
452
+ * Event start time. Measured in seconds since the Unix epoch.
453
+ */
454
+ starts_at?: number;
455
+ }
456
+
457
+ namespace EventDetails {
458
+ interface Affiliate {
459
+ /**
460
+ * The name of the affiliate that originated the purchase.
461
+ */
462
+ name: string;
463
+ }
464
+
465
+ interface Delivery {
466
+ /**
467
+ * The delivery method for the payment
468
+ */
469
+ mode?: Delivery.Mode;
470
+
471
+ /**
472
+ * Details of the recipient.
473
+ */
474
+ recipient?: Delivery.Recipient;
475
+ }
476
+
477
+ namespace Delivery {
478
+ type Mode = 'email' | 'phone' | 'pickup' | 'post';
479
+
480
+ interface Recipient {
481
+ /**
482
+ * The email of the recipient the ticket is delivered to.
483
+ */
484
+ email?: string;
485
+
486
+ /**
487
+ * The name of the recipient the ticket is delivered to.
488
+ */
489
+ name?: string;
490
+
491
+ /**
492
+ * The phone number of the recipient the ticket is delivered to.
493
+ */
494
+ phone?: string;
495
+ }
496
+ }
497
+ }
498
+
499
+ interface Flight {
500
+ /**
501
+ * Affiliate details for this purchase.
502
+ */
503
+ affiliate?: Flight.Affiliate;
504
+
505
+ /**
506
+ * The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking.
507
+ */
508
+ agency_number?: string;
509
+
510
+ /**
511
+ * The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket.
512
+ */
513
+ carrier?: string;
514
+
515
+ /**
516
+ * Delivery details for this purchase.
517
+ */
518
+ delivery?: Flight.Delivery;
519
+
520
+ /**
521
+ * The name of the person or entity on the reservation.
522
+ */
523
+ passenger_name?: string;
524
+
525
+ /**
526
+ * The details of the passengers in the travel reservation.
527
+ */
528
+ passengers?: Array<Flight.Passenger>;
529
+
530
+ /**
531
+ * The individual flight segments associated with the trip.
532
+ */
533
+ segments: Array<Flight.Segment>;
534
+
535
+ /**
536
+ * The ticket number associated with the travel reservation.
537
+ */
538
+ ticket_number?: string;
539
+ }
540
+
541
+ namespace Flight {
542
+ interface Affiliate {
543
+ /**
544
+ * The name of the affiliate that originated the purchase.
545
+ */
546
+ name: string;
547
+ }
548
+
549
+ interface Delivery {
550
+ /**
551
+ * The delivery method for the payment
552
+ */
553
+ mode?: Delivery.Mode;
554
+
555
+ /**
556
+ * Details of the recipient.
557
+ */
558
+ recipient?: Delivery.Recipient;
559
+ }
560
+
561
+ namespace Delivery {
562
+ type Mode = 'email' | 'phone' | 'pickup' | 'post';
563
+
564
+ interface Recipient {
565
+ /**
566
+ * The email of the recipient the ticket is delivered to.
567
+ */
568
+ email?: string;
569
+
570
+ /**
571
+ * The name of the recipient the ticket is delivered to.
572
+ */
573
+ name?: string;
574
+
575
+ /**
576
+ * The phone number of the recipient the ticket is delivered to.
577
+ */
578
+ phone?: string;
579
+ }
580
+ }
581
+
582
+ interface Passenger {
583
+ /**
584
+ * Full name of the person or entity on the flight reservation.
585
+ */
586
+ name: string;
587
+ }
588
+
589
+ interface Segment {
590
+ /**
591
+ * The flight segment amount.
592
+ */
593
+ amount?: number;
594
+
595
+ /**
596
+ * The International Air Transport Association (IATA) airport code for the arrival airport.
597
+ */
598
+ arrival_airport?: string;
599
+
600
+ /**
601
+ * The arrival time for the flight segment. Measured in seconds since the Unix epoch.
602
+ */
603
+ arrives_at?: number;
604
+
605
+ /**
606
+ * The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment.
607
+ */
608
+ carrier?: string;
609
+
610
+ /**
611
+ * The departure time for the flight segment. Measured in seconds since the Unix epoch.
612
+ */
613
+ departs_at: number;
614
+
615
+ /**
616
+ * The International Air Transport Association (IATA) airport code for the departure airport.
617
+ */
618
+ departure_airport?: string;
619
+
620
+ /**
621
+ * The flight number associated with the segment
622
+ */
623
+ flight_number?: string;
624
+
625
+ /**
626
+ * The fare class for the segment.
627
+ */
628
+ service_class?: Segment.ServiceClass;
629
+ }
630
+
631
+ namespace Segment {
632
+ type ServiceClass =
633
+ | 'business'
634
+ | 'economy'
635
+ | 'first'
636
+ | 'premium_economy';
637
+ }
638
+ }
639
+
640
+ interface Lodging {
641
+ /**
642
+ * The lodging location's address.
643
+ */
644
+ address?: Stripe.AddressParam;
645
+
646
+ /**
647
+ * The number of adults on the booking
648
+ */
649
+ adults?: number;
650
+
651
+ /**
652
+ * Affiliate details for this purchase.
653
+ */
654
+ affiliate?: Lodging.Affiliate;
655
+
656
+ /**
657
+ * The booking number associated with the lodging reservation.
658
+ */
659
+ booking_number?: string;
660
+
661
+ /**
662
+ * The lodging category
663
+ */
664
+ category?: Lodging.Category;
665
+
666
+ /**
667
+ * Loding check-in time. Measured in seconds since the Unix epoch.
668
+ */
669
+ checkin_at: number;
670
+
671
+ /**
672
+ * Lodging check-out time. Measured in seconds since the Unix epoch.
673
+ */
674
+ checkout_at: number;
675
+
676
+ /**
677
+ * The customer service phone number of the lodging company.
678
+ */
679
+ customer_service_phone_number?: string;
680
+
681
+ /**
682
+ * The daily lodging room rate.
683
+ */
684
+ daily_room_rate_amount?: number;
685
+
686
+ /**
687
+ * Delivery details for this purchase.
688
+ */
689
+ delivery?: Lodging.Delivery;
690
+
691
+ /**
692
+ * List of additional charges being billed.
693
+ */
694
+ extra_charges?: Array<Lodging.ExtraCharge>;
695
+
696
+ /**
697
+ * Indicates whether the lodging location is compliant with the Fire Safety Act.
698
+ */
699
+ fire_safety_act_compliance?: boolean;
700
+
701
+ /**
702
+ * The name of the lodging location.
703
+ */
704
+ name?: string;
705
+
706
+ /**
707
+ * Indicates if the customer did not keep their booking while failing to cancel the reservation.
708
+ */
709
+ no_show?: boolean;
710
+
711
+ /**
712
+ * The number of rooms on the booking
713
+ */
714
+ number_of_rooms?: number;
715
+
716
+ /**
717
+ * The details of the passengers in the travel reservation
718
+ */
719
+ passengers?: Array<Lodging.Passenger>;
720
+
721
+ /**
722
+ * The phone number of the lodging location.
723
+ */
724
+ property_phone_number?: string;
725
+
726
+ /**
727
+ * The room class for this purchase.
728
+ */
729
+ room_class?: string;
730
+
731
+ /**
732
+ * The number of room nights
733
+ */
734
+ room_nights?: number;
735
+
736
+ /**
737
+ * The total tax amount associating with the room reservation.
738
+ */
739
+ total_room_tax_amount?: number;
740
+
741
+ /**
742
+ * The total tax amount
743
+ */
744
+ total_tax_amount?: number;
745
+ }
746
+
747
+ namespace Lodging {
748
+ interface Affiliate {
749
+ /**
750
+ * The name of the affiliate that originated the purchase.
751
+ */
752
+ name: string;
753
+ }
754
+
755
+ type Category = 'hotel' | 'vacation_rental';
756
+
757
+ interface Delivery {
758
+ /**
759
+ * The delivery method for the payment
760
+ */
761
+ mode?: Delivery.Mode;
762
+
763
+ /**
764
+ * Details of the recipient.
765
+ */
766
+ recipient?: Delivery.Recipient;
767
+ }
768
+
769
+ namespace Delivery {
770
+ type Mode = 'email' | 'phone' | 'pickup' | 'post';
771
+
772
+ interface Recipient {
773
+ /**
774
+ * The email of the recipient the ticket is delivered to.
775
+ */
776
+ email?: string;
777
+
778
+ /**
779
+ * The name of the recipient the ticket is delivered to.
780
+ */
781
+ name?: string;
782
+
783
+ /**
784
+ * The phone number of the recipient the ticket is delivered to.
785
+ */
786
+ phone?: string;
787
+ }
788
+ }
789
+
790
+ type ExtraCharge =
791
+ | 'gift_shop'
792
+ | 'laundry'
793
+ | 'mini_bar'
794
+ | 'other'
795
+ | 'restaurant'
796
+ | 'telephone';
797
+
798
+ interface Passenger {
799
+ /**
800
+ * Full name of the person or entity on the lodging reservation.
801
+ */
802
+ name: string;
803
+ }
804
+ }
805
+
806
+ interface Subscription {
807
+ /**
808
+ * Affiliate details for this purchase.
809
+ */
810
+ affiliate?: Subscription.Affiliate;
811
+
812
+ /**
813
+ * Info whether the subscription will be auto renewed upon expiry.
814
+ */
815
+ auto_renewal?: boolean;
816
+
817
+ /**
818
+ * Subscription billing details for this purchase.
819
+ */
820
+ billing_interval?: Subscription.BillingInterval;
821
+
822
+ /**
823
+ * Subscription end time. Measured in seconds since the Unix epoch.
824
+ */
825
+ ends_at?: number;
826
+
827
+ /**
828
+ * Name of the product on subscription. e.g. Apple Music Subscription
829
+ */
830
+ name: string;
831
+
832
+ /**
833
+ * Subscription start time. Measured in seconds since the Unix epoch.
834
+ */
835
+ starts_at?: number;
836
+ }
837
+
838
+ namespace Subscription {
839
+ interface Affiliate {
840
+ /**
841
+ * The name of the affiliate that originated the purchase.
842
+ */
843
+ name: string;
844
+ }
845
+
846
+ interface BillingInterval {
847
+ /**
848
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
849
+ */
850
+ count: number;
851
+
852
+ /**
853
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
854
+ */
855
+ interval: BillingInterval.Interval;
856
+ }
857
+
858
+ namespace BillingInterval {
859
+ type Interval = 'day' | 'month' | 'week' | 'year';
860
+ }
861
+ }
862
+ }
863
+
217
864
  interface Shipping {
218
865
  /**
219
866
  * Shipping address.
@@ -290,6 +937,11 @@ declare module 'stripe' {
290
937
  */
291
938
  expand?: Array<string>;
292
939
 
940
+ /**
941
+ * Provides industry-specific information about the charge.
942
+ */
943
+ payment_details?: ChargeCaptureParams.PaymentDetails;
944
+
293
945
  /**
294
946
  * The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode.
295
947
  */
@@ -317,6 +969,648 @@ declare module 'stripe' {
317
969
  }
318
970
 
319
971
  namespace ChargeCaptureParams {
972
+ interface PaymentDetails {
973
+ /**
974
+ * Car rental details for this PaymentIntent.
975
+ */
976
+ car_rental?: PaymentDetails.CarRental;
977
+
978
+ /**
979
+ * Event details for this PaymentIntent
980
+ */
981
+ event_details?: PaymentDetails.EventDetails;
982
+
983
+ /**
984
+ * Flight reservation details for this PaymentIntent
985
+ */
986
+ flight?: PaymentDetails.Flight;
987
+
988
+ /**
989
+ * Lodging reservation details for this PaymentIntent
990
+ */
991
+ lodging?: PaymentDetails.Lodging;
992
+
993
+ /**
994
+ * Subscription details for this PaymentIntent
995
+ */
996
+ subscription?: PaymentDetails.Subscription;
997
+ }
998
+
999
+ namespace PaymentDetails {
1000
+ interface CarRental {
1001
+ /**
1002
+ * Affiliate details for this purchase.
1003
+ */
1004
+ affiliate?: CarRental.Affiliate;
1005
+
1006
+ /**
1007
+ * The booking number associated with the car rental.
1008
+ */
1009
+ booking_number: string;
1010
+
1011
+ /**
1012
+ * Class code of the car.
1013
+ */
1014
+ car_class_code?: string;
1015
+
1016
+ /**
1017
+ * Make of the car.
1018
+ */
1019
+ car_make?: string;
1020
+
1021
+ /**
1022
+ * Model of the car.
1023
+ */
1024
+ car_model?: string;
1025
+
1026
+ /**
1027
+ * The name of the rental car company.
1028
+ */
1029
+ company?: string;
1030
+
1031
+ /**
1032
+ * The customer service phone number of the car rental company.
1033
+ */
1034
+ customer_service_phone_number?: string;
1035
+
1036
+ /**
1037
+ * Number of days the car is being rented.
1038
+ */
1039
+ days_rented: number;
1040
+
1041
+ /**
1042
+ * Delivery details for this purchase.
1043
+ */
1044
+ delivery?: CarRental.Delivery;
1045
+
1046
+ /**
1047
+ * The details of the passengers in the travel reservation
1048
+ */
1049
+ drivers?: Array<CarRental.Driver>;
1050
+
1051
+ /**
1052
+ * List of additional charges being billed.
1053
+ */
1054
+ extra_charges?: Array<CarRental.ExtraCharge>;
1055
+
1056
+ /**
1057
+ * Indicates if the customer did not keep nor cancel their booking.
1058
+ */
1059
+ no_show?: boolean;
1060
+
1061
+ /**
1062
+ * Car pick-up address.
1063
+ */
1064
+ pickup_address?: Stripe.AddressParam;
1065
+
1066
+ /**
1067
+ * Car pick-up time. Measured in seconds since the Unix epoch.
1068
+ */
1069
+ pickup_at: number;
1070
+
1071
+ /**
1072
+ * Rental rate.
1073
+ */
1074
+ rate_amount?: number;
1075
+
1076
+ /**
1077
+ * The frequency at which the rate amount is applied. One of `day`, `week` or `month`
1078
+ */
1079
+ rate_interval?: CarRental.RateInterval;
1080
+
1081
+ /**
1082
+ * The name of the person or entity renting the car.
1083
+ */
1084
+ renter_name?: string;
1085
+
1086
+ /**
1087
+ * Car return address.
1088
+ */
1089
+ return_address?: Stripe.AddressParam;
1090
+
1091
+ /**
1092
+ * Car return time. Measured in seconds since the Unix epoch.
1093
+ */
1094
+ return_at: number;
1095
+
1096
+ /**
1097
+ * Indicates whether the goods or services are tax-exempt or tax is not collected.
1098
+ */
1099
+ tax_exempt?: boolean;
1100
+ }
1101
+
1102
+ namespace CarRental {
1103
+ interface Affiliate {
1104
+ /**
1105
+ * The name of the affiliate that originated the purchase.
1106
+ */
1107
+ name: string;
1108
+ }
1109
+
1110
+ interface Delivery {
1111
+ /**
1112
+ * The delivery method for the payment
1113
+ */
1114
+ mode?: Delivery.Mode;
1115
+
1116
+ /**
1117
+ * Details of the recipient.
1118
+ */
1119
+ recipient?: Delivery.Recipient;
1120
+ }
1121
+
1122
+ namespace Delivery {
1123
+ type Mode = 'email' | 'phone' | 'pickup' | 'post';
1124
+
1125
+ interface Recipient {
1126
+ /**
1127
+ * The email of the recipient the ticket is delivered to.
1128
+ */
1129
+ email?: string;
1130
+
1131
+ /**
1132
+ * The name of the recipient the ticket is delivered to.
1133
+ */
1134
+ name?: string;
1135
+
1136
+ /**
1137
+ * The phone number of the recipient the ticket is delivered to.
1138
+ */
1139
+ phone?: string;
1140
+ }
1141
+ }
1142
+
1143
+ interface Driver {
1144
+ /**
1145
+ * Full name of the person or entity on the car reservation.
1146
+ */
1147
+ name: string;
1148
+ }
1149
+
1150
+ type ExtraCharge =
1151
+ | 'extra_mileage'
1152
+ | 'gas'
1153
+ | 'late_return'
1154
+ | 'one_way_service'
1155
+ | 'parking_violation';
1156
+
1157
+ type RateInterval = 'day' | 'month' | 'week';
1158
+ }
1159
+
1160
+ interface EventDetails {
1161
+ /**
1162
+ * Indicates if the tickets are digitally checked when entering the venue.
1163
+ */
1164
+ access_controlled_venue?: boolean;
1165
+
1166
+ /**
1167
+ * The event location's address.
1168
+ */
1169
+ address?: Stripe.AddressParam;
1170
+
1171
+ /**
1172
+ * Affiliate details for this purchase.
1173
+ */
1174
+ affiliate?: EventDetails.Affiliate;
1175
+
1176
+ /**
1177
+ * The name of the company
1178
+ */
1179
+ company?: string;
1180
+
1181
+ /**
1182
+ * Delivery details for this purchase.
1183
+ */
1184
+ delivery?: EventDetails.Delivery;
1185
+
1186
+ /**
1187
+ * Event end time. Measured in seconds since the Unix epoch.
1188
+ */
1189
+ ends_at?: number;
1190
+
1191
+ /**
1192
+ * Type of the event entertainment (concert, sports event etc)
1193
+ */
1194
+ genre?: string;
1195
+
1196
+ /**
1197
+ * The name of the event.
1198
+ */
1199
+ name: string;
1200
+
1201
+ /**
1202
+ * Event start time. Measured in seconds since the Unix epoch.
1203
+ */
1204
+ starts_at?: number;
1205
+ }
1206
+
1207
+ namespace EventDetails {
1208
+ interface Affiliate {
1209
+ /**
1210
+ * The name of the affiliate that originated the purchase.
1211
+ */
1212
+ name: string;
1213
+ }
1214
+
1215
+ interface Delivery {
1216
+ /**
1217
+ * The delivery method for the payment
1218
+ */
1219
+ mode?: Delivery.Mode;
1220
+
1221
+ /**
1222
+ * Details of the recipient.
1223
+ */
1224
+ recipient?: Delivery.Recipient;
1225
+ }
1226
+
1227
+ namespace Delivery {
1228
+ type Mode = 'email' | 'phone' | 'pickup' | 'post';
1229
+
1230
+ interface Recipient {
1231
+ /**
1232
+ * The email of the recipient the ticket is delivered to.
1233
+ */
1234
+ email?: string;
1235
+
1236
+ /**
1237
+ * The name of the recipient the ticket is delivered to.
1238
+ */
1239
+ name?: string;
1240
+
1241
+ /**
1242
+ * The phone number of the recipient the ticket is delivered to.
1243
+ */
1244
+ phone?: string;
1245
+ }
1246
+ }
1247
+ }
1248
+
1249
+ interface Flight {
1250
+ /**
1251
+ * Affiliate details for this purchase.
1252
+ */
1253
+ affiliate?: Flight.Affiliate;
1254
+
1255
+ /**
1256
+ * The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking.
1257
+ */
1258
+ agency_number?: string;
1259
+
1260
+ /**
1261
+ * The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket.
1262
+ */
1263
+ carrier?: string;
1264
+
1265
+ /**
1266
+ * Delivery details for this purchase.
1267
+ */
1268
+ delivery?: Flight.Delivery;
1269
+
1270
+ /**
1271
+ * The name of the person or entity on the reservation.
1272
+ */
1273
+ passenger_name?: string;
1274
+
1275
+ /**
1276
+ * The details of the passengers in the travel reservation.
1277
+ */
1278
+ passengers?: Array<Flight.Passenger>;
1279
+
1280
+ /**
1281
+ * The individual flight segments associated with the trip.
1282
+ */
1283
+ segments: Array<Flight.Segment>;
1284
+
1285
+ /**
1286
+ * The ticket number associated with the travel reservation.
1287
+ */
1288
+ ticket_number?: string;
1289
+ }
1290
+
1291
+ namespace Flight {
1292
+ interface Affiliate {
1293
+ /**
1294
+ * The name of the affiliate that originated the purchase.
1295
+ */
1296
+ name: string;
1297
+ }
1298
+
1299
+ interface Delivery {
1300
+ /**
1301
+ * The delivery method for the payment
1302
+ */
1303
+ mode?: Delivery.Mode;
1304
+
1305
+ /**
1306
+ * Details of the recipient.
1307
+ */
1308
+ recipient?: Delivery.Recipient;
1309
+ }
1310
+
1311
+ namespace Delivery {
1312
+ type Mode = 'email' | 'phone' | 'pickup' | 'post';
1313
+
1314
+ interface Recipient {
1315
+ /**
1316
+ * The email of the recipient the ticket is delivered to.
1317
+ */
1318
+ email?: string;
1319
+
1320
+ /**
1321
+ * The name of the recipient the ticket is delivered to.
1322
+ */
1323
+ name?: string;
1324
+
1325
+ /**
1326
+ * The phone number of the recipient the ticket is delivered to.
1327
+ */
1328
+ phone?: string;
1329
+ }
1330
+ }
1331
+
1332
+ interface Passenger {
1333
+ /**
1334
+ * Full name of the person or entity on the flight reservation.
1335
+ */
1336
+ name: string;
1337
+ }
1338
+
1339
+ interface Segment {
1340
+ /**
1341
+ * The flight segment amount.
1342
+ */
1343
+ amount?: number;
1344
+
1345
+ /**
1346
+ * The International Air Transport Association (IATA) airport code for the arrival airport.
1347
+ */
1348
+ arrival_airport?: string;
1349
+
1350
+ /**
1351
+ * The arrival time for the flight segment. Measured in seconds since the Unix epoch.
1352
+ */
1353
+ arrives_at?: number;
1354
+
1355
+ /**
1356
+ * The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment.
1357
+ */
1358
+ carrier?: string;
1359
+
1360
+ /**
1361
+ * The departure time for the flight segment. Measured in seconds since the Unix epoch.
1362
+ */
1363
+ departs_at: number;
1364
+
1365
+ /**
1366
+ * The International Air Transport Association (IATA) airport code for the departure airport.
1367
+ */
1368
+ departure_airport?: string;
1369
+
1370
+ /**
1371
+ * The flight number associated with the segment
1372
+ */
1373
+ flight_number?: string;
1374
+
1375
+ /**
1376
+ * The fare class for the segment.
1377
+ */
1378
+ service_class?: Segment.ServiceClass;
1379
+ }
1380
+
1381
+ namespace Segment {
1382
+ type ServiceClass =
1383
+ | 'business'
1384
+ | 'economy'
1385
+ | 'first'
1386
+ | 'premium_economy';
1387
+ }
1388
+ }
1389
+
1390
+ interface Lodging {
1391
+ /**
1392
+ * The lodging location's address.
1393
+ */
1394
+ address?: Stripe.AddressParam;
1395
+
1396
+ /**
1397
+ * The number of adults on the booking
1398
+ */
1399
+ adults?: number;
1400
+
1401
+ /**
1402
+ * Affiliate details for this purchase.
1403
+ */
1404
+ affiliate?: Lodging.Affiliate;
1405
+
1406
+ /**
1407
+ * The booking number associated with the lodging reservation.
1408
+ */
1409
+ booking_number?: string;
1410
+
1411
+ /**
1412
+ * The lodging category
1413
+ */
1414
+ category?: Lodging.Category;
1415
+
1416
+ /**
1417
+ * Loding check-in time. Measured in seconds since the Unix epoch.
1418
+ */
1419
+ checkin_at: number;
1420
+
1421
+ /**
1422
+ * Lodging check-out time. Measured in seconds since the Unix epoch.
1423
+ */
1424
+ checkout_at: number;
1425
+
1426
+ /**
1427
+ * The customer service phone number of the lodging company.
1428
+ */
1429
+ customer_service_phone_number?: string;
1430
+
1431
+ /**
1432
+ * The daily lodging room rate.
1433
+ */
1434
+ daily_room_rate_amount?: number;
1435
+
1436
+ /**
1437
+ * Delivery details for this purchase.
1438
+ */
1439
+ delivery?: Lodging.Delivery;
1440
+
1441
+ /**
1442
+ * List of additional charges being billed.
1443
+ */
1444
+ extra_charges?: Array<Lodging.ExtraCharge>;
1445
+
1446
+ /**
1447
+ * Indicates whether the lodging location is compliant with the Fire Safety Act.
1448
+ */
1449
+ fire_safety_act_compliance?: boolean;
1450
+
1451
+ /**
1452
+ * The name of the lodging location.
1453
+ */
1454
+ name?: string;
1455
+
1456
+ /**
1457
+ * Indicates if the customer did not keep their booking while failing to cancel the reservation.
1458
+ */
1459
+ no_show?: boolean;
1460
+
1461
+ /**
1462
+ * The number of rooms on the booking
1463
+ */
1464
+ number_of_rooms?: number;
1465
+
1466
+ /**
1467
+ * The details of the passengers in the travel reservation
1468
+ */
1469
+ passengers?: Array<Lodging.Passenger>;
1470
+
1471
+ /**
1472
+ * The phone number of the lodging location.
1473
+ */
1474
+ property_phone_number?: string;
1475
+
1476
+ /**
1477
+ * The room class for this purchase.
1478
+ */
1479
+ room_class?: string;
1480
+
1481
+ /**
1482
+ * The number of room nights
1483
+ */
1484
+ room_nights?: number;
1485
+
1486
+ /**
1487
+ * The total tax amount associating with the room reservation.
1488
+ */
1489
+ total_room_tax_amount?: number;
1490
+
1491
+ /**
1492
+ * The total tax amount
1493
+ */
1494
+ total_tax_amount?: number;
1495
+ }
1496
+
1497
+ namespace Lodging {
1498
+ interface Affiliate {
1499
+ /**
1500
+ * The name of the affiliate that originated the purchase.
1501
+ */
1502
+ name: string;
1503
+ }
1504
+
1505
+ type Category = 'hotel' | 'vacation_rental';
1506
+
1507
+ interface Delivery {
1508
+ /**
1509
+ * The delivery method for the payment
1510
+ */
1511
+ mode?: Delivery.Mode;
1512
+
1513
+ /**
1514
+ * Details of the recipient.
1515
+ */
1516
+ recipient?: Delivery.Recipient;
1517
+ }
1518
+
1519
+ namespace Delivery {
1520
+ type Mode = 'email' | 'phone' | 'pickup' | 'post';
1521
+
1522
+ interface Recipient {
1523
+ /**
1524
+ * The email of the recipient the ticket is delivered to.
1525
+ */
1526
+ email?: string;
1527
+
1528
+ /**
1529
+ * The name of the recipient the ticket is delivered to.
1530
+ */
1531
+ name?: string;
1532
+
1533
+ /**
1534
+ * The phone number of the recipient the ticket is delivered to.
1535
+ */
1536
+ phone?: string;
1537
+ }
1538
+ }
1539
+
1540
+ type ExtraCharge =
1541
+ | 'gift_shop'
1542
+ | 'laundry'
1543
+ | 'mini_bar'
1544
+ | 'other'
1545
+ | 'restaurant'
1546
+ | 'telephone';
1547
+
1548
+ interface Passenger {
1549
+ /**
1550
+ * Full name of the person or entity on the lodging reservation.
1551
+ */
1552
+ name: string;
1553
+ }
1554
+ }
1555
+
1556
+ interface Subscription {
1557
+ /**
1558
+ * Affiliate details for this purchase.
1559
+ */
1560
+ affiliate?: Subscription.Affiliate;
1561
+
1562
+ /**
1563
+ * Info whether the subscription will be auto renewed upon expiry.
1564
+ */
1565
+ auto_renewal?: boolean;
1566
+
1567
+ /**
1568
+ * Subscription billing details for this purchase.
1569
+ */
1570
+ billing_interval?: Subscription.BillingInterval;
1571
+
1572
+ /**
1573
+ * Subscription end time. Measured in seconds since the Unix epoch.
1574
+ */
1575
+ ends_at?: number;
1576
+
1577
+ /**
1578
+ * Name of the product on subscription. e.g. Apple Music Subscription
1579
+ */
1580
+ name: string;
1581
+
1582
+ /**
1583
+ * Subscription start time. Measured in seconds since the Unix epoch.
1584
+ */
1585
+ starts_at?: number;
1586
+ }
1587
+
1588
+ namespace Subscription {
1589
+ interface Affiliate {
1590
+ /**
1591
+ * The name of the affiliate that originated the purchase.
1592
+ */
1593
+ name: string;
1594
+ }
1595
+
1596
+ interface BillingInterval {
1597
+ /**
1598
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1599
+ */
1600
+ count: number;
1601
+
1602
+ /**
1603
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1604
+ */
1605
+ interval: BillingInterval.Interval;
1606
+ }
1607
+
1608
+ namespace BillingInterval {
1609
+ type Interval = 'day' | 'month' | 'week' | 'year';
1610
+ }
1611
+ }
1612
+ }
1613
+
320
1614
  interface TransferData {
321
1615
  /**
322
1616
  * The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.