stripe 17.4.0 → 17.5.0-beta.2

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 (181) hide show
  1. package/CHANGELOG.md +1000 -109
  2. package/README.md +4 -4
  3. package/VERSION +1 -1
  4. package/cjs/resources/AccountNotices.js +21 -0
  5. package/cjs/resources/Capital/FinancingOffers.js +21 -0
  6. package/cjs/resources/Capital/FinancingSummary.js +12 -0
  7. package/cjs/resources/Capital/FinancingTransactions.js +17 -0
  8. package/cjs/resources/FinancialConnections/Accounts.js +5 -0
  9. package/cjs/resources/FinancialConnections/Institutions.js +17 -0
  10. package/cjs/resources/GiftCards/Cards.js +23 -0
  11. package/cjs/resources/GiftCards/Transactions.js +33 -0
  12. package/cjs/resources/Invoices.js +17 -0
  13. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
  14. package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
  15. package/cjs/resources/Issuing/FraudLiabilityDebits.js +17 -0
  16. package/cjs/resources/Margins.js +22 -0
  17. package/cjs/resources/Orders.js +24 -0
  18. package/cjs/resources/PaymentAttemptRecords.js +17 -0
  19. package/cjs/resources/PaymentIntents.js +8 -0
  20. package/cjs/resources/PaymentRecords.js +29 -0
  21. package/cjs/resources/Quotes.js +32 -0
  22. package/cjs/resources/SubscriptionSchedules.js +4 -0
  23. package/cjs/resources/Tax/Associations.js +9 -0
  24. package/cjs/resources/Tax/Forms.js +20 -0
  25. package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
  26. package/cjs/resources/Terminal/Readers.js +12 -0
  27. package/cjs/resources.js +48 -10
  28. package/cjs/stripe.core.js +1 -1
  29. package/esm/resources/AccountNotices.js +18 -0
  30. package/esm/resources/Capital/FinancingOffers.js +18 -0
  31. package/esm/resources/Capital/FinancingSummary.js +9 -0
  32. package/esm/resources/Capital/FinancingTransactions.js +14 -0
  33. package/esm/resources/FinancialConnections/Accounts.js +5 -0
  34. package/esm/resources/FinancialConnections/Institutions.js +14 -0
  35. package/esm/resources/GiftCards/Cards.js +20 -0
  36. package/esm/resources/GiftCards/Transactions.js +30 -0
  37. package/esm/resources/Invoices.js +17 -0
  38. package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
  39. package/esm/resources/Issuing/DisputeSettlementDetails.js +14 -0
  40. package/esm/resources/Issuing/FraudLiabilityDebits.js +14 -0
  41. package/esm/resources/Margins.js +19 -0
  42. package/esm/resources/Orders.js +21 -0
  43. package/esm/resources/PaymentAttemptRecords.js +14 -0
  44. package/esm/resources/PaymentIntents.js +8 -0
  45. package/esm/resources/PaymentRecords.js +26 -0
  46. package/esm/resources/Quotes.js +32 -0
  47. package/esm/resources/SubscriptionSchedules.js +4 -0
  48. package/esm/resources/Tax/Associations.js +6 -0
  49. package/esm/resources/Tax/Forms.js +17 -0
  50. package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
  51. package/esm/resources/Terminal/Readers.js +12 -0
  52. package/esm/resources.js +33 -0
  53. package/esm/stripe.core.js +1 -1
  54. package/package.json +1 -1
  55. package/types/AccountLinksResource.d.ts +5 -1
  56. package/types/AccountNotices.d.ts +113 -0
  57. package/types/AccountNoticesResource.d.ts +98 -0
  58. package/types/AccountSessions.d.ts +50 -5
  59. package/types/AccountSessionsResource.d.ts +360 -5
  60. package/types/Accounts.d.ts +191 -2
  61. package/types/AccountsResource.d.ts +522 -2
  62. package/types/BalanceTransactions.d.ts +3 -1
  63. package/types/BalanceTransactionsResource.d.ts +1 -1
  64. package/types/Billing/CreditBalanceSummaryResource.d.ts +2 -2
  65. package/types/Billing/CreditBalanceTransactionsResource.d.ts +2 -2
  66. package/types/Billing/CreditGrants.d.ts +2 -2
  67. package/types/Billing/CreditGrantsResource.d.ts +8 -8
  68. package/types/Billing/MeterErrorReports.d.ts +106 -0
  69. package/types/Billing/MeterEventAdjustmentsResource.d.ts +1 -1
  70. package/types/Billing/MeterEvents.d.ts +1 -2
  71. package/types/Billing/MeterEventsResource.d.ts +2 -2
  72. package/types/Billing/Meters.d.ts +1 -1
  73. package/types/Billing/MetersResource.d.ts +8 -8
  74. package/types/BillingPortal/Configurations.d.ts +1 -1
  75. package/types/Capabilities.d.ts +1 -1
  76. package/types/Capital/FinancingOffers.d.ts +188 -0
  77. package/types/Capital/FinancingOffersResource.d.ts +97 -0
  78. package/types/Capital/FinancingSummary.d.ts +106 -0
  79. package/types/Capital/FinancingSummaryResource.d.ts +27 -0
  80. package/types/Capital/FinancingTransactions.d.ts +135 -0
  81. package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
  82. package/types/Charges.d.ts +244 -2
  83. package/types/ChargesResource.d.ts +1294 -0
  84. package/types/Checkout/Sessions.d.ts +333 -6
  85. package/types/Checkout/SessionsResource.d.ts +460 -8
  86. package/types/ConfirmationTokens.d.ts +99 -0
  87. package/types/Coupons.d.ts +1 -1
  88. package/types/CouponsResource.d.ts +1 -1
  89. package/types/CreditNotes.d.ts +21 -0
  90. package/types/CreditNotesResource.d.ts +51 -0
  91. package/types/CustomersResource.d.ts +8 -1
  92. package/types/EventTypes.d.ts +598 -2
  93. package/types/Events.d.ts +93 -0
  94. package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
  95. package/types/FinancialConnections/Accounts.d.ts +29 -1
  96. package/types/FinancialConnections/AccountsResource.d.ts +35 -3
  97. package/types/FinancialConnections/Institutions.d.ts +93 -0
  98. package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
  99. package/types/FinancialConnections/Sessions.d.ts +49 -1
  100. package/types/FinancialConnections/SessionsResource.d.ts +38 -1
  101. package/types/FundingInstructions.d.ts +21 -0
  102. package/types/GiftCards/Cards.d.ts +118 -0
  103. package/types/GiftCards/CardsResource.d.ts +159 -0
  104. package/types/GiftCards/Transactions.d.ts +129 -0
  105. package/types/GiftCards/TransactionsResource.d.ts +201 -0
  106. package/types/InvoiceItems.d.ts +5 -0
  107. package/types/InvoiceItemsResource.d.ts +98 -0
  108. package/types/InvoiceLineItems.d.ts +28 -1
  109. package/types/InvoicePayments.d.ts +113 -0
  110. package/types/Invoices.d.ts +156 -2
  111. package/types/InvoicesResource.d.ts +5537 -1852
  112. package/types/Issuing/Authorizations.d.ts +1 -1
  113. package/types/Issuing/CardholdersResource.d.ts +2 -1
  114. package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
  115. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
  116. package/types/Issuing/DisputeSettlementDetails.d.ts +73 -0
  117. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
  118. package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
  119. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
  120. package/types/Issuing/Settlements.d.ts +103 -0
  121. package/types/Issuing/Transactions.d.ts +2 -0
  122. package/types/Issuing/TransactionsResource.d.ts +5 -0
  123. package/types/LineItems.d.ts +33 -1
  124. package/types/Mandates.d.ts +77 -0
  125. package/types/Margins.d.ts +56 -0
  126. package/types/MarginsResource.d.ts +114 -0
  127. package/types/Orders.d.ts +1160 -0
  128. package/types/OrdersResource.d.ts +2923 -0
  129. package/types/PaymentAttemptRecords.d.ts +242 -0
  130. package/types/PaymentAttemptRecordsResource.d.ts +47 -0
  131. package/types/PaymentIntents.d.ts +688 -4
  132. package/types/PaymentIntentsResource.d.ts +7994 -3677
  133. package/types/PaymentLinks.d.ts +6 -0
  134. package/types/PaymentLinksResource.d.ts +23 -2
  135. package/types/PaymentMethodConfigurations.d.ts +180 -0
  136. package/types/PaymentMethodConfigurationsResource.d.ts +250 -0
  137. package/types/PaymentMethods.d.ts +99 -0
  138. package/types/PaymentMethodsResource.d.ts +133 -0
  139. package/types/PaymentRecords.d.ts +259 -0
  140. package/types/PaymentRecordsResource.d.ts +455 -0
  141. package/types/Prices.d.ts +22 -0
  142. package/types/PricesResource.d.ts +22 -0
  143. package/types/Products.d.ts +39 -0
  144. package/types/ProductsResource.d.ts +36 -0
  145. package/types/QuoteLines.d.ts +634 -0
  146. package/types/QuotePreviewInvoices.d.ts +1634 -0
  147. package/types/QuotePreviewSubscriptionSchedules.d.ts +824 -0
  148. package/types/Quotes.d.ts +591 -1
  149. package/types/QuotesResource.d.ts +2526 -194
  150. package/types/Refunds.d.ts +14 -0
  151. package/types/SetupAttempts.d.ts +48 -0
  152. package/types/SetupIntents.d.ts +133 -3
  153. package/types/SetupIntentsResource.d.ts +681 -9
  154. package/types/Sources.d.ts +23 -0
  155. package/types/SubscriptionItems.d.ts +21 -0
  156. package/types/SubscriptionItemsResource.d.ts +109 -0
  157. package/types/SubscriptionSchedules.d.ts +210 -0
  158. package/types/SubscriptionSchedulesResource.d.ts +1234 -16
  159. package/types/Subscriptions.d.ts +96 -1
  160. package/types/SubscriptionsResource.d.ts +372 -5
  161. package/types/Tax/Associations.d.ts +126 -0
  162. package/types/Tax/AssociationsResource.d.ts +29 -0
  163. package/types/Tax/Forms.d.ts +220 -0
  164. package/types/Tax/FormsResource.d.ts +107 -0
  165. package/types/Terminal/LocationsResource.d.ts +1 -1
  166. package/types/Terminal/ReaderCollectedData.d.ts +51 -0
  167. package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
  168. package/types/Terminal/Readers.d.ts +278 -0
  169. package/types/Terminal/ReadersResource.d.ts +215 -0
  170. package/types/TestHelpers/ConfirmationTokensResource.d.ts +104 -0
  171. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
  172. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
  173. package/types/Treasury/FinancialAccountFeatures.d.ts +10 -3
  174. package/types/Treasury/FinancialAccounts.d.ts +5 -0
  175. package/types/Treasury/FinancialAccountsResource.d.ts +37 -0
  176. package/types/Treasury/OutboundTransfers.d.ts +26 -0
  177. package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
  178. package/types/Treasury/ReceivedCredits.d.ts +26 -0
  179. package/types/Treasury/ReceivedDebits.d.ts +31 -0
  180. package/types/WebhookEndpointsResource.d.ts +70 -0
  181. 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
  */
