stripe 16.1.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 (148) hide show
  1. package/CHANGELOG.md +753 -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/Capital/FinancingOffers.d.ts +188 -0
  63. package/types/Capital/FinancingOffersResource.d.ts +97 -0
  64. package/types/Capital/FinancingSummary.d.ts +106 -0
  65. package/types/Capital/FinancingSummaryResource.d.ts +27 -0
  66. package/types/Capital/FinancingTransactions.d.ts +135 -0
  67. package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
  68. package/types/Charges.d.ts +67 -0
  69. package/types/ChargesResource.d.ts +1294 -0
  70. package/types/Checkout/Sessions.d.ts +23 -1
  71. package/types/Checkout/SessionsResource.d.ts +15 -1
  72. package/types/ConfirmationTokens.d.ts +83 -0
  73. package/types/Coupons.d.ts +1 -1
  74. package/types/CouponsResource.d.ts +1 -1
  75. package/types/CreditNotes.d.ts +21 -0
  76. package/types/CreditNotesResource.d.ts +51 -0
  77. package/types/CustomerSessions.d.ts +48 -0
  78. package/types/CustomerSessionsResource.d.ts +48 -0
  79. package/types/CustomersResource.d.ts +2 -0
  80. package/types/Disputes.d.ts +167 -0
  81. package/types/DisputesResource.d.ts +120 -0
  82. package/types/EventTypes.d.ts +426 -0
  83. package/types/Events.d.ts +83 -0
  84. package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
  85. package/types/FinancialConnections/Accounts.d.ts +29 -1
  86. package/types/FinancialConnections/AccountsResource.d.ts +35 -3
  87. package/types/FinancialConnections/Sessions.d.ts +44 -1
  88. package/types/FinancialConnections/SessionsResource.d.ts +33 -1
  89. package/types/GiftCards/Cards.d.ts +118 -0
  90. package/types/GiftCards/CardsResource.d.ts +159 -0
  91. package/types/GiftCards/Transactions.d.ts +129 -0
  92. package/types/GiftCards/TransactionsResource.d.ts +201 -0
  93. package/types/InvoiceItems.d.ts +5 -0
  94. package/types/InvoiceItemsResource.d.ts +98 -0
  95. package/types/InvoiceLineItems.d.ts +22 -0
  96. package/types/InvoicePayments.d.ts +91 -0
  97. package/types/Invoices.d.ts +110 -1
  98. package/types/InvoicesResource.d.ts +6404 -2261
  99. package/types/Issuing/CardholdersResource.d.ts +2 -1
  100. package/types/Issuing/Cards.d.ts +34 -0
  101. package/types/Issuing/CardsResource.d.ts +125 -0
  102. package/types/Issuing/CreditUnderwritingRecords.d.ts +446 -0
  103. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1017 -0
  104. package/types/LineItems.d.ts +7 -0
  105. package/types/Mandates.d.ts +77 -0
  106. package/types/Margins.d.ts +56 -0
  107. package/types/MarginsResource.d.ts +114 -0
  108. package/types/Orders.d.ts +1057 -0
  109. package/types/OrdersResource.d.ts +2711 -0
  110. package/types/PaymentIntents.d.ts +463 -1
  111. package/types/PaymentIntentsResource.d.ts +6682 -3349
  112. package/types/PaymentMethods.d.ts +62 -0
  113. package/types/PaymentMethodsResource.d.ts +110 -0
  114. package/types/Prices.d.ts +22 -0
  115. package/types/PricesResource.d.ts +22 -0
  116. package/types/Products.d.ts +39 -0
  117. package/types/ProductsResource.d.ts +36 -0
  118. package/types/QuoteLines.d.ts +634 -0
  119. package/types/QuotePhases.d.ts +198 -0
  120. package/types/QuotePhasesResource.d.ts +67 -0
  121. package/types/QuotePreviewInvoices.d.ts +1528 -0
  122. package/types/QuotePreviewSubscriptionSchedules.d.ts +778 -0
  123. package/types/Quotes.d.ts +578 -1
  124. package/types/QuotesResource.d.ts +3174 -265
  125. package/types/SetupAttempts.d.ts +8 -0
  126. package/types/SetupIntents.d.ts +104 -1
  127. package/types/SetupIntentsResource.d.ts +483 -3
  128. package/types/Sources.d.ts +23 -0
  129. package/types/SubscriptionItems.d.ts +21 -0
  130. package/types/SubscriptionItemsResource.d.ts +109 -0
  131. package/types/SubscriptionSchedules.d.ts +164 -0
  132. package/types/SubscriptionSchedulesResource.d.ts +1234 -16
  133. package/types/Subscriptions.d.ts +41 -1
  134. package/types/SubscriptionsResource.d.ts +337 -2
  135. package/types/Tax/Forms.d.ts +133 -0
  136. package/types/Tax/FormsResource.d.ts +90 -0
  137. package/types/Terminal/Readers.d.ts +278 -0
  138. package/types/Terminal/ReadersResource.d.ts +208 -0
  139. package/types/TestHelpers/ConfirmationTokensResource.d.ts +55 -0
  140. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
  141. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
  142. package/types/Treasury/OutboundTransfers.d.ts +26 -0
  143. package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
  144. package/types/Treasury/ReceivedCredits.d.ts +26 -0
  145. package/types/Treasury/ReceivedDebits.d.ts +31 -0
  146. package/types/WebhookEndpointsResource.d.ts +50 -0
  147. package/types/index.d.ts +61 -0
  148. package/types/lib.d.ts +12 -0
