stripe 17.7.0 → 17.8.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 (175) hide show
  1. package/CHANGELOG.md +1077 -109
  2. package/OPENAPI_VERSION +1 -1
  3. package/README.md +1 -0
  4. package/VERSION +1 -1
  5. package/cjs/resources/AccountNotices.js +21 -0
  6. package/cjs/resources/Capital/FinancingOffers.js +21 -0
  7. package/cjs/resources/Capital/FinancingSummary.js +12 -0
  8. package/cjs/resources/Capital/FinancingTransactions.js +17 -0
  9. package/cjs/resources/FinancialConnections/Accounts.js +5 -0
  10. package/cjs/resources/FinancialConnections/Institutions.js +17 -0
  11. package/cjs/resources/GiftCards/Cards.js +23 -0
  12. package/cjs/resources/GiftCards/Transactions.js +33 -0
  13. package/cjs/resources/Invoices.js +17 -0
  14. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
  15. package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
  16. package/cjs/resources/Issuing/FraudLiabilityDebits.js +17 -0
  17. package/cjs/resources/Margins.js +22 -0
  18. package/cjs/resources/Orders.js +24 -0
  19. package/cjs/resources/PaymentAttemptRecords.js +17 -0
  20. package/cjs/resources/PaymentIntents.js +8 -0
  21. package/cjs/resources/PaymentRecords.js +29 -0
  22. package/cjs/resources/Quotes.js +32 -0
  23. package/cjs/resources/SubscriptionSchedules.js +4 -0
  24. package/cjs/resources/Tax/Associations.js +9 -0
  25. package/cjs/resources/Tax/Forms.js +20 -0
  26. package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
  27. package/cjs/resources/Terminal/Readers.js +12 -0
  28. package/cjs/resources/TestHelpers/Terminal/Readers.js +8 -0
  29. package/cjs/resources.js +48 -10
  30. package/cjs/stripe.core.js +1 -1
  31. package/esm/resources/AccountNotices.js +18 -0
  32. package/esm/resources/Capital/FinancingOffers.js +18 -0
  33. package/esm/resources/Capital/FinancingSummary.js +9 -0
  34. package/esm/resources/Capital/FinancingTransactions.js +14 -0
  35. package/esm/resources/FinancialConnections/Accounts.js +5 -0
  36. package/esm/resources/FinancialConnections/Institutions.js +14 -0
  37. package/esm/resources/GiftCards/Cards.js +20 -0
  38. package/esm/resources/GiftCards/Transactions.js +30 -0
  39. package/esm/resources/Invoices.js +17 -0
  40. package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
  41. package/esm/resources/Issuing/DisputeSettlementDetails.js +14 -0
  42. package/esm/resources/Issuing/FraudLiabilityDebits.js +14 -0
  43. package/esm/resources/Margins.js +19 -0
  44. package/esm/resources/Orders.js +21 -0
  45. package/esm/resources/PaymentAttemptRecords.js +14 -0
  46. package/esm/resources/PaymentIntents.js +8 -0
  47. package/esm/resources/PaymentRecords.js +26 -0
  48. package/esm/resources/Quotes.js +32 -0
  49. package/esm/resources/SubscriptionSchedules.js +4 -0
  50. package/esm/resources/Tax/Associations.js +6 -0
  51. package/esm/resources/Tax/Forms.js +17 -0
  52. package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
  53. package/esm/resources/Terminal/Readers.js +12 -0
  54. package/esm/resources/TestHelpers/Terminal/Readers.js +8 -0
  55. package/esm/resources.js +33 -0
  56. package/esm/stripe.core.js +1 -1
  57. package/package.json +1 -1
  58. package/types/AccountLinksResource.d.ts +5 -1
  59. package/types/AccountNotices.d.ts +113 -0
  60. package/types/AccountNoticesResource.d.ts +98 -0
  61. package/types/AccountSessions.d.ts +45 -0
  62. package/types/AccountSessionsResource.d.ts +243 -0
  63. package/types/Accounts.d.ts +205 -1
  64. package/types/AccountsResource.d.ts +526 -2
  65. package/types/Billing/MeterErrorReports.d.ts +106 -0
  66. package/types/Capital/FinancingOffers.d.ts +188 -0
  67. package/types/Capital/FinancingOffersResource.d.ts +97 -0
  68. package/types/Capital/FinancingSummary.d.ts +106 -0
  69. package/types/Capital/FinancingSummaryResource.d.ts +27 -0
  70. package/types/Capital/FinancingTransactions.d.ts +135 -0
  71. package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
  72. package/types/Cards.d.ts +5 -0
  73. package/types/Charges.d.ts +148 -0
  74. package/types/ChargesResource.d.ts +1294 -0
  75. package/types/Checkout/Sessions.d.ts +304 -6
  76. package/types/Checkout/SessionsResource.d.ts +440 -5
  77. package/types/ConfirmationTokens.d.ts +99 -0
  78. package/types/Coupons.d.ts +1 -1
  79. package/types/CouponsResource.d.ts +1 -1
  80. package/types/CreditNotes.d.ts +21 -0
  81. package/types/CreditNotesResource.d.ts +51 -0
  82. package/types/CustomersResource.d.ts +7 -0
  83. package/types/EventTypes.d.ts +597 -1
  84. package/types/Events.d.ts +93 -0
  85. package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
  86. package/types/FinancialConnections/Accounts.d.ts +29 -1
  87. package/types/FinancialConnections/AccountsResource.d.ts +35 -3
  88. package/types/FinancialConnections/Institutions.d.ts +93 -0
  89. package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
  90. package/types/FinancialConnections/Sessions.d.ts +49 -1
  91. package/types/FinancialConnections/SessionsResource.d.ts +38 -1
  92. package/types/GiftCards/Cards.d.ts +118 -0
  93. package/types/GiftCards/CardsResource.d.ts +159 -0
  94. package/types/GiftCards/Transactions.d.ts +129 -0
  95. package/types/GiftCards/TransactionsResource.d.ts +201 -0
  96. package/types/Identity/VerificationSessions.d.ts +1 -1
  97. package/types/Identity/VerificationSessionsResource.d.ts +1 -1
  98. package/types/InvoiceItems.d.ts +5 -0
  99. package/types/InvoiceItemsResource.d.ts +98 -0
  100. package/types/InvoiceLineItems.d.ts +28 -1
  101. package/types/InvoicePayments.d.ts +113 -0
  102. package/types/Invoices.d.ts +137 -2
  103. package/types/InvoicesResource.d.ts +4618 -933
  104. package/types/Issuing/Authorizations.d.ts +1 -0
  105. package/types/Issuing/CardholdersResource.d.ts +2 -1
  106. package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
  107. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
  108. package/types/Issuing/DisputeSettlementDetails.d.ts +73 -0
  109. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
  110. package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
  111. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
  112. package/types/Issuing/Settlements.d.ts +103 -0
  113. package/types/Issuing/Transactions.d.ts +2 -0
  114. package/types/Issuing/TransactionsResource.d.ts +5 -0
  115. package/types/LineItems.d.ts +32 -0
  116. package/types/Mandates.d.ts +77 -0
  117. package/types/Margins.d.ts +56 -0
  118. package/types/MarginsResource.d.ts +114 -0
  119. package/types/Orders.d.ts +1189 -0
  120. package/types/OrdersResource.d.ts +2981 -0
  121. package/types/PaymentAttemptRecords.d.ts +242 -0
  122. package/types/PaymentAttemptRecordsResource.d.ts +47 -0
  123. package/types/PaymentIntents.d.ts +644 -1
  124. package/types/PaymentIntentsResource.d.ts +8103 -3816
  125. package/types/PaymentLinks.d.ts +6 -0
  126. package/types/PaymentLinksResource.d.ts +12 -0
  127. package/types/PaymentMethodConfigurations.d.ts +180 -0
  128. package/types/PaymentMethodConfigurationsResource.d.ts +250 -0
  129. package/types/PaymentMethods.d.ts +99 -0
  130. package/types/PaymentMethodsResource.d.ts +133 -0
  131. package/types/PaymentRecords.d.ts +242 -0
  132. package/types/PaymentRecordsResource.d.ts +455 -0
  133. package/types/Prices.d.ts +22 -0
  134. package/types/PricesResource.d.ts +22 -0
  135. package/types/Products.d.ts +39 -0
  136. package/types/ProductsResource.d.ts +36 -0
  137. package/types/QuoteLines.d.ts +634 -0
  138. package/types/QuotePreviewInvoices.d.ts +1658 -0
  139. package/types/QuotePreviewSubscriptionSchedules.d.ts +824 -0
  140. package/types/Quotes.d.ts +591 -1
  141. package/types/QuotesResource.d.ts +2526 -194
  142. package/types/Refunds.d.ts +14 -0
  143. package/types/SetupAttempts.d.ts +38 -0
  144. package/types/SetupIntents.d.ts +111 -1
  145. package/types/SetupIntentsResource.d.ts +645 -3
  146. package/types/Sources.d.ts +29 -0
  147. package/types/SubscriptionItems.d.ts +21 -0
  148. package/types/SubscriptionItemsResource.d.ts +109 -0
  149. package/types/SubscriptionSchedules.d.ts +200 -0
  150. package/types/SubscriptionSchedulesResource.d.ts +1234 -16
  151. package/types/Subscriptions.d.ts +91 -1
  152. package/types/SubscriptionsResource.d.ts +369 -2
  153. package/types/Tax/Associations.d.ts +126 -0
  154. package/types/Tax/AssociationsResource.d.ts +29 -0
  155. package/types/Tax/Calculations.d.ts +1 -1
  156. package/types/Tax/Forms.d.ts +220 -0
  157. package/types/Tax/FormsResource.d.ts +107 -0
  158. package/types/TaxRates.d.ts +1 -1
  159. package/types/Terminal/ReaderCollectedData.d.ts +51 -0
  160. package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
  161. package/types/Terminal/Readers.d.ts +290 -0
  162. package/types/Terminal/ReadersResource.d.ts +215 -0
  163. package/types/TestHelpers/ConfirmationTokensResource.d.ts +104 -0
  164. package/types/TestHelpers/Terminal/ReadersResource.d.ts +53 -0
  165. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
  166. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
  167. package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
  168. package/types/Treasury/FinancialAccounts.d.ts +5 -0
  169. package/types/Treasury/FinancialAccountsResource.d.ts +37 -0
  170. package/types/Treasury/OutboundTransfers.d.ts +26 -0
  171. package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
  172. package/types/Treasury/ReceivedCredits.d.ts +26 -0
  173. package/types/Treasury/ReceivedDebits.d.ts +31 -0
  174. package/types/WebhookEndpointsResource.d.ts +70 -0
  175. package/types/index.d.ts +62 -0
