stripe 16.2.0 → 16.4.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 (158) hide show
  1. package/CHANGELOG.md +768 -109
  2. package/README.md +33 -0
  3. package/VERSION +1 -1
  4. package/cjs/RequestSender.js +66 -5
  5. package/cjs/ResourceNamespace.js +3 -0
  6. package/cjs/StripeResource.js +1 -1
  7. package/cjs/Webhooks.js +29 -17
  8. package/cjs/apiVersion.js +2 -1
  9. package/cjs/multipart.js +4 -1
  10. package/cjs/resources/AccountNotices.js +21 -0
  11. package/cjs/resources/Capital/FinancingOffers.js +21 -0
  12. package/cjs/resources/Capital/FinancingSummary.js +12 -0
  13. package/cjs/resources/Capital/FinancingTransactions.js +17 -0
  14. package/cjs/resources/FinancialConnections/Accounts.js +5 -0
  15. package/cjs/resources/FinancialConnections/Institutions.js +17 -0
  16. package/cjs/resources/GiftCards/Cards.js +23 -0
  17. package/cjs/resources/GiftCards/Transactions.js +33 -0
  18. package/cjs/resources/Invoices.js +13 -0
  19. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
  20. package/cjs/resources/Margins.js +22 -0
  21. package/cjs/resources/OAuth.js +1 -1
  22. package/cjs/resources/Orders.js +24 -0
  23. package/cjs/resources/PaymentIntents.js +4 -0
  24. package/cjs/resources/QuotePhases.js +22 -0
  25. package/cjs/resources/Quotes.js +32 -0
  26. package/cjs/resources/SubscriptionSchedules.js +4 -0
  27. package/cjs/resources/Tax/Forms.js +20 -0
  28. package/cjs/resources/Terminal/Readers.js +12 -0
  29. package/cjs/resources.js +38 -10
  30. package/cjs/stripe.core.js +16 -7
  31. package/cjs/utils.js +30 -3
  32. package/esm/RequestSender.js +67 -6
  33. package/esm/ResourceNamespace.js +3 -0
  34. package/esm/StripeResource.js +2 -2
  35. package/esm/Webhooks.js +29 -17
  36. package/esm/apiVersion.js +1 -0
  37. package/esm/multipart.js +5 -2
  38. package/esm/resources/AccountNotices.js +18 -0
  39. package/esm/resources/Capital/FinancingOffers.js +18 -0
  40. package/esm/resources/Capital/FinancingSummary.js +9 -0
  41. package/esm/resources/Capital/FinancingTransactions.js +14 -0
  42. package/esm/resources/FinancialConnections/Accounts.js +5 -0
  43. package/esm/resources/FinancialConnections/Institutions.js +14 -0
  44. package/esm/resources/GiftCards/Cards.js +20 -0
  45. package/esm/resources/GiftCards/Transactions.js +30 -0
  46. package/esm/resources/Invoices.js +13 -0
  47. package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
  48. package/esm/resources/Margins.js +19 -0
  49. package/esm/resources/OAuth.js +2 -2
  50. package/esm/resources/Orders.js +21 -0
  51. package/esm/resources/PaymentIntents.js +4 -0
  52. package/esm/resources/QuotePhases.js +19 -0
  53. package/esm/resources/Quotes.js +32 -0
  54. package/esm/resources/SubscriptionSchedules.js +4 -0
  55. package/esm/resources/Tax/Forms.js +17 -0
  56. package/esm/resources/Terminal/Readers.js +12 -0
  57. package/esm/resources.js +24 -0
  58. package/esm/stripe.core.js +16 -7
  59. package/esm/utils.js +27 -1
  60. package/package.json +1 -1
  61. package/types/AccountLinksResource.d.ts +5 -1
  62. package/types/AccountNotices.d.ts +110 -0
  63. package/types/AccountNoticesResource.d.ts +98 -0
  64. package/types/AccountSessions.d.ts +15 -0
  65. package/types/AccountSessionsResource.d.ts +205 -0
  66. package/types/Accounts.d.ts +88 -1
  67. package/types/AccountsResource.d.ts +204 -0
  68. package/types/BillingPortal/Sessions.d.ts +1 -1
  69. package/types/Capital/FinancingOffers.d.ts +188 -0
  70. package/types/Capital/FinancingOffersResource.d.ts +97 -0
  71. package/types/Capital/FinancingSummary.d.ts +106 -0
  72. package/types/Capital/FinancingSummaryResource.d.ts +27 -0
  73. package/types/Capital/FinancingTransactions.d.ts +135 -0
  74. package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
  75. package/types/Charges.d.ts +67 -0
  76. package/types/ChargesResource.d.ts +1294 -0
  77. package/types/Checkout/Sessions.d.ts +28 -1
  78. package/types/Checkout/SessionsResource.d.ts +15 -1
  79. package/types/ConfirmationTokens.d.ts +83 -0
  80. package/types/Coupons.d.ts +1 -1
  81. package/types/CouponsResource.d.ts +1 -1
  82. package/types/CreditNotes.d.ts +21 -0
  83. package/types/CreditNotesResource.d.ts +51 -0
  84. package/types/CustomerSessions.d.ts +76 -0
  85. package/types/CustomerSessionsResource.d.ts +76 -0
  86. package/types/CustomersResource.d.ts +2 -0
  87. package/types/Disputes.d.ts +168 -0
  88. package/types/DisputesResource.d.ts +120 -0
  89. package/types/EventTypes.d.ts +426 -0
  90. package/types/Events.d.ts +83 -0
  91. package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
  92. package/types/FinancialConnections/Accounts.d.ts +29 -1
  93. package/types/FinancialConnections/AccountsResource.d.ts +35 -3
  94. package/types/FinancialConnections/Institutions.d.ts +93 -0
  95. package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
  96. package/types/FinancialConnections/Sessions.d.ts +49 -1
  97. package/types/FinancialConnections/SessionsResource.d.ts +38 -1
  98. package/types/GiftCards/Cards.d.ts +118 -0
  99. package/types/GiftCards/CardsResource.d.ts +159 -0
  100. package/types/GiftCards/Transactions.d.ts +129 -0
  101. package/types/GiftCards/TransactionsResource.d.ts +201 -0
  102. package/types/InvoiceItems.d.ts +5 -0
  103. package/types/InvoiceItemsResource.d.ts +98 -0
  104. package/types/InvoiceLineItems.d.ts +22 -0
  105. package/types/InvoicePayments.d.ts +91 -0
  106. package/types/Invoices.d.ts +116 -6
  107. package/types/InvoicesResource.d.ts +5395 -1818
  108. package/types/Issuing/CardholdersResource.d.ts +2 -1
  109. package/types/Issuing/Cards.d.ts +34 -0
  110. package/types/Issuing/CardsResource.d.ts +125 -0
  111. package/types/Issuing/CreditUnderwritingRecords.d.ts +446 -0
  112. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1017 -0
  113. package/types/LineItems.d.ts +7 -0
  114. package/types/Mandates.d.ts +77 -0
  115. package/types/Margins.d.ts +56 -0
  116. package/types/MarginsResource.d.ts +114 -0
  117. package/types/Orders.d.ts +1057 -0
  118. package/types/OrdersResource.d.ts +2711 -0
  119. package/types/PaymentIntents.d.ts +469 -6
  120. package/types/PaymentIntentsResource.d.ts +6721 -3373
  121. package/types/PaymentMethods.d.ts +62 -0
  122. package/types/PaymentMethodsResource.d.ts +110 -0
  123. package/types/Plans.d.ts +1 -1
  124. package/types/Prices.d.ts +23 -1
  125. package/types/PricesResource.d.ts +22 -0
  126. package/types/Products.d.ts +39 -0
  127. package/types/ProductsResource.d.ts +36 -0
  128. package/types/QuoteLines.d.ts +634 -0
  129. package/types/QuotePhases.d.ts +198 -0
  130. package/types/QuotePhasesResource.d.ts +67 -0
  131. package/types/QuotePreviewInvoices.d.ts +1530 -0
  132. package/types/QuotePreviewSubscriptionSchedules.d.ts +778 -0
  133. package/types/Quotes.d.ts +578 -1
  134. package/types/QuotesResource.d.ts +3174 -265
  135. package/types/SetupAttempts.d.ts +9 -5
  136. package/types/SetupIntents.d.ts +110 -6
  137. package/types/SetupIntentsResource.d.ts +498 -3
  138. package/types/Sources.d.ts +23 -0
  139. package/types/SubscriptionItems.d.ts +21 -0
  140. package/types/SubscriptionItemsResource.d.ts +109 -0
  141. package/types/SubscriptionSchedules.d.ts +164 -0
  142. package/types/SubscriptionSchedulesResource.d.ts +1234 -16
  143. package/types/Subscriptions.d.ts +46 -1
  144. package/types/SubscriptionsResource.d.ts +350 -5
  145. package/types/Tax/Forms.d.ts +133 -0
  146. package/types/Tax/FormsResource.d.ts +90 -0
  147. package/types/Terminal/Readers.d.ts +278 -0
  148. package/types/Terminal/ReadersResource.d.ts +208 -0
  149. package/types/TestHelpers/ConfirmationTokensResource.d.ts +55 -0
  150. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
  151. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
  152. package/types/Treasury/OutboundTransfers.d.ts +26 -0
  153. package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
  154. package/types/Treasury/ReceivedCredits.d.ts +26 -0
  155. package/types/Treasury/ReceivedDebits.d.ts +31 -0
  156. package/types/WebhookEndpointsResource.d.ts +50 -0
  157. package/types/index.d.ts +64 -0
  158. package/types/lib.d.ts +12 -0
