stripe 17.3.0-beta.1 → 17.3.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 (166) hide show
  1. package/CHANGELOG.md +148 -918
  2. package/README.md +4 -4
  3. package/VERSION +1 -1
  4. package/cjs/apiVersion.js +1 -1
  5. package/cjs/resources/FinancialConnections/Accounts.js +0 -5
  6. package/cjs/resources/Invoices.js +0 -17
  7. package/cjs/resources/PaymentIntents.js +0 -4
  8. package/cjs/resources/Quotes.js +0 -32
  9. package/cjs/resources/SubscriptionSchedules.js +0 -4
  10. package/cjs/resources/Terminal/Readers.js +0 -12
  11. package/cjs/resources/V2/Core/EventDestinations.js +41 -0
  12. package/cjs/resources/V2/Core.js +2 -0
  13. package/cjs/resources.js +10 -42
  14. package/cjs/stripe.core.js +1 -1
  15. package/esm/apiVersion.js +1 -1
  16. package/esm/resources/FinancialConnections/Accounts.js +0 -5
  17. package/esm/resources/Invoices.js +0 -17
  18. package/esm/resources/PaymentIntents.js +0 -4
  19. package/esm/resources/Quotes.js +0 -32
  20. package/esm/resources/SubscriptionSchedules.js +0 -4
  21. package/esm/resources/Terminal/Readers.js +0 -12
  22. package/esm/resources/V2/Core/EventDestinations.js +38 -0
  23. package/esm/resources/V2/Core.js +2 -0
  24. package/esm/resources.js +0 -29
  25. package/esm/stripe.core.js +1 -1
  26. package/package.json +1 -1
  27. package/types/AccountLinksResource.d.ts +1 -5
  28. package/types/AccountSessions.d.ts +0 -45
  29. package/types/AccountSessionsResource.d.ts +0 -324
  30. package/types/Accounts.d.ts +1 -155
  31. package/types/AccountsResource.d.ts +1 -415
  32. package/types/Charges.d.ts +0 -83
  33. package/types/ChargesResource.d.ts +0 -1294
  34. package/types/Checkout/Sessions.d.ts +79 -302
  35. package/types/Checkout/SessionsResource.d.ts +85 -354
  36. package/types/ConfirmationTokens.d.ts +0 -82
  37. package/types/Coupons.d.ts +1 -1
  38. package/types/CouponsResource.d.ts +1 -1
  39. package/types/CreditNotes.d.ts +0 -21
  40. package/types/CreditNotesResource.d.ts +0 -51
  41. package/types/CustomersResource.d.ts +0 -6
  42. package/types/Disputes.d.ts +3 -3
  43. package/types/EventTypes.d.ts +18 -545
  44. package/types/Events.d.ts +1 -90
  45. package/types/FinancialConnections/Accounts.d.ts +1 -29
  46. package/types/FinancialConnections/AccountsResource.d.ts +3 -35
  47. package/types/FinancialConnections/Sessions.d.ts +1 -49
  48. package/types/FinancialConnections/SessionsResource.d.ts +1 -38
  49. package/types/InvoiceItems.d.ts +0 -5
  50. package/types/InvoiceItemsResource.d.ts +0 -98
  51. package/types/InvoiceLineItems.d.ts +1 -28
  52. package/types/Invoices.d.ts +2 -124
  53. package/types/InvoicesResource.d.ts +1855 -5503
  54. package/types/Issuing/CardholdersResource.d.ts +1 -2
  55. package/types/Issuing/Transactions.d.ts +0 -2
  56. package/types/Issuing/TransactionsResource.d.ts +0 -5
  57. package/types/LineItems.d.ts +0 -7
  58. package/types/Mandates.d.ts +0 -77
  59. package/types/PaymentIntents.d.ts +1 -613
  60. package/types/PaymentIntentsResource.d.ts +3687 -7740
  61. package/types/PaymentLinks.d.ts +0 -6
  62. package/types/PaymentLinksResource.d.ts +0 -12
  63. package/types/PaymentMethodConfigurations.d.ts +0 -36
  64. package/types/PaymentMethodConfigurationsResource.d.ts +0 -50
  65. package/types/PaymentMethods.d.ts +0 -82
  66. package/types/PaymentMethodsResource.d.ts +0 -115
  67. package/types/Prices.d.ts +0 -22
  68. package/types/PricesResource.d.ts +0 -22
  69. package/types/Products.d.ts +0 -39
  70. package/types/ProductsResource.d.ts +0 -36
  71. package/types/Quotes.d.ts +1 -591
  72. package/types/QuotesResource.d.ts +199 -2531
  73. package/types/Refunds.d.ts +1 -4
  74. package/types/SetupAttempts.d.ts +0 -11
  75. package/types/SetupIntents.d.ts +1 -112
  76. package/types/SetupIntentsResource.d.ts +3 -594
  77. package/types/Sources.d.ts +0 -23
  78. package/types/SubscriptionItems.d.ts +0 -21
  79. package/types/SubscriptionItemsResource.d.ts +0 -109
  80. package/types/SubscriptionSchedules.d.ts +0 -200
  81. package/types/SubscriptionSchedulesResource.d.ts +13 -1231
  82. package/types/Subscriptions.d.ts +1 -82
  83. package/types/SubscriptionsResource.d.ts +2 -347
  84. package/types/Terminal/Readers.d.ts +0 -278
  85. package/types/Terminal/ReadersResource.d.ts +0 -215
  86. package/types/TestHelpers/ConfirmationTokensResource.d.ts +0 -87
  87. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
  88. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
  89. package/types/Treasury/FinancialAccountFeatures.d.ts +0 -7
  90. package/types/Treasury/FinancialAccounts.d.ts +0 -5
  91. package/types/Treasury/FinancialAccountsResource.d.ts +0 -37
  92. package/types/Treasury/OutboundTransfers.d.ts +0 -26
  93. package/types/Treasury/OutboundTransfersResource.d.ts +0 -26
  94. package/types/Treasury/ReceivedCredits.d.ts +0 -26
  95. package/types/Treasury/ReceivedDebits.d.ts +0 -31
  96. package/types/V2/Core/EventDestinationsResource.d.ts +281 -0
  97. package/types/V2/Core/EventsResource.d.ts +1 -1
  98. package/types/V2/CoreResource.d.ts +1 -0
  99. package/types/V2/EventDestinations.d.ts +164 -0
  100. package/types/WebhookEndpointsResource.d.ts +4 -65
  101. package/types/index.d.ts +2 -53
  102. package/types/lib.d.ts +1 -1
  103. package/types/test/typescriptTest.ts +3 -3
  104. package/cjs/resources/AccountNotices.js +0 -21
  105. package/cjs/resources/Capital/FinancingOffers.js +0 -21
  106. package/cjs/resources/Capital/FinancingSummary.js +0 -12
  107. package/cjs/resources/Capital/FinancingTransactions.js +0 -17
  108. package/cjs/resources/FinancialConnections/Institutions.js +0 -17
  109. package/cjs/resources/GiftCards/Cards.js +0 -23
  110. package/cjs/resources/GiftCards/Transactions.js +0 -33
  111. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
  112. package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
  113. package/cjs/resources/Margins.js +0 -22
  114. package/cjs/resources/Orders.js +0 -24
  115. package/cjs/resources/Tax/Associations.js +0 -9
  116. package/cjs/resources/Tax/Forms.js +0 -20
  117. package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
  118. package/esm/resources/AccountNotices.js +0 -18
  119. package/esm/resources/Capital/FinancingOffers.js +0 -18
  120. package/esm/resources/Capital/FinancingSummary.js +0 -9
  121. package/esm/resources/Capital/FinancingTransactions.js +0 -14
  122. package/esm/resources/FinancialConnections/Institutions.js +0 -14
  123. package/esm/resources/GiftCards/Cards.js +0 -20
  124. package/esm/resources/GiftCards/Transactions.js +0 -30
  125. package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
  126. package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
  127. package/esm/resources/Margins.js +0 -19
  128. package/esm/resources/Orders.js +0 -21
  129. package/esm/resources/Tax/Associations.js +0 -6
  130. package/esm/resources/Tax/Forms.js +0 -17
  131. package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
  132. package/types/AccountNotices.d.ts +0 -113
  133. package/types/AccountNoticesResource.d.ts +0 -98
  134. package/types/Billing/MeterErrorReports.d.ts +0 -106
  135. package/types/Capital/FinancingOffers.d.ts +0 -188
  136. package/types/Capital/FinancingOffersResource.d.ts +0 -97
  137. package/types/Capital/FinancingSummary.d.ts +0 -106
  138. package/types/Capital/FinancingSummaryResource.d.ts +0 -27
  139. package/types/Capital/FinancingTransactions.d.ts +0 -135
  140. package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
  141. package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
  142. package/types/FinancialConnections/Institutions.d.ts +0 -93
  143. package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
  144. package/types/GiftCards/Cards.d.ts +0 -118
  145. package/types/GiftCards/CardsResource.d.ts +0 -159
  146. package/types/GiftCards/Transactions.d.ts +0 -129
  147. package/types/GiftCards/TransactionsResource.d.ts +0 -201
  148. package/types/InvoicePayments.d.ts +0 -138
  149. package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
  150. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
  151. package/types/Issuing/DisputeSettlementDetails.d.ts +0 -73
  152. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
  153. package/types/Issuing/Settlements.d.ts +0 -103
  154. package/types/Margins.d.ts +0 -56
  155. package/types/MarginsResource.d.ts +0 -114
  156. package/types/Orders.d.ts +0 -1154
  157. package/types/OrdersResource.d.ts +0 -2911
  158. package/types/QuoteLines.d.ts +0 -634
  159. package/types/QuotePreviewInvoices.d.ts +0 -1601
  160. package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -814
  161. package/types/Tax/Associations.d.ts +0 -126
  162. package/types/Tax/AssociationsResource.d.ts +0 -29
  163. package/types/Tax/Forms.d.ts +0 -220
  164. package/types/Tax/FormsResource.d.ts +0 -107
  165. package/types/Terminal/ReaderCollectedData.d.ts +0 -51
  166. package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