@@ -30,7 +30,7 @@ declare module 'stripe' {
30
30
  billing_address_collection?: SessionCreateParams.BillingAddressCollection;
31
31
 
32
32
  /**
33
- * If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded`.
33
+ * If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded` or `custom`.
34
34
  */
35
35
  cancel_url?: string;
36
36
 
@@ -192,6 +192,13 @@ declare module 'stripe' {
192
192
  */
193
193
  payment_method_types?: Array<SessionCreateParams.PaymentMethodType>;
194
194
 
195
+ /**
196
+ * This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
197
+ *
198
+ * For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`.
199
+ */
200
+ permissions?: SessionCreateParams.Permissions;
201
+
195
202
  /**
196
203
  * Controls phone number collection settings for the session.
197
204
  *
@@ -207,7 +214,7 @@ declare module 'stripe' {
207
214
 
208
215
  /**
209
216
  * The URL to redirect your customer back to after they authenticate or cancel their payment on the
210
- * payment method's app or site. This parameter is required if ui_mode is `embedded`
217
+ * payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom`
211
218
  * and redirect-based payment methods are enabled on the session.
212
219
  */
213
220
  return_url?: string;
@@ -247,7 +254,7 @@ declare module 'stripe' {
247
254
  /**
248
255
  * The URL to which Stripe should send customers when payment or setup
249
256
  * is complete.
250
- * This parameter is not allowed if ui_mode is `embedded`. If you'd like to use
257
+ * This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use
251
258
  * information from the successful Checkout Session on your page, read the
252
259
  * guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).
253
260
  */
@@ -680,6 +687,11 @@ declare module 'stripe' {
680
687
  */
681
688
  dynamic_tax_rates?: Array<string>;
682
689
 
690
+ /**
691
+ * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
692
+ */
693
+ metadata?: Stripe.MetadataParam;
694
+
683
695
  /**
684
696
  * The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required.
685
697
  */
@@ -1152,6 +1164,11 @@ declare module 'stripe' {
1152
1164
  */
1153
1165
  paypal?: PaymentMethodOptions.Paypal;
1154
1166
 
1167
+ /**
1168
+ * contains details about the PayTo payment method options.
1169
+ */
1170
+ payto?: PaymentMethodOptions.Payto;
1171
+
1155
1172
  /**
1156
1173
  * contains details about the Pix payment method options.
1157
1174
  */
@@ -1421,6 +1438,11 @@ declare module 'stripe' {
1421
1438
  */
1422
1439
  installments?: Card.Installments;
1423
1440
 
1441
+ /**
1442
+ * Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession.
1443
+ */
1444
+ request_decremental_authorization?: Card.RequestDecrementalAuthorization;
1445
+
1424
1446
  /**
1425
1447
  * Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession.
1426
1448
  */
@@ -1482,6 +1504,8 @@ declare module 'stripe' {
1482
1504
  enabled?: boolean;
1483
1505
  }
1484
1506
 
1507
+ type RequestDecrementalAuthorization = 'if_available' | 'never';
1508
+
1485
1509
  type RequestExtendedAuthorization = 'if_available' | 'never';
1486
1510
 
1487
1511
  type RequestIncrementalAuthorization = 'if_available' | 'never';
@@ -1877,6 +1901,11 @@ declare module 'stripe' {
1877
1901
  */
1878
1902
  reference?: string;
1879
1903
 
1904
+ /**
1905
+ * 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.
1906
+ */
1907
+ reference_id?: string;
1908
+
1880
1909
  /**
1881
1910
  * The risk correlation ID for an on-session payment using a saved PayPal payment method.
1882
1911
  */
@@ -1894,6 +1923,11 @@ declare module 'stripe' {
1894
1923
  * If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
1895
1924
  */
1896
1925
  setup_future_usage?: Stripe.Emptyable<Paypal.SetupFutureUsage>;
1926
+
1927
+ /**
1928
+ * 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.
1929
+ */
1930
+ subsellers?: Array<string>;
1897
1931
  }
1898
1932
 
1899
1933
  namespace Paypal {
@@ -1923,6 +1957,92 @@ declare module 'stripe' {
1923
1957
  type SetupFutureUsage = 'none' | 'off_session';
1924
1958
  }
1925
1959
 
1960
+ interface Payto {
1961
+ /**
1962
+ * Additional fields for Mandate creation
1963
+ */
1964
+ mandate_options?: Payto.MandateOptions;
1965
+
1966
+ /**
1967
+ * Indicates that you intend to make future payments with this PaymentIntent's payment method.
1968
+ *
1969
+ * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1970
+ *
1971
+ * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1972
+ *
1973
+ * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
1974
+ */
1975
+ setup_future_usage?: Payto.SetupFutureUsage;
1976
+ }
1977
+
1978
+ namespace Payto {
1979
+ interface MandateOptions {
1980
+ /**
1981
+ * Amount that will be collected. It is required when `amount_type` is `fixed`.
1982
+ */
1983
+ amount?: number;
1984
+
1985
+ /**
1986
+ * The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively.
1987
+ */
1988
+ amount_type?: MandateOptions.AmountType;
1989
+
1990
+ /**
1991
+ * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.
1992
+ */
1993
+ end_date?: string;
1994
+
1995
+ /**
1996
+ * The periodicity at which payments will be collected.
1997
+ */
1998
+ payment_schedule?: MandateOptions.PaymentSchedule;
1999
+
2000
+ /**
2001
+ * The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit.
2002
+ */
2003
+ payments_per_period?: number;
2004
+
2005
+ /**
2006
+ * The purpose for which payments are made. Defaults to retail.
2007
+ */
2008
+ purpose?: MandateOptions.Purpose;
2009
+
2010
+ /**
2011
+ * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.
2012
+ */
2013
+ start_date?: string;
2014
+ }
2015
+
2016
+ namespace MandateOptions {
2017
+ type AmountType = 'fixed' | 'maximum';
2018
+
2019
+ type PaymentSchedule =
2020
+ | 'adhoc'
2021
+ | 'annual'
2022
+ | 'daily'
2023
+ | 'fortnightly'
2024
+ | 'monthly'
2025
+ | 'quarterly'
2026
+ | 'semi_annual'
2027
+ | 'weekly';
2028
+
2029
+ type Purpose =
2030
+ | 'dependant_support'
2031
+ | 'government'
2032
+ | 'loan'
2033
+ | 'mortgage'
2034
+ | 'other'
2035
+ | 'pension'
2036
+ | 'personal'
2037
+ | 'retail'
2038
+ | 'salary'
2039
+ | 'tax'
2040
+ | 'utility';
2041
+ }
2042
+
2043
+ type SetupFutureUsage = 'none' | 'off_session';
2044
+ }
2045
+
1926
2046
  interface Pix {
1927
2047
  /**
1928
2048
  * The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
@@ -2056,7 +2176,11 @@ declare module 'stripe' {
2056
2176
  | 'payment_method'
2057
2177
  | 'transactions';
2058
2178
 
2059
- type Prefetch = 'balances' | 'ownership' | 'transactions';
2179
+ type Prefetch =
2180
+ | 'balances'
2181
+ | 'inferred_balances'
2182
+ | 'ownership'
2183
+ | 'transactions';
2060
2184
  }
2061
2185
 
2062
2186
  type SetupFutureUsage = 'none' | 'off_session' | 'on_session';
@@ -2110,6 +2234,7 @@ declare module 'stripe' {
2110
2234
  | 'eps'
2111
2235
  | 'fpx'
2112
2236
  | 'giropay'
2237
+ | 'gopay'
2113
2238
  | 'grabpay'
2114
2239
  | 'ideal'
2115
2240
  | 'kakao_pay'
@@ -2117,6 +2242,7 @@ declare module 'stripe' {
2117
2242
  | 'konbini'
2118
2243
  | 'kr_card'
2119
2244
  | 'link'
2245
+ | 'mb_way'
2120
2246
  | 'mobilepay'
2121
2247
  | 'multibanco'
2122
2248
  | 'naver_pay'
@@ -2126,11 +2252,15 @@ declare module 'stripe' {
2126
2252
  | 'payco'
2127
2253
  | 'paynow'
2128
2254
  | 'paypal'
2255
+ | 'payto'
2129
2256
  | 'pix'
2130
2257
  | 'promptpay'
2258
+ | 'qris'
2259
+ | 'rechnung'
2131
2260
  | 'revolut_pay'
2132
2261
  | 'samsung_pay'
2133
2262
  | 'sepa_debit'
2263
+ | 'shopeepay'
2134
2264
  | 'sofort'
2135
2265
  | 'swish'
2136
2266
  | 'twint'
@@ -2138,6 +2268,41 @@ declare module 'stripe' {
2138
2268
  | 'wechat_pay'
2139
2269
  | 'zip';
2140
2270
 
2271
+ interface Permissions {
2272
+ /**
2273
+ * Permissions for updating the Checkout Session.
2274
+ */
2275
+ update?: Permissions.Update;
2276
+ }
2277
+
2278
+ namespace Permissions {
2279
+ interface Update {
2280
+ /**
2281
+ * Determines which entity is allowed to update the line items.
2282
+ *
2283
+ * Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items.
2284
+ *
2285
+ * When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API.
2286
+ */
2287
+ line_items?: Update.LineItems;
2288
+
2289
+ /**
2290
+ * Determines which entity is allowed to update the shipping details.
2291
+ *
2292
+ * Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details.
2293
+ *
2294
+ * When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API.
2295
+ */
2296
+ shipping_details?: Update.ShippingDetails;
2297
+ }
2298
+
2299
+ namespace Update {
2300
+ type LineItems = 'client_only' | 'server_only';
2301
+
2302
+ type ShippingDetails = 'client_only' | 'server_only';
2303
+ }
2304
+ }
2305
+
2141
2306
  interface PhoneNumberCollection {
2142
2307
  /**
2143
2308
  * Set to `true` to enable phone number collection.
@@ -2722,7 +2887,7 @@ declare module 'stripe' {
2722
2887
  type Required = 'if_supported' | 'never';
2723
2888
  }
2724
2889
 
2725
- type UiMode = 'embedded' | 'hosted';
2890
+ type UiMode = 'custom' | 'embedded' | 'hosted';
2726
2891
  }
2727
2892
 
2728
2893
  interface SessionRetrieveParams {
@@ -2743,10 +2908,280 @@ declare module 'stripe' {
2743
2908
  */
2744
2909
  expand?: Array<string>;
2745
2910
 
2911
+ /**
2912
+ * A list of items the customer is purchasing.
2913
+ *
2914
+ * When updating line items, you must retransmit the entire array of line items.
2915
+ *
2916
+ * To retain an existing line item, specify its `id`.
2917
+ *
2918
+ * To update an existing line item, specify its `id` along with the new values of the fields to update.
2919
+ *
2920
+ * To add a new line item, specify a `price` and `quantity`. We don't currently support recurring prices.
2921
+ *
2922
+ * To remove an existing line item, omit the line item's ID from the retransmitted array.
2923
+ *
2924
+ * To reorder a line item, specify it at the desired position in the retransmitted array.
2925
+ */
2926
+ line_items?: Array<SessionUpdateParams.LineItem>;
2927
+
2746
2928
  /**
2747
2929
  * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
2748
2930
  */
2749
2931
  metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
2932
+
2933
+ /**
2934
+ * The shipping rate options to apply to this Session. Up to a maximum of 5.
2935
+ */
2936
+ shipping_options?: Stripe.Emptyable<
2937
+ Array<SessionUpdateParams.ShippingOption>
2938
+ >;
2939
+ }
2940
+
2941
+ namespace SessionUpdateParams {
2942
+ interface CollectedInformation {
2943
+ /**
2944
+ * The shipping details to apply to this Session.
2945
+ */
2946
+ shipping_details?: CollectedInformation.ShippingDetails;
2947
+ }
2948
+
2949
+ namespace CollectedInformation {
2950
+ interface ShippingDetails {
2951
+ /**
2952
+ * The address of the customer
2953
+ */
2954
+ address: ShippingDetails.Address;
2955
+
2956
+ /**
2957
+ * The name of customer
2958
+ */
2959
+ name: string;
2960
+ }
2961
+
2962
+ namespace ShippingDetails {
2963
+ interface Address {
2964
+ /**
2965
+ * City, district, suburb, town, or village.
2966
+ */
2967
+ city?: string;
2968
+
2969
+ /**
2970
+ * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
2971
+ */
2972
+ country: string;
2973
+
2974
+ /**
2975
+ * Address line 1 (e.g., street, PO Box, or company name).
2976
+ */
2977
+ line1: string;
2978
+
2979
+ /**
2980
+ * Address line 2 (e.g., apartment, suite, unit, or building).
2981
+ */
2982
+ line2?: string;
2983
+
2984
+ /**
2985
+ * ZIP or postal code.
2986
+ */
2987
+ postal_code?: string;
2988
+
2989
+ /**
2990
+ * State, county, province, or region.
2991
+ */
2992
+ state?: string;
2993
+ }
2994
+ }
2995
+ }
2996
+
2997
+ interface LineItem {
2998
+ /**
2999
+ * When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout.
3000
+ */
3001
+ adjustable_quantity?: LineItem.AdjustableQuantity;
3002
+
3003
+ /**
3004
+ * ID of an existing line item.
3005
+ */
3006
+ id?: string;
3007
+
3008
+ /**
3009
+ * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
3010
+ */
3011
+ metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
3012
+
3013
+ /**
3014
+ * The ID of the [Price](https://stripe.com/docs/api/prices).
3015
+ */
3016
+ price?: string;
3017
+
3018
+ /**
3019
+ * The quantity of the line item being purchased.
3020
+ */
3021
+ quantity?: number;
3022
+
3023
+ /**
3024
+ * The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
3025
+ */
3026
+ tax_rates?: Stripe.Emptyable<Array<string>>;
3027
+ }
3028
+
3029
+ namespace LineItem {
3030
+ interface AdjustableQuantity {
3031
+ /**
3032
+ * Set to true if the quantity can be adjusted to any positive integer. Setting to false will remove any previously specified constraints on quantity.
3033
+ */
3034
+ enabled: boolean;
3035
+
3036
+ /**
3037
+ * The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999.
3038
+ */
3039
+ maximum?: number;
3040
+
3041
+ /**
3042
+ * The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0.
3043
+ */
3044
+ minimum?: number;
3045
+ }
3046
+ }
3047
+
3048
+ interface ShippingOption {
3049
+ /**
3050
+ * The ID of the Shipping Rate to use for this shipping option.
3051
+ */
3052
+ shipping_rate?: string;
3053
+
3054
+ /**
3055
+ * Parameters to be passed to Shipping Rate creation for this shipping option.
3056
+ */
3057
+ shipping_rate_data?: ShippingOption.ShippingRateData;
3058
+ }
3059
+
3060
+ namespace ShippingOption {
3061
+ interface ShippingRateData {
3062
+ /**
3063
+ * The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
3064
+ */
3065
+ delivery_estimate?: ShippingRateData.DeliveryEstimate;
3066
+
3067
+ /**
3068
+ * The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
3069
+ */
3070
+ display_name: string;
3071
+
3072
+ /**
3073
+ * Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
3074
+ */
3075
+ fixed_amount?: ShippingRateData.FixedAmount;
3076
+
3077
+ /**
3078
+ * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
3079
+ */
3080
+ metadata?: Stripe.MetadataParam;
3081
+
3082
+ /**
3083
+ * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
3084
+ */
3085
+ tax_behavior?: ShippingRateData.TaxBehavior;
3086
+
3087
+ /**
3088
+ * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
3089
+ */
3090
+ tax_code?: string;
3091
+
3092
+ /**
3093
+ * The type of calculation to use on the shipping rate.
3094
+ */
3095
+ type?: 'fixed_amount';
3096
+ }
3097
+
3098
+ namespace ShippingRateData {
3099
+ interface DeliveryEstimate {
3100
+ /**
3101
+ * The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
3102
+ */
3103
+ maximum?: DeliveryEstimate.Maximum;
3104
+
3105
+ /**
3106
+ * The lower bound of the estimated range. If empty, represents no lower bound.
3107
+ */
3108
+ minimum?: DeliveryEstimate.Minimum;
3109
+ }
3110
+
3111
+ namespace DeliveryEstimate {
3112
+ interface Maximum {
3113
+ /**
3114
+ * A unit of time.
3115
+ */
3116
+ unit: Maximum.Unit;
3117
+
3118
+ /**
3119
+ * Must be greater than 0.
3120
+ */
3121
+ value: number;
3122
+ }
3123
+
3124
+ namespace Maximum {
3125
+ type Unit = 'business_day' | 'day' | 'hour' | 'month' | 'week';
3126
+ }
3127
+
3128
+ interface Minimum {
3129
+ /**
3130
+ * A unit of time.
3131
+ */
3132
+ unit: Minimum.Unit;
3133
+
3134
+ /**
3135
+ * Must be greater than 0.
3136
+ */
3137
+ value: number;
3138
+ }
3139
+
3140
+ namespace Minimum {
3141
+ type Unit = 'business_day' | 'day' | 'hour' | 'month' | 'week';
3142
+ }
3143
+ }
3144
+
3145
+ interface FixedAmount {
3146
+ /**
3147
+ * A non-negative integer in cents representing how much to charge.
3148
+ */
3149
+ amount: number;
3150
+
3151
+ /**
3152
+ * 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).
3153
+ */
3154
+ currency: string;
3155
+
3156
+ /**
3157
+ * Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
3158
+ */
3159
+ currency_options?: {
3160
+ [key: string]: FixedAmount.CurrencyOptions;
3161
+ };
3162
+ }
3163
+
3164
+ namespace FixedAmount {
3165
+ interface CurrencyOptions {
3166
+ /**
3167
+ * A non-negative integer in cents representing how much to charge.
3168
+ */
3169
+ amount: number;
3170
+
3171
+ /**
3172
+ * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
3173
+ */
3174
+ tax_behavior?: CurrencyOptions.TaxBehavior;
3175
+ }
3176
+
3177
+ namespace CurrencyOptions {
3178
+ type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
3179
+ }
3180
+ }
3181
+
3182
+ type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
3183
+ }
3184
+ }
2750
3185
  }
2751
3186
 
2752
3187
  namespace SessionUpdateParams {