@@ -1435,6 +1435,11 @@ declare module 'stripe' {
1435
1435
  * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
1436
1436
  */
1437
1437
  setup_future_usage?: Paypal.SetupFutureUsage;
1438
+
1439
+ /**
1440
+ * The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used.
1441
+ */
1442
+ subsellers?: Array<string>;
1438
1443
  }
1439
1444
 
1440
1445
  namespace Paypal {
@@ -1518,6 +1523,8 @@ declare module 'stripe' {
1518
1523
  interface FinancialConnections {
1519
1524
  filters?: FinancialConnections.Filters;
1520
1525
 
1526
+ manual_entry?: FinancialConnections.ManualEntry;
1527
+
1521
1528
  /**
1522
1529
  * The list of permissions to request. The `payment_method` permission must be included.
1523
1530
  */
@@ -1540,19 +1547,39 @@ declare module 'stripe' {
1540
1547
  * The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
1541
1548
  */
1542
1549
  account_subcategories?: Array<Filters.AccountSubcategory>;
1550
+
1551
+ /**
1552
+ * The institution to use to filter for possible accounts to link.
1553
+ */
1554
+ institution?: string;
1543
1555
  }
1544
1556
 
1545
1557
  namespace Filters {
1546
1558
  type AccountSubcategory = 'checking' | 'savings';
1547
1559
  }
1548
1560
 
1561
+ interface ManualEntry {
1562
+ /**
1563
+ * Settings for configuring manual entry of account details.
1564
+ */
1565
+ mode?: ManualEntry.Mode;
1566
+ }
1567
+
1568
+ namespace ManualEntry {
1569
+ type Mode = 'automatic' | 'custom';
1570
+ }
1571
+
1549
1572
  type Permission =
1550
1573
  | 'balances'
1551
1574
  | 'ownership'
1552
1575
  | 'payment_method'
1553
1576
  | 'transactions';
1554
1577
 
1555
- type Prefetch = 'balances' | 'ownership' | 'transactions';
1578
+ type Prefetch =
1579
+ | 'balances'
1580
+ | 'inferred_balances'
1581
+ | 'ownership'
1582
+ | 'transactions';
1556
1583
  }
1557
1584
 
1558
1585
  type SetupFutureUsage = 'none' | 'off_session' | 'on_session';
@@ -1634,6 +1634,11 @@ declare module 'stripe' {
1634
1634
  */
1635
1635
  reference?: string;
1636
1636
 
1637
+ /**
1638
+ * A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
1639
+ */
1640
+ reference_id?: string;
1641
+
1637
1642
  /**
1638
1643
  * The risk correlation ID for an on-session payment using a saved PayPal payment method.
1639
1644
  */
@@ -1649,6 +1654,11 @@ declare module 'stripe' {
1649
1654
  * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
1650
1655
  */
1651
1656
  setup_future_usage?: Stripe.Emptyable<Paypal.SetupFutureUsage>;
1657
+
1658
+ /**
1659
+ * The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used.
1660
+ */
1661
+ subsellers?: Array<string>;
1652
1662
  }
1653
1663
 
1654
1664
  namespace Paypal {
@@ -1774,7 +1784,11 @@ declare module 'stripe' {
1774
1784
  | 'payment_method'
1775
1785
  | 'transactions';
1776
1786
 
1777
- type Prefetch = 'balances' | 'ownership' | 'transactions';
1787
+ type Prefetch =
1788
+ | 'balances'
1789
+ | 'inferred_balances'
1790
+ | 'ownership'
1791
+ | 'transactions';
1778
1792
  }
1779
1793
 
1780
1794
  type SetupFutureUsage = 'none' | 'off_session' | 'on_session';
@@ -47,6 +47,11 @@ declare module 'stripe' {
47
47
  */
48
48
  payment_intent: string | null;
49
49
 
50
+ /**
51
+ * Payment-method-specific configuration for this ConfirmationToken.
52
+ */
53
+ payment_method_options: ConfirmationToken.PaymentMethodOptions | null;
54
+
50
55
  /**
51
56
  * Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.
52
57
  */
@@ -116,6 +121,22 @@ declare module 'stripe' {
116
121
  }
117
122
  }
118
123
 
124
+ interface PaymentMethodOptions {
125
+ /**
126
+ * This hash contains the card payment method options.
127
+ */
128
+ card: PaymentMethodOptions.Card | null;
129
+ }
130
+
131
+ namespace PaymentMethodOptions {
132
+ interface Card {
133
+ /**
134
+ * The `cvc_update` Token collected from the Payment Element.
135
+ */
136
+ cvc_token: string | null;
137
+ }
138
+ }
139
+
119
140
  interface PaymentMethodPreview {
120
141
  acss_debit?: PaymentMethodPreview.AcssDebit;
121
142
 
@@ -182,10 +203,14 @@ declare module 'stripe' {
182
203
 
183
204
  paypal?: PaymentMethodPreview.Paypal;
184
205
 
206
+ payto?: PaymentMethodPreview.Payto;
207
+
185
208
  pix?: PaymentMethodPreview.Pix;
186
209
 
187
210
  promptpay?: PaymentMethodPreview.Promptpay;
188
211
 
212
+ rechnung?: PaymentMethodPreview.Rechnung;
213
+
189
214
  revolut_pay?: PaymentMethodPreview.RevolutPay;
190
215
 
191
216
  sepa_debit?: PaymentMethodPreview.SepaDebit;
@@ -1166,6 +1191,11 @@ declare module 'stripe' {
1166
1191
  interface Paynow {}
1167
1192
 
1168
1193
  interface Paypal {
1194
+ /**
1195
+ * Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same.
1196
+ */
1197
+ fingerprint?: string | null;
1198
+
1169
1199
  /**
1170
1200
  * Owner's email. Values are provided by PayPal directly
1171
1201
  * (if supported) at the time of authorization or settlement. They cannot be set or mutated.
@@ -1176,12 +1206,58 @@ declare module 'stripe' {
1176
1206
  * PayPal account PayerID. This identifier uniquely identifies the PayPal customer.
1177
1207
  */
1178
1208
  payer_id: string | null;
1209
+
1210
+ /**
1211
+ * Owner's verified email. Values are verified or provided by PayPal directly
1212
+ * (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1213
+ */
1214
+ verified_email?: string | null;
1215
+ }
1216
+
1217
+ interface Payto {
1218
+ /**
1219
+ * Bank-State-Branch number of the bank account.
1220
+ */
1221
+ bsb_number: string | null;
1222
+
1223
+ /**
1224
+ * Last four digits of the bank account number.
1225
+ */
1226
+ last4: string | null;
1227
+
1228
+ /**
1229
+ * The PayID alias for the bank account.
1230
+ */
1231
+ pay_id: string | null;
1179
1232
  }
1180
1233
 
1181
1234
  interface Pix {}
1182
1235
 
1183
1236
  interface Promptpay {}
1184
1237
 
1238
+ interface Rechnung {
1239
+ dob?: Rechnung.Dob;
1240
+ }
1241
+
1242
+ namespace Rechnung {
1243
+ interface Dob {
1244
+ /**
1245
+ * The day of birth, between 1 and 31.
1246
+ */
1247
+ day: number;
1248
+
1249
+ /**
1250
+ * The month of birth, between 1 and 12.
1251
+ */
1252
+ month: number;
1253
+
1254
+ /**
1255
+ * The four-digit year of birth.
1256
+ */
1257
+ year: number;
1258
+ }
1259
+ }
1260
+
1185
1261
  interface RevolutPay {}
1186
1262
 
1187
1263
  interface SepaDebit {
@@ -1271,8 +1347,10 @@ declare module 'stripe' {
1271
1347
  | 'p24'
1272
1348
  | 'paynow'
1273
1349
  | 'paypal'
1350
+ | 'payto'
1274
1351
  | 'pix'
1275
1352
  | 'promptpay'
1353
+ | 'rechnung'
1276
1354
  | 'revolut_pay'
1277
1355
  | 'sepa_debit'
1278
1356
  | 'sofort'
@@ -1288,6 +1366,11 @@ declare module 'stripe' {
1288
1366
  */
1289
1367
  account_holder_type: UsBankAccount.AccountHolderType | null;
1290
1368
 
1369
+ /**
1370
+ * Account number of the bank account.
1371
+ */
1372
+ account_number?: string | null;
1373
+
1291
1374
  /**
1292
1375
  * Account type: checkings or savings. Defaults to checking if omitted.
1293
1376
  */
@@ -113,7 +113,7 @@ declare module 'stripe' {
113
113
  amount_off: number;
114
114
  }
115
115
 
116
- type Duration = 'forever' | 'once' | 'repeating';
116
+ type Duration = 'forever' | 'once' | 'repeating' | 'variable';
117
117
  }
118
118
 
119
119
  /**
@@ -86,7 +86,7 @@ declare module 'stripe' {
86
86
  amount_off: number;
87
87
  }
88
88
 
89
- type Duration = 'forever' | 'once' | 'repeating';
89
+ type Duration = 'forever' | 'once' | 'repeating' | 'variable';
90
90
  }
91
91
 
92
92
  interface CouponRetrieveParams {
@@ -106,6 +106,10 @@ declare module 'stripe' {
106
106
  */
107
107
  pdf: string;
108
108
 
109
+ post_payment_amount?: number;
110
+
111
+ pre_payment_amount?: number;
112
+
109
113
  /**
110
114
  * Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
111
115
  */
@@ -116,6 +120,11 @@ declare module 'stripe' {
116
120
  */
117
121
  refund: string | Stripe.Refund | null;
118
122
 
123
+ /**
124
+ * Refunds related to this credit note.
125
+ */
126
+ refunds?: Array<CreditNote.Refund>;
127
+
119
128
  /**
120
129
  * The details of the cost of shipping, including the ShippingRate applied to the invoice.
121
130
  */
@@ -181,6 +190,18 @@ declare module 'stripe' {
181
190
  | 'order_change'
182
191
  | 'product_unsatisfactory';
183
192
 
193
+ interface Refund {
194
+ /**
195
+ * Amount of the refund that applies to this credit note, in cents (or local equivalent).
196
+ */
197
+ amount_refunded: number;
198
+
199
+ /**
200
+ * ID of the refund.
201
+ */
202
+ refund: string | Stripe.Refund;
203
+ }
204
+
184
205
  interface ShippingCost {
185
206
  /**
186
207
  * Total shipping cost before any taxes are applied.
@@ -68,6 +68,11 @@ declare module 'stripe' {
68
68
  */
69
69
  refund_amount?: number;
70
70
 
71
+ /**
72
+ * Refunds to link to this credit note.
73
+ */
74
+ refunds?: Array<CreditNoteCreateParams.Refund>;
75
+
71
76
  /**
72
77
  * When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
73
78
  */
@@ -151,6 +156,18 @@ declare module 'stripe' {
151
156
  | 'order_change'
152
157
  | 'product_unsatisfactory';
153
158
 
159
+ interface Refund {
160
+ /**
161
+ * Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
162
+ */
163
+ amount_refunded?: number;
164
+
165
+ /**
166
+ * ID of an existing refund to link this credit note to.
167
+ */
168
+ refund?: string;
169
+ }
170
+
154
171
  interface ShippingCost {
155
172
  /**
156
173
  * The ID of the shipping rate to use for this order.
@@ -278,6 +295,11 @@ declare module 'stripe' {
278
295
  */
279
296
  refund_amount?: number;
280
297
 
298
+ /**
299
+ * Refunds to link to this credit note.
300
+ */
301
+ refunds?: Array<CreditNoteListPreviewLineItemsParams.Refund>;
302
+
281
303
  /**
282
304
  * When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
283
305
  */
@@ -361,6 +383,18 @@ declare module 'stripe' {
361
383
  | 'order_change'
362
384
  | 'product_unsatisfactory';
363
385
 
386
+ interface Refund {
387
+ /**
388
+ * Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
389
+ */
390
+ amount_refunded?: number;
391
+
392
+ /**
393
+ * ID of an existing refund to link this credit note to.
394
+ */
395
+ refund?: string;
396
+ }
397
+
364
398
  interface ShippingCost {
365
399
  /**
366
400
  * The ID of the shipping rate to use for this order.
@@ -435,6 +469,11 @@ declare module 'stripe' {
435
469
  */
436
470
  refund_amount?: number;
437
471
 
472
+ /**
473
+ * Refunds to link to this credit note.
474
+ */
475
+ refunds?: Array<CreditNotePreviewParams.Refund>;
476
+
438
477
  /**
439
478
  * When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
440
479
  */
@@ -518,6 +557,18 @@ declare module 'stripe' {
518
557
  | 'order_change'
519
558
  | 'product_unsatisfactory';
520
559
 
560
+ interface Refund {
561
+ /**
562
+ * Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
563
+ */
564
+ amount_refunded?: number;
565
+
566
+ /**
567
+ * ID of an existing refund to link this credit note to.
568
+ */
569
+ refund?: string;
570
+ }
571
+
521
572
  interface ShippingCost {
522
573
  /**
523
574
  * The ID of the shipping rate to use for this order.
@@ -52,6 +52,11 @@ declare module 'stripe' {
52
52
  */
53
53
  buy_button: Components.BuyButton;
54
54
 
55
+ /**
56
+ * This hash contains whether the Payment Element is enabled and the features it supports.
57
+ */
58
+ payment_element: Components.PaymentElement;
59
+
55
60
  /**
56
61
  * This hash contains whether the pricing table is enabled.
57
62
  */
@@ -66,6 +71,77 @@ declare module 'stripe' {
66
71
  enabled: boolean;
67
72
  }
68
73
 
74
+ interface PaymentElement {
75
+ /**
76
+ * Whether the Payment Element is enabled.
77
+ */
78
+ enabled: boolean;
79
+
80
+ /**
81
+ * This hash defines whether the Payment Element supports certain features.
82
+ */
83
+ features: PaymentElement.Features | null;
84
+ }
85
+
86
+ namespace PaymentElement {
87
+ interface Features {
88
+ /**
89
+ * A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list.
90
+ *
91
+ * If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"].
92
+ */
93
+ payment_method_allow_redisplay_filters: Array<
94
+ Features.PaymentMethodAllowRedisplayFilter
95
+ >;
96
+
97
+ /**
98
+ * Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.
99
+ */
100
+ payment_method_redisplay: Features.PaymentMethodRedisplay;
101
+
102
+ /**
103
+ * Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `10`.
104
+ */
105
+ payment_method_redisplay_limit: number | null;
106
+
107
+ /**
108
+ * Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
109
+ *
110
+ * Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
111
+ */
112
+ payment_method_remove: Features.PaymentMethodRemove;
113
+
114
+ /**
115
+ * Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.
116
+ *
117
+ * If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
118
+ */
119
+ payment_method_save: Features.PaymentMethodSave;
120
+
121
+ /**
122
+ * When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent.
123
+ *
124
+ * When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation.
125
+ */
126
+ payment_method_save_usage: Features.PaymentMethodSaveUsage | null;
127
+ }
128
+
129
+ namespace Features {
130
+ type PaymentMethodAllowRedisplayFilter =
131
+ | 'always'
132
+ | 'limited'
133
+ | 'unspecified';
134
+
135
+ type PaymentMethodRedisplay = 'disabled' | 'enabled';
136
+
137
+ type PaymentMethodRemove = 'disabled' | 'enabled';
138
+
139
+ type PaymentMethodSave = 'disabled' | 'enabled';
140
+
141
+ type PaymentMethodSaveUsage = 'off_session' | 'on_session';
142
+ }
143
+ }
144
+
69
145
  interface PricingTable {
70
146
  /**
71
147
  * Whether the pricing table is enabled.
@@ -26,6 +26,11 @@ declare module 'stripe' {
26
26
  */
27
27
  buy_button?: Components.BuyButton;
28
28
 
29
+ /**
30
+ * Configuration for the Payment Element.
31
+ */
32
+ payment_element?: Components.PaymentElement;
33
+
29
34
  /**
30
35
  * Configuration for the pricing table.
31
36
  */
@@ -40,6 +45,77 @@ declare module 'stripe' {
40
45
  enabled: boolean;
41
46
  }
42
47
 
48
+ interface PaymentElement {
49
+ /**
50
+ * Whether the Payment Element is enabled.
51
+ */
52
+ enabled: boolean;
53
+
54
+ /**
55
+ * This hash defines whether the Payment Element supports certain features.
56
+ */
57
+ features?: PaymentElement.Features;
58
+ }
59
+
60
+ namespace PaymentElement {
61
+ interface Features {
62
+ /**
63
+ * A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list.
64
+ *
65
+ * If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"].
66
+ */
67
+ payment_method_allow_redisplay_filters?: Array<
68
+ Features.PaymentMethodAllowRedisplayFilter
69
+ >;
70
+
71
+ /**
72
+ * Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.
73
+ */
74
+ payment_method_redisplay?: Features.PaymentMethodRedisplay;
75
+
76
+ /**
77
+ * Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `10`.
78
+ */
79
+ payment_method_redisplay_limit?: number;
80
+
81
+ /**
82
+ * Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
83
+ *
84
+ * Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
85
+ */
86
+ payment_method_remove?: Features.PaymentMethodRemove;
87
+
88
+ /**
89
+ * Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.
90
+ *
91
+ * If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
92
+ */
93
+ payment_method_save?: Features.PaymentMethodSave;
94
+
95
+ /**
96
+ * When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent.
97
+ *
98
+ * When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation.
99
+ */
100
+ payment_method_save_usage?: Features.PaymentMethodSaveUsage;
101
+ }
102
+
103
+ namespace Features {
104
+ type PaymentMethodAllowRedisplayFilter =
105
+ | 'always'
106
+ | 'limited'
107
+ | 'unspecified';
108
+
109
+ type PaymentMethodRedisplay = 'disabled' | 'enabled';
110
+
111
+ type PaymentMethodRemove = 'disabled' | 'enabled';
112
+
113
+ type PaymentMethodSave = 'disabled' | 'enabled';
114
+
115
+ type PaymentMethodSaveUsage = 'off_session' | 'on_session';
116
+ }
117
+ }
118
+
43
119
  interface PricingTable {
44
120
  /**
45
121
  * Whether the pricing table is enabled.
@@ -818,8 +818,10 @@ declare module 'stripe' {
818
818
  | 'p24'
819
819
  | 'paynow'
820
820
  | 'paypal'
821
+ | 'payto'
821
822
  | 'pix'
822
823
  | 'promptpay'
824
+ | 'rechnung'
823
825
  | 'revolut_pay'
824
826
  | 'sepa_debit'
825
827
  | 'sofort'