@@ -104,11 +104,6 @@ declare module 'stripe' {
104
104
  */
105
105
  amount_shipping: number;
106
106
 
107
- /**
108
- * List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
109
- */
110
- amounts_due?: Array<Invoice.AmountsDue> | null;
111
-
112
107
  /**
113
108
  * ID of the Connect Application that created the invoice.
114
109
  */
@@ -223,11 +218,6 @@ declare module 'stripe' {
223
218
  */
224
219
  customer_tax_ids?: Array<Invoice.CustomerTaxId> | null;
225
220
 
226
- /**
227
- * The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin.
228
- */
229
- default_margins?: Array<string | Stripe.Margin> | null;
230
-
231
221
  /**
232
222
  * ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
233
223
  */
@@ -357,11 +347,6 @@ declare module 'stripe' {
357
347
 
358
348
  payment_settings: Invoice.PaymentSettings;
359
349
 
360
- /**
361
- * Payments for this invoice
362
- */
363
- payments?: ApiList<Stripe.InvoicePayment>;
364
-
365
350
  /**
366
351
  * End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](https://stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
367
352
  */
@@ -476,11 +461,6 @@ declare module 'stripe' {
476
461
  */
477
462
  total_excluding_tax: number | null;
478
463
 
479
- /**
480
- * The aggregate amounts calculated per margin across all line items.
481
- */
482
- total_margin_amounts?: Array<Invoice.TotalMarginAmount> | null;
483
-
484
464
  /**
485
465
  * Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.
486
466
  */
@@ -505,52 +485,6 @@ declare module 'stripe' {
505
485
  }
506
486
 
507
487
  namespace Invoice {
508
- interface AmountsDue {
509
- /**
510
- * Incremental amount due for this payment in cents (or local equivalent).
511
- */
512
- amount: number;
513
-
514
- /**
515
- * The amount in cents (or local equivalent) that was paid for this payment.
516
- */
517
- amount_paid: number;
518
-
519
- /**
520
- * The difference between the payment's amount and amount_paid, in cents (or local equivalent).
521
- */
522
- amount_remaining: number;
523
-
524
- /**
525
- * Number of days from when invoice is finalized until the payment is due.
526
- */
527
- days_until_due: number | null;
528
-
529
- /**
530
- * An arbitrary string attached to the object. Often useful for displaying to users.
531
- */
532
- description: string | null;
533
-
534
- /**
535
- * Date on which a payment plan's payment is due.
536
- */
537
- due_date: number | null;
538
-
539
- /**
540
- * Timestamp when the payment was paid.
541
- */
542
- paid_at: number | null;
543
-
544
- /**
545
- * The status of the payment, one of `open`, `paid`, or `past_due`
546
- */
547
- status: AmountsDue.Status;
548
- }
549
-
550
- namespace AmountsDue {
551
- type Status = 'open' | 'paid' | 'past_due';
552
- }
553
-
554
488
  interface AutomaticTax {
555
489
  /**
556
490
  * Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
@@ -912,15 +846,11 @@ declare module 'stripe' {
912
846
  | 'email_invalid'
913
847
  | 'expired_card'
914
848
  | 'financial_connections_account_inactive'
915
- | 'financial_connections_institution_unavailable'
916
849
  | 'financial_connections_no_successful_transaction_refresh'
917
850
  | 'forwarding_api_inactive'
918
851
  | 'forwarding_api_invalid_parameter'
919
852
  | 'forwarding_api_upstream_connection_error'
920
853
  | 'forwarding_api_upstream_connection_timeout'
921
- | 'gift_card_balance_insufficient'
922
- | 'gift_card_code_exists'
923
- | 'gift_card_inactive'
924
854
  | 'idempotency_key_in_use'
925
855
  | 'incorrect_address'
926
856
  | 'incorrect_cvc'
@@ -994,7 +924,6 @@ declare module 'stripe' {
994
924
  | 'payment_method_unexpected_state'
995
925
  | 'payment_method_unsupported_type'
996
926
  | 'payout_reconciliation_not_ready'
997
- | 'payout_statement_descriptor_profanity'
998
927
  | 'payouts_limit_exceeded'
999
928
  | 'payouts_not_allowed'
1000
929
  | 'platform_account_required'
@@ -1011,7 +940,6 @@ declare module 'stripe' {
1011
940
  | 'return_intent_already_processed'
1012
941
  | 'routing_number_invalid'
1013
942
  | 'secret_key_required'
1014
- | 'sensitive_data_access_expired'
1015
943
  | 'sepa_unsupported_account'
1016
944
  | 'setup_attempt_failed'
1017
945
  | 'setup_intent_authentication_failure'
@@ -1029,7 +957,6 @@ declare module 'stripe' {
1029
957
  | 'taxes_calculation_failed'
1030
958
  | 'terminal_location_country_unsupported'
1031
959
  | 'terminal_reader_busy'
1032
- | 'terminal_reader_collected_data_invalid'
1033
960
  | 'terminal_reader_hardware_fault'
1034
961
  | 'terminal_reader_invalid_location_for_activation'
1035
962
  | 'terminal_reader_invalid_location_for_payment'
@@ -1229,11 +1156,6 @@ declare module 'stripe' {
1229
1156
  * The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
1230
1157
  */
1231
1158
  account_subcategories?: Array<Filters.AccountSubcategory>;
1232
-
1233
- /**
1234
- * The institution to use to filter for possible accounts to link.
1235
- */
1236
- institution?: string;
1237
1159
  }
1238
1160
 
1239
1161
  namespace Filters {
@@ -1246,11 +1168,7 @@ declare module 'stripe' {
1246
1168
  | 'payment_method'
1247
1169
  | 'transactions';
1248
1170
 
1249
- type Prefetch =
1250
- | 'balances'
1251
- | 'inferred_balances'
1252
- | 'ownership'
1253
- | 'transactions';
1171
+ type Prefetch = 'balances' | 'ownership' | 'transactions';
1254
1172
  }
1255
1173
 
1256
1174
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -1456,29 +1374,6 @@ declare module 'stripe' {
1456
1374
  * *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
1457
1375
  */
1458
1376
  metadata: Stripe.Metadata | null;
1459
-
1460
- /**
1461
- * If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/billing/subscriptions/pause-payment).
1462
- */
1463
- pause_collection?: SubscriptionDetails.PauseCollection | null;
1464
- }
1465
-
1466
- namespace SubscriptionDetails {
1467
- interface PauseCollection {
1468
- /**
1469
- * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
1470
- */
1471
- behavior: PauseCollection.Behavior;
1472
-
1473
- /**
1474
- * The time after which the subscription will resume collecting payments.
1475
- */
1476
- resumes_at: number | null;
1477
- }
1478
-
1479
- namespace PauseCollection {
1480
- type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
1481
- }
1482
1377
  }
1483
1378
 
1484
1379
  interface ThresholdReason {
@@ -1519,18 +1414,6 @@ declare module 'stripe' {
1519
1414
  discount: string | Stripe.Discount | Stripe.DeletedDiscount;
1520
1415
  }
1521
1416
 
1522
- interface TotalMarginAmount {
1523
- /**
1524
- * The amount, in cents (or local equivalent), of the reduction in line item amount.
1525
- */
1526
- amount: number;
1527
-
1528
- /**
1529
- * The margin that was applied to get this margin amount.
1530
- */
1531
- margin: string | Stripe.Margin;
1532
- }
1533
-
1534
1417
  interface TotalPretaxCreditAmount {
1535
1418
  /**
1536
1419
  * The amount, in cents (or local equivalent), of the pretax credit amount.
@@ -1550,11 +1433,6 @@ declare module 'stripe' {
1550
1433
  */
1551
1434
  discount?: string | Stripe.Discount | Stripe.DeletedDiscount;
1552
1435
 
1553
- /**
1554
- * The margin that was applied to get this pretax credit amount.
1555
- */
1556
- margin?: string | Stripe.Margin;
1557
-
1558
1436
  /**
1559
1437
  * Type of the pretax credit amount referenced.
1560
1438
  */
@@ -1562,7 +1440,7 @@ declare module 'stripe' {
1562
1440
  }
1563
1441
 
1564
1442
  namespace TotalPretaxCreditAmount {
1565
- type Type = 'credit_balance_transaction' | 'discount' | 'margin';
1443
+ type Type = 'credit_balance_transaction' | 'discount';
1566
1444
  }
1567
1445
 
1568
1446
  interface TotalTaxAmount {