@@ -297,7 +304,9 @@ declare module 'stripe' {
297
304
 
298
305
  interface AutomaticTax {
299
306
  /**
300
- * Set to true to enable automatic taxes.
307
+ * Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
308
+ *
309
+ * Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation.
301
310
  */
302
311
  enabled: boolean;
303
312
 
@@ -678,6 +687,11 @@ declare module 'stripe' {
678
687
  */
679
688
  dynamic_tax_rates?: Array<string>;
680
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
+
681
695
  /**
682
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.
683
697
  */
@@ -1145,6 +1159,11 @@ declare module 'stripe' {
1145
1159
  */
1146
1160
  paypal?: PaymentMethodOptions.Paypal;
1147
1161
 
1162
+ /**
1163
+ * contains details about the PayTo payment method options.
1164
+ */
1165
+ payto?: PaymentMethodOptions.Payto;
1166
+
1148
1167
  /**
1149
1168
  * contains details about the Pix payment method options.
1150
1169
  */
@@ -1348,7 +1367,12 @@ declare module 'stripe' {
1348
1367
  }
1349
1368
 
1350
1369
  namespace BacsDebit {
1351
- interface MandateOptions {}
1370
+ interface MandateOptions {
1371
+ /**
1372
+ * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
1373
+ */
1374
+ reference_prefix?: Stripe.Emptyable<string>;
1375
+ }
1352
1376
 
1353
1377
  type SetupFutureUsage = 'none' | 'off_session' | 'on_session';
1354
1378
  }
@@ -1394,6 +1418,11 @@ declare module 'stripe' {
1394
1418
  */
1395
1419
  installments?: Card.Installments;
1396
1420
 
1421
+ /**
1422
+ * Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession.
1423
+ */
1424
+ request_decremental_authorization?: Card.RequestDecrementalAuthorization;
1425
+
1397
1426
  /**
1398
1427
  * Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession.
1399
1428
  */
@@ -1450,6 +1479,8 @@ declare module 'stripe' {
1450
1479
  enabled?: boolean;
1451
1480
  }
1452
1481
 
1482
+ type RequestDecrementalAuthorization = 'if_available' | 'never';
1483
+
1453
1484
  type RequestExtendedAuthorization = 'if_available' | 'never';
1454
1485
 
1455
1486
  type RequestIncrementalAuthorization = 'if_available' | 'never';
@@ -1828,6 +1859,11 @@ declare module 'stripe' {
1828
1859
  */
1829
1860
  reference?: string;
1830
1861
 
1862
+ /**
1863
+ * 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.
1864
+ */
1865
+ reference_id?: string;
1866
+
1831
1867
  /**
1832
1868
  * The risk correlation ID for an on-session payment using a saved PayPal payment method.
1833
1869
  */
@@ -1845,6 +1881,11 @@ declare module 'stripe' {
1845
1881
  * 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`.
1846
1882
  */
1847
1883
  setup_future_usage?: Stripe.Emptyable<Paypal.SetupFutureUsage>;
1884
+
1885
+ /**
1886
+ * 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.
1887
+ */
1888
+ subsellers?: Array<string>;
1848
1889
  }
1849
1890
 
1850
1891
  namespace Paypal {
@@ -1874,6 +1915,92 @@ declare module 'stripe' {
1874
1915
  type SetupFutureUsage = 'none' | 'off_session';
1875
1916
  }
1876
1917
 
1918
+ interface Payto {
1919
+ /**
1920
+ * Additional fields for Mandate creation
1921
+ */
1922
+ mandate_options?: Payto.MandateOptions;
1923
+
1924
+ /**
1925
+ * Indicates that you intend to make future payments with this PaymentIntent's payment method.
1926
+ *
1927
+ * 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.
1928
+ *
1929
+ * 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.
1930
+ *
1931
+ * 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).
1932
+ */
1933
+ setup_future_usage?: Payto.SetupFutureUsage;
1934
+ }
1935
+
1936
+ namespace Payto {
1937
+ interface MandateOptions {
1938
+ /**
1939
+ * Amount that will be collected. It is required when `amount_type` is `fixed`.
1940
+ */
1941
+ amount?: number;
1942
+
1943
+ /**
1944
+ * 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.
1945
+ */
1946
+ amount_type?: MandateOptions.AmountType;
1947
+
1948
+ /**
1949
+ * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.
1950
+ */
1951
+ end_date?: string;
1952
+
1953
+ /**
1954
+ * The periodicity at which payments will be collected.
1955
+ */
1956
+ payment_schedule?: MandateOptions.PaymentSchedule;
1957
+
1958
+ /**
1959
+ * 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.
1960
+ */
1961
+ payments_per_period?: number;
1962
+
1963
+ /**
1964
+ * The purpose for which payments are made. Defaults to retail.
1965
+ */
1966
+ purpose?: MandateOptions.Purpose;
1967
+
1968
+ /**
1969
+ * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.
1970
+ */
1971
+ start_date?: string;
1972
+ }
1973
+
1974
+ namespace MandateOptions {
1975
+ type AmountType = 'fixed' | 'maximum';
1976
+
1977
+ type PaymentSchedule =
1978
+ | 'adhoc'
1979
+ | 'annual'
1980
+ | 'daily'
1981
+ | 'fortnightly'
1982
+ | 'monthly'
1983
+ | 'quarterly'
1984
+ | 'semi_annual'
1985
+ | 'weekly';
1986
+
1987
+ type Purpose =
1988
+ | 'dependant_support'
1989
+ | 'government'
1990
+ | 'loan'
1991
+ | 'mortgage'
1992
+ | 'other'
1993
+ | 'pension'
1994
+ | 'personal'
1995
+ | 'retail'
1996
+ | 'salary'
1997
+ | 'tax'
1998
+ | 'utility';
1999
+ }
2000
+
2001
+ type SetupFutureUsage = 'none' | 'off_session';
2002
+ }
2003
+
1877
2004
  interface Pix {
1878
2005
  /**
1879
2006
  * The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
@@ -1924,7 +2051,12 @@ declare module 'stripe' {
1924
2051
  }
1925
2052
 
1926
2053
  namespace SepaDebit {
1927
- interface MandateOptions {}
2054
+ interface MandateOptions {
2055
+ /**
2056
+ * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
2057
+ */
2058
+ reference_prefix?: Stripe.Emptyable<string>;
2059
+ }
1928
2060
 
1929
2061
  type SetupFutureUsage = 'none' | 'off_session' | 'on_session';
1930
2062
  }
@@ -1992,7 +2124,11 @@ declare module 'stripe' {
1992
2124
  | 'payment_method'
1993
2125
  | 'transactions';
1994
2126
 
1995
- type Prefetch = 'balances' | 'ownership' | 'transactions';
2127
+ type Prefetch =
2128
+ | 'balances'
2129
+ | 'inferred_balances'
2130
+ | 'ownership'
2131
+ | 'transactions';
1996
2132
  }
1997
2133
 
1998
2134
  type SetupFutureUsage = 'none' | 'off_session' | 'on_session';
@@ -2046,6 +2182,7 @@ declare module 'stripe' {
2046
2182
  | 'eps'
2047
2183
  | 'fpx'
2048
2184
  | 'giropay'
2185
+ | 'gopay'
2049
2186
  | 'grabpay'
2050
2187
  | 'ideal'
2051
2188
  | 'kakao_pay'
@@ -2053,6 +2190,7 @@ declare module 'stripe' {
2053
2190
  | 'konbini'
2054
2191
  | 'kr_card'
2055
2192
  | 'link'
2193
+ | 'mb_way'
2056
2194
  | 'mobilepay'
2057
2195
  | 'multibanco'
2058
2196
  | 'naver_pay'
@@ -2061,11 +2199,15 @@ declare module 'stripe' {
2061
2199
  | 'payco'
2062
2200
  | 'paynow'
2063
2201
  | 'paypal'
2202
+ | 'payto'
2064
2203
  | 'pix'
2065
2204
  | 'promptpay'
2205
+ | 'qris'
2206
+ | 'rechnung'
2066
2207
  | 'revolut_pay'
2067
2208
  | 'samsung_pay'
2068
2209
  | 'sepa_debit'
2210
+ | 'shopeepay'
2069
2211
  | 'sofort'
2070
2212
  | 'swish'
2071
2213
  | 'twint'
@@ -2073,6 +2215,41 @@ declare module 'stripe' {
2073
2215
  | 'wechat_pay'
2074
2216
  | 'zip';
2075
2217
 
2218
+ interface Permissions {
2219
+ /**
2220
+ * Permissions for updating the Checkout Session.
2221
+ */
2222
+ update?: Permissions.Update;
2223
+ }
2224
+
2225
+ namespace Permissions {
2226
+ interface Update {
2227
+ /**
2228
+ * Determines which entity is allowed to update the line items.
2229
+ *
2230
+ * 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.
2231
+ *
2232
+ * 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.
2233
+ */
2234
+ line_items?: Update.LineItems;
2235
+
2236
+ /**
2237
+ * Determines which entity is allowed to update the shipping details.
2238
+ *
2239
+ * 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.
2240
+ *
2241
+ * 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.
2242
+ */
2243
+ shipping_details?: Update.ShippingDetails;
2244
+ }
2245
+
2246
+ namespace Update {
2247
+ type LineItems = 'client_only' | 'server_only';
2248
+
2249
+ type ShippingDetails = 'client_only' | 'server_only';
2250
+ }
2251
+ }
2252
+
2076
2253
  interface PhoneNumberCollection {
2077
2254
  /**
2078
2255
  * Set to `true` to enable phone number collection.
@@ -2654,7 +2831,7 @@ declare module 'stripe' {
2654
2831
  type Required = 'if_supported' | 'never';
2655
2832
  }
2656
2833
 
2657
- type UiMode = 'embedded' | 'hosted';
2834
+ type UiMode = 'custom' | 'embedded' | 'hosted';
2658
2835
  }
2659
2836
 
2660
2837
  interface SessionRetrieveParams {
@@ -2665,15 +2842,290 @@ declare module 'stripe' {
2665
2842
  }
2666
2843
 
2667
2844
  interface SessionUpdateParams {
2845
+ /**
2846
+ * Information about the customer collected within the Checkout Session.
2847
+ */
2848
+ collected_information?: SessionUpdateParams.CollectedInformation;
2849
+
2668
2850
  /**
2669
2851
  * Specifies which fields in the response should be expanded.
2670
2852
  */
2671
2853
  expand?: Array<string>;
2672
2854
 
2855
+ /**
2856
+ * A list of items the customer is purchasing.
2857
+ *
2858
+ * When updating line items, you must retransmit the entire array of line items.
2859
+ *
2860
+ * To retain an existing line item, specify its `id`.
2861
+ *
2862
+ * To update an existing line item, specify its `id` along with the new values of the fields to update.
2863
+ *
2864
+ * To add a new line item, specify a `price` and `quantity`. We don't currently support recurring prices.
2865
+ *
2866
+ * To remove an existing line item, omit the line item's ID from the retransmitted array.
2867
+ *
2868
+ * To reorder a line item, specify it at the desired position in the retransmitted array.
2869
+ */
2870
+ line_items?: Array<SessionUpdateParams.LineItem>;
2871
+
2673
2872
  /**
2674
2873
  * 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`.
2675
2874
  */
2676
2875
  metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
2876
+
2877
+ /**
2878
+ * The shipping rate options to apply to this Session. Up to a maximum of 5.
2879
+ */
2880
+ shipping_options?: Stripe.Emptyable<
2881
+ Array<SessionUpdateParams.ShippingOption>
2882
+ >;
2883
+ }
2884
+
2885
+ namespace SessionUpdateParams {
2886
+ interface CollectedInformation {
2887
+ /**
2888
+ * The shipping details to apply to this Session.
2889
+ */
2890
+ shipping_details?: CollectedInformation.ShippingDetails;
2891
+ }
2892
+
2893
+ namespace CollectedInformation {
2894
+ interface ShippingDetails {
2895
+ /**
2896
+ * The address of the customer
2897
+ */
2898
+ address: ShippingDetails.Address;
2899
+
2900
+ /**
2901
+ * The name of customer
2902
+ */
2903
+ name: string;
2904
+ }
2905
+
2906
+ namespace ShippingDetails {
2907
+ interface Address {
2908
+ /**
2909
+ * City, district, suburb, town, or village.
2910
+ */
2911
+ city?: string;
2912
+
2913
+ /**
2914
+ * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
2915
+ */
2916
+ country: string;
2917
+
2918
+ /**
2919
+ * Address line 1 (e.g., street, PO Box, or company name).
2920
+ */
2921
+ line1: string;
2922
+
2923
+ /**
2924
+ * Address line 2 (e.g., apartment, suite, unit, or building).
2925
+ */
2926
+ line2?: string;
2927
+
2928
+ /**
2929
+ * ZIP or postal code.
2930
+ */
2931
+ postal_code?: string;
2932
+
2933
+ /**
2934
+ * State, county, province, or region.
2935
+ */
2936
+ state?: string;
2937
+ }
2938
+ }
2939
+ }
2940
+
2941
+ interface LineItem {
2942
+ /**
2943
+ * When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout.
2944
+ */
2945
+ adjustable_quantity?: LineItem.AdjustableQuantity;
2946
+
2947
+ /**
2948
+ * ID of an existing line item.
2949
+ */
2950
+ id?: string;
2951
+
2952
+ /**
2953
+ * 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`.
2954
+ */
2955
+ metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
2956
+
2957
+ /**
2958
+ * The ID of the [Price](https://stripe.com/docs/api/prices).
2959
+ */
2960
+ price?: string;
2961
+
2962
+ /**
2963
+ * The quantity of the line item being purchased.
2964
+ */
2965
+ quantity?: number;
2966
+
2967
+ /**
2968
+ * The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
2969
+ */
2970
+ tax_rates?: Stripe.Emptyable<Array<string>>;
2971
+ }
2972
+
2973
+ namespace LineItem {
2974
+ interface AdjustableQuantity {
2975
+ /**
2976
+ * Set to true if the quantity can be adjusted to any positive integer. Setting to false will remove any previously specified constraints on quantity.
2977
+ */
2978
+ enabled: boolean;
2979
+
2980
+ /**
2981
+ * 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.
2982
+ */
2983
+ maximum?: number;
2984
+
2985
+ /**
2986
+ * The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0.
2987
+ */
2988
+ minimum?: number;
2989
+ }
2990
+ }
2991
+
2992
+ interface ShippingOption {
2993
+ /**
2994
+ * The ID of the Shipping Rate to use for this shipping option.
2995
+ */
2996
+ shipping_rate?: string;
2997
+
2998
+ /**
2999
+ * Parameters to be passed to Shipping Rate creation for this shipping option.
3000
+ */
3001
+ shipping_rate_data?: ShippingOption.ShippingRateData;
3002
+ }
3003
+
3004
+ namespace ShippingOption {
3005
+ interface ShippingRateData {
3006
+ /**
3007
+ * The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
3008
+ */
3009
+ delivery_estimate?: ShippingRateData.DeliveryEstimate;
3010
+
3011
+ /**
3012
+ * The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
3013
+ */
3014
+ display_name: string;
3015
+
3016
+ /**
3017
+ * Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
3018
+ */
3019
+ fixed_amount?: ShippingRateData.FixedAmount;
3020
+
3021
+ /**
3022
+ * 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`.
3023
+ */
3024
+ metadata?: Stripe.MetadataParam;
3025
+
3026
+ /**
3027
+ * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
3028
+ */
3029
+ tax_behavior?: ShippingRateData.TaxBehavior;
3030
+
3031
+ /**
3032
+ * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
3033
+ */
3034
+ tax_code?: string;
3035
+
3036
+ /**
3037
+ * The type of calculation to use on the shipping rate.
3038
+ */
3039
+ type?: 'fixed_amount';
3040
+ }
3041
+
3042
+ namespace ShippingRateData {
3043
+ interface DeliveryEstimate {
3044
+ /**
3045
+ * The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
3046
+ */
3047
+ maximum?: DeliveryEstimate.Maximum;
3048
+
3049
+ /**
3050
+ * The lower bound of the estimated range. If empty, represents no lower bound.
3051
+ */
3052
+ minimum?: DeliveryEstimate.Minimum;
3053
+ }
3054
+
3055
+ namespace DeliveryEstimate {
3056
+ interface Maximum {
3057
+ /**
3058
+ * A unit of time.
3059
+ */
3060
+ unit: Maximum.Unit;
3061
+
3062
+ /**
3063
+ * Must be greater than 0.
3064
+ */
3065
+ value: number;
3066
+ }
3067
+
3068
+ namespace Maximum {
3069
+ type Unit = 'business_day' | 'day' | 'hour' | 'month' | 'week';
3070
+ }
3071
+
3072
+ interface Minimum {
3073
+ /**
3074
+ * A unit of time.
3075
+ */
3076
+ unit: Minimum.Unit;
3077
+
3078
+ /**
3079
+ * Must be greater than 0.
3080
+ */
3081
+ value: number;
3082
+ }
3083
+
3084
+ namespace Minimum {
3085
+ type Unit = 'business_day' | 'day' | 'hour' | 'month' | 'week';
3086
+ }
3087
+ }
3088
+
3089
+ interface FixedAmount {
3090
+ /**
3091
+ * A non-negative integer in cents representing how much to charge.
3092
+ */
3093
+ amount: number;
3094
+
3095
+ /**
3096
+ * 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).
3097
+ */
3098
+ currency: string;
3099
+
3100
+ /**
3101
+ * 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).
3102
+ */
3103
+ currency_options?: {
3104
+ [key: string]: FixedAmount.CurrencyOptions;
3105
+ };
3106
+ }
3107
+
3108
+ namespace FixedAmount {
3109
+ interface CurrencyOptions {
3110
+ /**
3111
+ * A non-negative integer in cents representing how much to charge.
3112
+ */
3113
+ amount: number;
3114
+
3115
+ /**
3116
+ * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
3117
+ */
3118
+ tax_behavior?: CurrencyOptions.TaxBehavior;
3119
+ }
3120
+
3121
+ namespace CurrencyOptions {
3122
+ type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
3123
+ }
3124
+ }
3125
+
3126
+ type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
3127
+ }
3128
+ }
2677
3129
  }
2678
3130
 
2679
3131
  interface SessionListParams extends PaginationParams {