@@ -105,6 +105,8 @@ declare module 'stripe' {
105
105
 
106
106
  paypal?: PaymentMethod.Paypal;
107
107
 
108
+ payto?: PaymentMethod.Payto;
109
+
108
110
  pix?: PaymentMethod.Pix;
109
111
 
110
112
  promptpay?: PaymentMethod.Promptpay;
@@ -114,6 +116,8 @@ declare module 'stripe' {
114
116
  */
115
117
  radar_options?: PaymentMethod.RadarOptions;
116
118
 
119
+ rechnung?: PaymentMethod.Rechnung;
120
+
117
121
  revolut_pay?: PaymentMethod.RevolutPay;
118
122
 
119
123
  sepa_debit?: PaymentMethod.SepaDebit;
@@ -1094,6 +1098,11 @@ declare module 'stripe' {
1094
1098
  interface Paynow {}
1095
1099
 
1096
1100
  interface Paypal {
1101
+ /**
1102
+ * Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same.
1103
+ */
1104
+ fingerprint?: string | null;
1105
+
1097
1106
  /**
1098
1107
  * Owner's email. Values are provided by PayPal directly
1099
1108
  * (if supported) at the time of authorization or settlement. They cannot be set or mutated.
@@ -1104,6 +1113,29 @@ declare module 'stripe' {
1104
1113
  * PayPal account PayerID. This identifier uniquely identifies the PayPal customer.
1105
1114
  */
1106
1115
  payer_id: string | null;
1116
+
1117
+ /**
1118
+ * Owner's verified email. Values are verified or provided by PayPal directly
1119
+ * (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1120
+ */
1121
+ verified_email?: string | null;
1122
+ }
1123
+
1124
+ interface Payto {
1125
+ /**
1126
+ * Bank-State-Branch number of the bank account.
1127
+ */
1128
+ bsb_number: string | null;
1129
+
1130
+ /**
1131
+ * Last four digits of the bank account number.
1132
+ */
1133
+ last4: string | null;
1134
+
1135
+ /**
1136
+ * The PayID alias for the bank account.
1137
+ */
1138
+ pay_id: string | null;
1107
1139
  }
1108
1140
 
1109
1141
  interface Pix {}
@@ -1117,6 +1149,29 @@ declare module 'stripe' {
1117
1149
  session?: string;
1118
1150
  }
1119
1151
 
1152
+ interface Rechnung {
1153
+ dob?: Rechnung.Dob;
1154
+ }
1155
+
1156
+ namespace Rechnung {
1157
+ interface Dob {
1158
+ /**
1159
+ * The day of birth, between 1 and 31.
1160
+ */
1161
+ day: number;
1162
+
1163
+ /**
1164
+ * The month of birth, between 1 and 12.
1165
+ */
1166
+ month: number;
1167
+
1168
+ /**
1169
+ * The four-digit year of birth.
1170
+ */
1171
+ year: number;
1172
+ }
1173
+ }
1174
+
1120
1175
  interface RevolutPay {}
1121
1176
 
1122
1177
  interface SepaDebit {
@@ -1206,8 +1261,10 @@ declare module 'stripe' {
1206
1261
  | 'p24'
1207
1262
  | 'paynow'
1208
1263
  | 'paypal'
1264
+ | 'payto'
1209
1265
  | 'pix'
1210
1266
  | 'promptpay'
1267
+ | 'rechnung'
1211
1268
  | 'revolut_pay'
1212
1269
  | 'sepa_debit'
1213
1270
  | 'sofort'
@@ -1223,6 +1280,11 @@ declare module 'stripe' {
1223
1280
  */
1224
1281
  account_holder_type: UsBankAccount.AccountHolderType | null;
1225
1282
 
1283
+ /**
1284
+ * Account number of the bank account.
1285
+ */
1286
+ account_number?: string | null;
1287
+
1226
1288
  /**
1227
1289
  * Account type: checkings or savings. Defaults to checking if omitted.
1228
1290
  */
@@ -173,6 +173,11 @@ declare module 'stripe' {
173
173
  */
174
174
  paypal?: PaymentMethodCreateParams.Paypal;
175
175
 
176
+ /**
177
+ * If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method.
178
+ */
179
+ payto?: PaymentMethodCreateParams.Payto;
180
+
176
181
  /**
177
182
  * If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
178
183
  */
@@ -188,6 +193,11 @@ declare module 'stripe' {
188
193
  */
189
194
  radar_options?: PaymentMethodCreateParams.RadarOptions;
190
195
 
196
+ /**
197
+ * If this is a Rechnung PaymentMethod, this hash contains details about the Rechnung payment method.
198
+ */
199
+ rechnung?: PaymentMethodCreateParams.Rechnung;
200
+
191
201
  /**
192
202
  * If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
193
203
  */
@@ -557,6 +567,23 @@ declare module 'stripe' {
557
567
 
558
568
  interface Paypal {}
559
569
 
570
+ interface Payto {
571
+ /**
572
+ * The account number for the bank account.
573
+ */
574
+ account_number?: string;
575
+
576
+ /**
577
+ * Bank-State-Branch number of the bank account.
578
+ */
579
+ bsb_number?: string;
580
+
581
+ /**
582
+ * The PayID alias for the bank account.
583
+ */
584
+ pay_id?: string;
585
+ }
586
+
560
587
  interface Pix {}
561
588
 
562
589
  interface Promptpay {}
@@ -568,6 +595,32 @@ declare module 'stripe' {
568
595
  session?: string;
569
596
  }
570
597
 
598
+ interface Rechnung {
599
+ /**
600
+ * Customer's date of birth
601
+ */
602
+ dob: Rechnung.Dob;
603
+ }
604
+
605
+ namespace Rechnung {
606
+ interface Dob {
607
+ /**
608
+ * The day of birth, between 1 and 31.
609
+ */
610
+ day: number;
611
+
612
+ /**
613
+ * The month of birth, between 1 and 12.
614
+ */
615
+ month: number;
616
+
617
+ /**
618
+ * The four-digit year of birth.
619
+ */
620
+ year: number;
621
+ }
622
+ }
623
+
571
624
  interface RevolutPay {}
572
625
 
573
626
  interface SepaDebit {
@@ -620,8 +673,10 @@ declare module 'stripe' {
620
673
  | 'p24'
621
674
  | 'paynow'
622
675
  | 'paypal'
676
+ | 'payto'
623
677
  | 'pix'
624
678
  | 'promptpay'
679
+ | 'rechnung'
625
680
  | 'revolut_pay'
626
681
  | 'sepa_debit'
627
682
  | 'sofort'
@@ -707,6 +762,16 @@ declare module 'stripe' {
707
762
  */
708
763
  metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
709
764
 
765
+ /**
766
+ * If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method.
767
+ */
768
+ payto?: PaymentMethodUpdateParams.Payto;
769
+
770
+ /**
771
+ * If this is a Rechnung PaymentMethod, this hash contains details about the Rechnung payment method.
772
+ */
773
+ rechnung?: PaymentMethodUpdateParams.Rechnung;
774
+
710
775
  /**
711
776
  * If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
712
777
  */
@@ -770,6 +835,49 @@ declare module 'stripe' {
770
835
 
771
836
  interface Link {}
772
837
 
838
+ interface Payto {
839
+ /**
840
+ * The account number for the bank account.
841
+ */
842
+ account_number?: string;
843
+
844
+ /**
845
+ * Bank-State-Branch number of the bank account.
846
+ */
847
+ bsb_number?: string;
848
+
849
+ /**
850
+ * The PayID alias for the bank account.
851
+ */
852
+ pay_id?: string;
853
+ }
854
+
855
+ interface Rechnung {
856
+ /**
857
+ * Customer's date of birth
858
+ */
859
+ dob: Rechnung.Dob;
860
+ }
861
+
862
+ namespace Rechnung {
863
+ interface Dob {
864
+ /**
865
+ * The day of birth, between 1 and 31.
866
+ */
867
+ day: number;
868
+
869
+ /**
870
+ * The month of birth, between 1 and 12.
871
+ */
872
+ month: number;
873
+
874
+ /**
875
+ * The four-digit year of birth.
876
+ */
877
+ year: number;
878
+ }
879
+ }
880
+
773
881
  interface UsBankAccount {
774
882
  /**
775
883
  * Bank account holder type.
@@ -835,8 +943,10 @@ declare module 'stripe' {
835
943
  | 'p24'
836
944
  | 'paynow'
837
945
  | 'paypal'
946
+ | 'payto'
838
947
  | 'pix'
839
948
  | 'promptpay'
949
+ | 'rechnung'
840
950
  | 'revolut_pay'
841
951
  | 'sepa_debit'
842
952
  | 'sofort'
package/types/Prices.d.ts CHANGED
@@ -93,6 +93,11 @@ declare module 'stripe' {
93
93
  */
94
94
  metadata: Stripe.Metadata;
95
95
 
96
+ /**
97
+ * Subscriptions using this price will be migrated to use the new referenced price.
98
+ */
99
+ migrate_to?: Price.MigrateTo | null;
100
+
96
101
  /**
97
102
  * A brief description of the price, hidden from customers.
98
103
  */
@@ -239,6 +244,23 @@ declare module 'stripe' {
239
244
  preset: number | null;
240
245
  }
241
246
 
247
+ interface MigrateTo {
248
+ /**
249
+ * The behavior controlling at what point in the subscription lifecycle to migrate the price
250
+ */
251
+ behavior: 'at_cycle_end';
252
+
253
+ /**
254
+ * The unix timestamp after at which subscriptions will start to migrate to the new price.
255
+ */
256
+ effective_after: number;
257
+
258
+ /**
259
+ * The id of the price being migrated to
260
+ */
261
+ price: string;
262
+ }
263
+
242
264
  interface Recurring {
243
265
  /**
244
266
  * Specifies a usage aggregation strategy for prices of `usage_type=metered`. Defaults to `sum`.
@@ -372,6 +372,11 @@ declare module 'stripe' {
372
372
  */
373
373
  metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
374
374
 
375
+ /**
376
+ * If specified, subscriptions using this price will be updated to use the new referenced price.
377
+ */
378
+ migrate_to?: Stripe.Emptyable<PriceUpdateParams.MigrateTo>;
379
+
375
380
  /**
376
381
  * A brief description of the price, hidden from customers.
377
382
  */
@@ -469,6 +474,23 @@ declare module 'stripe' {
469
474
  }
470
475
  }
471
476
 
477
+ interface MigrateTo {
478
+ /**
479
+ * The behavior controlling the point in the subscription lifecycle after which to migrate the price. Currently must be `at_cycle_end`.
480
+ */
481
+ behavior: 'at_cycle_end';
482
+
483
+ /**
484
+ * The time after which subscriptions should start using the new price.
485
+ */
486
+ effective_after?: number;
487
+
488
+ /**
489
+ * The ID of the price object.
490
+ */
491
+ price: string;
492
+ }
493
+
472
494
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
473
495
  }
474
496
 
@@ -98,6 +98,11 @@ declare module 'stripe' {
98
98
  */
99
99
  package_dimensions: Product.PackageDimensions | null;
100
100
 
101
+ /**
102
+ * Provisioning configuration for this product.
103
+ */
104
+ provisioning?: Product.Provisioning | null;
105
+
101
106
  /**
102
107
  * Whether this product is shipped (i.e., physical goods).
103
108
  */
@@ -164,6 +169,40 @@ declare module 'stripe' {
164
169
  width: number;
165
170
  }
166
171
 
172
+ interface Provisioning {
173
+ gift_card: Provisioning.GiftCard | null;
174
+
175
+ /**
176
+ * The type of provisioning, only `gift_card` currently supported.
177
+ */
178
+ type: 'gift_card';
179
+ }
180
+
181
+ namespace Provisioning {
182
+ interface GiftCard {
183
+ fixed_amount: GiftCard.FixedAmount | null;
184
+
185
+ /**
186
+ * The specific type of gift_card provisioning, only `fixed_amount` currently supported.
187
+ */
188
+ type: 'fixed_amount';
189
+ }
190
+
191
+ namespace GiftCard {
192
+ interface FixedAmount {
193
+ /**
194
+ * The initial amount with which the provisioned gift card will be created.
195
+ */
196
+ amount: number;
197
+
198
+ /**
199
+ * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
200
+ */
201
+ currency: string;
202
+ }
203
+ }
204
+ }
205
+
167
206
  type Type = 'good' | 'service';
168
207
  }
169
208
  }
@@ -53,6 +53,11 @@ declare module 'stripe' {
53
53
  */
54
54
  package_dimensions?: ProductCreateParams.PackageDimensions;
55
55
 
56
+ /**
57
+ * Provisioning configuration for this product.
58
+ */
59
+ provisioning?: ProductCreateParams.Provisioning;
60
+
56
61
  /**
57
62
  * Whether this product is shipped (i.e., physical goods).
58
63
  */
@@ -251,6 +256,37 @@ declare module 'stripe' {
251
256
  width: number;
252
257
  }
253
258
 
259
+ interface Provisioning {
260
+ gift_card?: Provisioning.GiftCard;
261
+
262
+ /**
263
+ * The type of provisioning, only `gift_card` currently supported.
264
+ */
265
+ type: 'gift_card';
266
+ }
267
+
268
+ namespace Provisioning {
269
+ interface GiftCard {
270
+ fixed_amount?: GiftCard.FixedAmount;
271
+
272
+ /**
273
+ * The specific type of gift_card provisioning, only `fixed_amount` currently supported.
274
+ */
275
+ type: 'fixed_amount';
276
+ }
277
+
278
+ namespace GiftCard {
279
+ interface FixedAmount {
280
+ /**
281
+ * The initial amount with which the provisioned gift card will be created.
282
+ */
283
+ amount: number;
284
+
285
+ currency: string;
286
+ }
287
+ }
288
+ }
289
+
254
290
  type Type = 'good' | 'service';
255
291
  }
256
292