stripe 16.8.0 → 16.9.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 (169) hide show
  1. package/CHANGELOG.md +819 -110
  2. package/README.md +33 -0
  3. package/VERSION +1 -1
  4. package/cjs/RequestSender.js +66 -5
  5. package/cjs/StripeResource.js +1 -1
  6. package/cjs/apiVersion.js +2 -1
  7. package/cjs/multipart.js +1 -1
  8. package/cjs/resources/AccountNotices.js +21 -0
  9. package/cjs/resources/Capital/FinancingOffers.js +21 -0
  10. package/cjs/resources/Capital/FinancingSummary.js +12 -0
  11. package/cjs/resources/Capital/FinancingTransactions.js +17 -0
  12. package/cjs/resources/FinancialConnections/Accounts.js +5 -0
  13. package/cjs/resources/FinancialConnections/Institutions.js +17 -0
  14. package/cjs/resources/GiftCards/Cards.js +23 -0
  15. package/cjs/resources/GiftCards/Transactions.js +33 -0
  16. package/cjs/resources/Invoices.js +17 -0
  17. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
  18. package/cjs/resources/Margins.js +22 -0
  19. package/cjs/resources/OAuth.js +1 -1
  20. package/cjs/resources/Orders.js +24 -0
  21. package/cjs/resources/PaymentIntents.js +4 -0
  22. package/cjs/resources/QuotePhases.js +22 -0
  23. package/cjs/resources/Quotes.js +32 -0
  24. package/cjs/resources/SubscriptionSchedules.js +4 -0
  25. package/cjs/resources/Tax/Associations.js +9 -0
  26. package/cjs/resources/Tax/Forms.js +20 -0
  27. package/cjs/resources/Terminal/Readers.js +12 -0
  28. package/cjs/resources.js +40 -10
  29. package/cjs/stripe.core.js +6 -3
  30. package/cjs/utils.js +31 -6
  31. package/esm/RequestSender.js +67 -6
  32. package/esm/StripeResource.js +2 -2
  33. package/esm/apiVersion.js +1 -0
  34. package/esm/multipart.js +2 -2
  35. package/esm/resources/AccountNotices.js +18 -0
  36. package/esm/resources/Capital/FinancingOffers.js +18 -0
  37. package/esm/resources/Capital/FinancingSummary.js +9 -0
  38. package/esm/resources/Capital/FinancingTransactions.js +14 -0
  39. package/esm/resources/FinancialConnections/Accounts.js +5 -0
  40. package/esm/resources/FinancialConnections/Institutions.js +14 -0
  41. package/esm/resources/GiftCards/Cards.js +20 -0
  42. package/esm/resources/GiftCards/Transactions.js +30 -0
  43. package/esm/resources/Invoices.js +17 -0
  44. package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
  45. package/esm/resources/Margins.js +19 -0
  46. package/esm/resources/OAuth.js +2 -2
  47. package/esm/resources/Orders.js +21 -0
  48. package/esm/resources/PaymentIntents.js +4 -0
  49. package/esm/resources/QuotePhases.js +19 -0
  50. package/esm/resources/Quotes.js +32 -0
  51. package/esm/resources/SubscriptionSchedules.js +4 -0
  52. package/esm/resources/Tax/Associations.js +6 -0
  53. package/esm/resources/Tax/Forms.js +17 -0
  54. package/esm/resources/Terminal/Readers.js +12 -0
  55. package/esm/resources.js +26 -0
  56. package/esm/stripe.core.js +6 -3
  57. package/esm/utils.js +28 -4
  58. package/package.json +1 -1
  59. package/types/AccountLinksResource.d.ts +5 -1
  60. package/types/AccountNotices.d.ts +113 -0
  61. package/types/AccountNoticesResource.d.ts +98 -0
  62. package/types/AccountSessions.d.ts +45 -0
  63. package/types/AccountSessionsResource.d.ts +260 -0
  64. package/types/Accounts.d.ts +113 -1
  65. package/types/AccountsResource.d.ts +270 -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/Charges.d.ts +74 -1
  73. package/types/ChargesResource.d.ts +1300 -2
  74. package/types/Checkout/Sessions.d.ts +187 -5
  75. package/types/Checkout/SessionsResource.d.ts +353 -7
  76. package/types/ConfirmationTokens.d.ts +67 -0
  77. package/types/Coupons.d.ts +1 -1
  78. package/types/CouponsResource.d.ts +1 -1
  79. package/types/CreditNotes.d.ts +21 -0
  80. package/types/CreditNotesResource.d.ts +51 -0
  81. package/types/CustomerSessions.d.ts +4 -0
  82. package/types/CustomersResource.d.ts +7 -2
  83. package/types/Disputes.d.ts +152 -0
  84. package/types/DisputesResource.d.ts +120 -0
  85. package/types/EventTypes.d.ts +460 -0
  86. package/types/Events.d.ts +85 -0
  87. package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
  88. package/types/FinancialConnections/Accounts.d.ts +29 -1
  89. package/types/FinancialConnections/AccountsResource.d.ts +35 -3
  90. package/types/FinancialConnections/Institutions.d.ts +93 -0
  91. package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
  92. package/types/FinancialConnections/Sessions.d.ts +49 -1
  93. package/types/FinancialConnections/SessionsResource.d.ts +38 -1
  94. package/types/GiftCards/Cards.d.ts +118 -0
  95. package/types/GiftCards/CardsResource.d.ts +159 -0
  96. package/types/GiftCards/Transactions.d.ts +129 -0
  97. package/types/GiftCards/TransactionsResource.d.ts +201 -0
  98. package/types/InvoiceItems.d.ts +5 -0
  99. package/types/InvoiceItemsResource.d.ts +98 -0
  100. package/types/InvoiceLineItems.d.ts +22 -0
  101. package/types/InvoicePayments.d.ts +138 -0
  102. package/types/Invoices.d.ts +118 -2
  103. package/types/InvoicesResource.d.ts +5462 -1801
  104. package/types/Issuing/CardholdersResource.d.ts +2 -1
  105. package/types/Issuing/CreditUnderwritingRecords.d.ts +446 -0
  106. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1017 -0
  107. package/types/LineItems.d.ts +7 -0
  108. package/types/Mandates.d.ts +77 -0
  109. package/types/Margins.d.ts +56 -0
  110. package/types/MarginsResource.d.ts +114 -0
  111. package/types/Orders.d.ts +1084 -0
  112. package/types/OrdersResource.d.ts +2765 -0
  113. package/types/PaymentIntents.d.ts +505 -2
  114. package/types/PaymentIntentsResource.d.ts +7009 -3403
  115. package/types/PaymentLinks.d.ts +1 -0
  116. package/types/PaymentLinksResource.d.ts +10 -4
  117. package/types/PaymentMethodConfigurations.d.ts +36 -0
  118. package/types/PaymentMethodConfigurationsResource.d.ts +50 -0
  119. package/types/PaymentMethods.d.ts +67 -0
  120. package/types/PaymentMethodsResource.d.ts +119 -0
  121. package/types/Prices.d.ts +22 -0
  122. package/types/PricesResource.d.ts +22 -0
  123. package/types/Products.d.ts +39 -0
  124. package/types/ProductsResource.d.ts +36 -0
  125. package/types/QuoteLines.d.ts +634 -0
  126. package/types/QuotePhases.d.ts +198 -0
  127. package/types/QuotePhasesResource.d.ts +67 -0
  128. package/types/QuotePreviewInvoices.d.ts +1531 -0
  129. package/types/QuotePreviewSubscriptionSchedules.d.ts +814 -0
  130. package/types/Quotes.d.ts +596 -1
  131. package/types/QuotesResource.d.ts +2526 -194
  132. package/types/SetupAttempts.d.ts +9 -0
  133. package/types/SetupIntents.d.ts +110 -1
  134. package/types/SetupIntentsResource.d.ts +522 -3
  135. package/types/Sources.d.ts +23 -0
  136. package/types/SubscriptionItems.d.ts +21 -0
  137. package/types/SubscriptionItemsResource.d.ts +109 -0
  138. package/types/SubscriptionSchedules.d.ts +200 -0
  139. package/types/SubscriptionSchedulesResource.d.ts +1234 -16
  140. package/types/Subscriptions.d.ts +82 -1
  141. package/types/SubscriptionsResource.d.ts +349 -4
  142. package/types/Tax/Associations.d.ts +126 -0
  143. package/types/Tax/AssociationsResource.d.ts +29 -0
  144. package/types/Tax/Calculations.d.ts +2 -1
  145. package/types/Tax/CalculationsResource.d.ts +2 -1
  146. package/types/Tax/Forms.d.ts +133 -0
  147. package/types/Tax/FormsResource.d.ts +90 -0
  148. package/types/Tax/Transactions.d.ts +2 -1
  149. package/types/TaxIds.d.ts +2 -1
  150. package/types/TaxIdsResource.d.ts +2 -1
  151. package/types/Terminal/Readers.d.ts +278 -0
  152. package/types/Terminal/ReadersResource.d.ts +208 -0
  153. package/types/TestHelpers/ConfirmationTokensResource.d.ts +63 -0
  154. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
  155. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
  156. package/types/Treasury/FinancialAccounts.d.ts +5 -0
  157. package/types/Treasury/FinancialAccountsResource.d.ts +10 -0
  158. package/types/Treasury/InboundTransfers.d.ts +3 -1
  159. package/types/Treasury/OutboundPayments.d.ts +3 -1
  160. package/types/Treasury/OutboundTransfers.d.ts +29 -1
  161. package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
  162. package/types/Treasury/ReceivedCredits.d.ts +29 -1
  163. package/types/Treasury/ReceivedDebits.d.ts +31 -0
  164. package/types/Treasury/TransactionEntries.d.ts +9 -3
  165. package/types/Treasury/Transactions.d.ts +9 -3
  166. package/types/WebhookEndpointsResource.d.ts +54 -0
  167. package/types/Webhooks.d.ts +37 -28
  168. package/types/index.d.ts +67 -0
  169. package/types/lib.d.ts +12 -0
@@ -25,7 +25,7 @@ declare module 'stripe' {
25
25
  billing_address_collection?: SessionCreateParams.BillingAddressCollection;
26
26
 
27
27
  /**
28
- * 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`.
28
+ * 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`.
29
29
  */
30
30
  cancel_url?: string;
31
31
 
@@ -187,6 +187,13 @@ declare module 'stripe' {
187
187
  */
188
188
  payment_method_types?: Array<SessionCreateParams.PaymentMethodType>;
189
189
 
190
+ /**
191
+ * This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
192
+ *
193
+ * For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`.
194
+ */
195
+ permissions?: SessionCreateParams.Permissions;
196
+
190
197
  /**
191
198
  * Controls phone number collection settings for the session.
192
199
  *
@@ -202,7 +209,7 @@ declare module 'stripe' {
202
209
 
203
210
  /**
204
211
  * The URL to redirect your customer back to after they authenticate or cancel their payment on the
205
- * payment method's app or site. This parameter is required if ui_mode is `embedded`
212
+ * payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom`
206
213
  * and redirect-based payment methods are enabled on the session.
207
214
  */
208
215
  return_url?: string;
@@ -242,7 +249,7 @@ declare module 'stripe' {
242
249
  /**
243
250
  * The URL to which Stripe should send customers when payment or setup
244
251
  * is complete.
245
- * This parameter is not allowed if ui_mode is `embedded`. If you'd like to use
252
+ * This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use
246
253
  * information from the successful Checkout Session on your page, read the
247
254
  * guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).
248
255
  */
@@ -898,12 +905,14 @@ declare module 'stripe' {
898
905
  shipping?: PaymentIntentData.Shipping;
899
906
 
900
907
  /**
901
- * Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead.
908
+ * Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
909
+ *
910
+ * Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead.
902
911
  */
903
912
  statement_descriptor?: string;
904
913
 
905
914
  /**
906
- * Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement.
915
+ * Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement.
907
916
  */
908
917
  statement_descriptor_suffix?: string;
909
918
 
@@ -1111,6 +1120,11 @@ declare module 'stripe' {
1111
1120
  */
1112
1121
  paypal?: PaymentMethodOptions.Paypal;
1113
1122
 
1123
+ /**
1124
+ * contains details about the PayTo payment method options.
1125
+ */
1126
+ payto?: PaymentMethodOptions.Payto;
1127
+
1114
1128
  /**
1115
1129
  * contains details about the Pix payment method options.
1116
1130
  */
@@ -1681,6 +1695,11 @@ declare module 'stripe' {
1681
1695
  */
1682
1696
  reference?: string;
1683
1697
 
1698
+ /**
1699
+ * 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.
1700
+ */
1701
+ reference_id?: string;
1702
+
1684
1703
  /**
1685
1704
  * The risk correlation ID for an on-session payment using a saved PayPal payment method.
1686
1705
  */
@@ -1698,6 +1717,11 @@ declare module 'stripe' {
1698
1717
  * 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`.
1699
1718
  */
1700
1719
  setup_future_usage?: Stripe.Emptyable<Paypal.SetupFutureUsage>;
1720
+
1721
+ /**
1722
+ * 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.
1723
+ */
1724
+ subsellers?: Array<string>;
1701
1725
  }
1702
1726
 
1703
1727
  namespace Paypal {
@@ -1727,6 +1751,92 @@ declare module 'stripe' {
1727
1751
  type SetupFutureUsage = 'none' | 'off_session';
1728
1752
  }
1729
1753
 
1754
+ interface Payto {
1755
+ /**
1756
+ * Additional fields for Mandate creation
1757
+ */
1758
+ mandate_options?: Payto.MandateOptions;
1759
+
1760
+ /**
1761
+ * Indicates that you intend to make future payments with this PaymentIntent's payment method.
1762
+ *
1763
+ * 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.
1764
+ *
1765
+ * 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.
1766
+ *
1767
+ * 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).
1768
+ */
1769
+ setup_future_usage?: Payto.SetupFutureUsage;
1770
+ }
1771
+
1772
+ namespace Payto {
1773
+ interface MandateOptions {
1774
+ /**
1775
+ * Amount that will be collected. It is required when `amount_type` is `fixed`.
1776
+ */
1777
+ amount?: number;
1778
+
1779
+ /**
1780
+ * 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.
1781
+ */
1782
+ amount_type?: MandateOptions.AmountType;
1783
+
1784
+ /**
1785
+ * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.
1786
+ */
1787
+ end_date?: string;
1788
+
1789
+ /**
1790
+ * The periodicity at which payments will be collected.
1791
+ */
1792
+ payment_schedule?: MandateOptions.PaymentSchedule;
1793
+
1794
+ /**
1795
+ * 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.
1796
+ */
1797
+ payments_per_period?: number;
1798
+
1799
+ /**
1800
+ * The purpose for which payments are made. Defaults to retail.
1801
+ */
1802
+ purpose?: MandateOptions.Purpose;
1803
+
1804
+ /**
1805
+ * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.
1806
+ */
1807
+ start_date?: string;
1808
+ }
1809
+
1810
+ namespace MandateOptions {
1811
+ type AmountType = 'fixed' | 'maximum';
1812
+
1813
+ type PaymentSchedule =
1814
+ | 'adhoc'
1815
+ | 'annual'
1816
+ | 'daily'
1817
+ | 'fortnightly'
1818
+ | 'monthly'
1819
+ | 'quarterly'
1820
+ | 'semi_annual'
1821
+ | 'weekly';
1822
+
1823
+ type Purpose =
1824
+ | 'dependant_support'
1825
+ | 'government'
1826
+ | 'loan'
1827
+ | 'mortgage'
1828
+ | 'other'
1829
+ | 'pension'
1830
+ | 'personal'
1831
+ | 'retail'
1832
+ | 'salary'
1833
+ | 'tax'
1834
+ | 'utility';
1835
+ }
1836
+
1837
+ type SetupFutureUsage = 'none' | 'off_session';
1838
+ }
1839
+
1730
1840
  interface Pix {
1731
1841
  /**
1732
1842
  * The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
@@ -1831,7 +1941,11 @@ declare module 'stripe' {
1831
1941
  | 'payment_method'
1832
1942
  | 'transactions';
1833
1943
 
1834
- type Prefetch = 'balances' | 'ownership' | 'transactions';
1944
+ type Prefetch =
1945
+ | 'balances'
1946
+ | 'inferred_balances'
1947
+ | 'ownership'
1948
+ | 'transactions';
1835
1949
  }
1836
1950
 
1837
1951
  type SetupFutureUsage = 'none' | 'off_session' | 'on_session';
@@ -1895,6 +2009,7 @@ declare module 'stripe' {
1895
2009
  | 'p24'
1896
2010
  | 'paynow'
1897
2011
  | 'paypal'
2012
+ | 'payto'
1898
2013
  | 'pix'
1899
2014
  | 'promptpay'
1900
2015
  | 'revolut_pay'
@@ -1906,6 +2021,30 @@ declare module 'stripe' {
1906
2021
  | 'wechat_pay'
1907
2022
  | 'zip';
1908
2023
 
2024
+ interface Permissions {
2025
+ /**
2026
+ * Permissions for updating the Checkout Session.
2027
+ */
2028
+ update?: Permissions.Update;
2029
+ }
2030
+
2031
+ namespace Permissions {
2032
+ interface Update {
2033
+ /**
2034
+ * Determines which entity is allowed to update the shipping details.
2035
+ *
2036
+ * 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.
2037
+ *
2038
+ * 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.
2039
+ */
2040
+ shipping_details?: Update.ShippingDetails;
2041
+ }
2042
+
2043
+ namespace Update {
2044
+ type ShippingDetails = 'client_only' | 'server_only';
2045
+ }
2046
+ }
2047
+
1909
2048
  interface PhoneNumberCollection {
1910
2049
  /**
1911
2050
  * Set to `true` to enable phone number collection.
@@ -2478,7 +2617,7 @@ declare module 'stripe' {
2478
2617
  enabled: boolean;
2479
2618
  }
2480
2619
 
2481
- type UiMode = 'embedded' | 'hosted';
2620
+ type UiMode = 'custom' | 'embedded' | 'hosted';
2482
2621
  }
2483
2622
 
2484
2623
  interface SessionRetrieveParams {
@@ -2489,6 +2628,11 @@ declare module 'stripe' {
2489
2628
  }
2490
2629
 
2491
2630
  interface SessionUpdateParams {
2631
+ /**
2632
+ * Information about the customer collected within the Checkout Session.
2633
+ */
2634
+ collected_information?: SessionUpdateParams.CollectedInformation;
2635
+
2492
2636
  /**
2493
2637
  * Specifies which fields in the response should be expanded.
2494
2638
  */
@@ -2498,6 +2642,208 @@ declare module 'stripe' {
2498
2642
  * 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`.
2499
2643
  */
2500
2644
  metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
2645
+
2646
+ /**
2647
+ * The shipping rate options to apply to this Session. Up to a maximum of 5.
2648
+ */
2649
+ shipping_options?: Stripe.Emptyable<
2650
+ Array<SessionUpdateParams.ShippingOption>
2651
+ >;
2652
+ }
2653
+
2654
+ namespace SessionUpdateParams {
2655
+ interface CollectedInformation {
2656
+ /**
2657
+ * The shipping details to apply to this Session.
2658
+ */
2659
+ shipping_details?: CollectedInformation.ShippingDetails;
2660
+ }
2661
+
2662
+ namespace CollectedInformation {
2663
+ interface ShippingDetails {
2664
+ /**
2665
+ * The address of the customer
2666
+ */
2667
+ address: ShippingDetails.Address;
2668
+
2669
+ /**
2670
+ * The name of customer
2671
+ */
2672
+ name: string;
2673
+ }
2674
+
2675
+ namespace ShippingDetails {
2676
+ interface Address {
2677
+ /**
2678
+ * City, district, suburb, town, or village.
2679
+ */
2680
+ city?: string;
2681
+
2682
+ /**
2683
+ * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
2684
+ */
2685
+ country: string;
2686
+
2687
+ /**
2688
+ * Address line 1 (e.g., street, PO Box, or company name).
2689
+ */
2690
+ line1: string;
2691
+
2692
+ /**
2693
+ * Address line 2 (e.g., apartment, suite, unit, or building).
2694
+ */
2695
+ line2?: string;
2696
+
2697
+ /**
2698
+ * ZIP or postal code.
2699
+ */
2700
+ postal_code?: string;
2701
+
2702
+ /**
2703
+ * State, county, province, or region.
2704
+ */
2705
+ state?: string;
2706
+ }
2707
+ }
2708
+ }
2709
+
2710
+ interface ShippingOption {
2711
+ /**
2712
+ * The ID of the Shipping Rate to use for this shipping option.
2713
+ */
2714
+ shipping_rate?: string;
2715
+
2716
+ /**
2717
+ * Parameters to be passed to Shipping Rate creation for this shipping option.
2718
+ */
2719
+ shipping_rate_data?: ShippingOption.ShippingRateData;
2720
+ }
2721
+
2722
+ namespace ShippingOption {
2723
+ interface ShippingRateData {
2724
+ /**
2725
+ * The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
2726
+ */
2727
+ delivery_estimate?: ShippingRateData.DeliveryEstimate;
2728
+
2729
+ /**
2730
+ * The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
2731
+ */
2732
+ display_name: string;
2733
+
2734
+ /**
2735
+ * Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
2736
+ */
2737
+ fixed_amount?: ShippingRateData.FixedAmount;
2738
+
2739
+ /**
2740
+ * 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`.
2741
+ */
2742
+ metadata?: Stripe.MetadataParam;
2743
+
2744
+ /**
2745
+ * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
2746
+ */
2747
+ tax_behavior?: ShippingRateData.TaxBehavior;
2748
+
2749
+ /**
2750
+ * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
2751
+ */
2752
+ tax_code?: string;
2753
+
2754
+ /**
2755
+ * The type of calculation to use on the shipping rate.
2756
+ */
2757
+ type?: 'fixed_amount';
2758
+ }
2759
+
2760
+ namespace ShippingRateData {
2761
+ interface DeliveryEstimate {
2762
+ /**
2763
+ * The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
2764
+ */
2765
+ maximum?: DeliveryEstimate.Maximum;
2766
+
2767
+ /**
2768
+ * The lower bound of the estimated range. If empty, represents no lower bound.
2769
+ */
2770
+ minimum?: DeliveryEstimate.Minimum;
2771
+ }
2772
+
2773
+ namespace DeliveryEstimate {
2774
+ interface Maximum {
2775
+ /**
2776
+ * A unit of time.
2777
+ */
2778
+ unit: Maximum.Unit;
2779
+
2780
+ /**
2781
+ * Must be greater than 0.
2782
+ */
2783
+ value: number;
2784
+ }
2785
+
2786
+ namespace Maximum {
2787
+ type Unit = 'business_day' | 'day' | 'hour' | 'month' | 'week';
2788
+ }
2789
+
2790
+ interface Minimum {
2791
+ /**
2792
+ * A unit of time.
2793
+ */
2794
+ unit: Minimum.Unit;
2795
+
2796
+ /**
2797
+ * Must be greater than 0.
2798
+ */
2799
+ value: number;
2800
+ }
2801
+
2802
+ namespace Minimum {
2803
+ type Unit = 'business_day' | 'day' | 'hour' | 'month' | 'week';
2804
+ }
2805
+ }
2806
+
2807
+ interface FixedAmount {
2808
+ /**
2809
+ * A non-negative integer in cents representing how much to charge.
2810
+ */
2811
+ amount: number;
2812
+
2813
+ /**
2814
+ * 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).
2815
+ */
2816
+ currency: string;
2817
+
2818
+ /**
2819
+ * 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).
2820
+ */
2821
+ currency_options?: {
2822
+ [key: string]: FixedAmount.CurrencyOptions;
2823
+ };
2824
+ }
2825
+
2826
+ namespace FixedAmount {
2827
+ interface CurrencyOptions {
2828
+ /**
2829
+ * A non-negative integer in cents representing how much to charge.
2830
+ */
2831
+ amount: number;
2832
+
2833
+ /**
2834
+ * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
2835
+ */
2836
+ tax_behavior?: CurrencyOptions.TaxBehavior;
2837
+ }
2838
+
2839
+ namespace CurrencyOptions {
2840
+ type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
2841
+ }
2842
+ }
2843
+
2844
+ type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
2845
+ }
2846
+ }
2501
2847
  }
2502
2848
 
2503
2849
  interface SessionListParams extends PaginationParams {
@@ -196,6 +196,8 @@ declare module 'stripe' {
196
196
 
197
197
  link?: PaymentMethodPreview.Link;
198
198
 
199
+ mb_way?: PaymentMethodPreview.MbWay;
200
+
199
201
  mobilepay?: PaymentMethodPreview.Mobilepay;
200
202
 
201
203
  multibanco?: PaymentMethodPreview.Multibanco;
@@ -208,10 +210,14 @@ declare module 'stripe' {
208
210
 
209
211
  paypal?: PaymentMethodPreview.Paypal;
210
212
 
213
+ payto?: PaymentMethodPreview.Payto;
214
+
211
215
  pix?: PaymentMethodPreview.Pix;
212
216
 
213
217
  promptpay?: PaymentMethodPreview.Promptpay;
214
218
 
219
+ rechnung?: PaymentMethodPreview.Rechnung;
220
+
215
221
  revolut_pay?: PaymentMethodPreview.RevolutPay;
216
222
 
217
223
  sepa_debit?: PaymentMethodPreview.SepaDebit;
@@ -1213,6 +1219,8 @@ declare module 'stripe' {
1213
1219
  persistent_token?: string;
1214
1220
  }
1215
1221
 
1222
+ interface MbWay {}
1223
+
1216
1224
  interface Mobilepay {}
1217
1225
 
1218
1226
  interface Multibanco {}
@@ -1259,6 +1267,11 @@ declare module 'stripe' {
1259
1267
  interface Paynow {}
1260
1268
 
1261
1269
  interface Paypal {
1270
+ /**
1271
+ * Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same.
1272
+ */
1273
+ fingerprint?: string | null;
1274
+
1262
1275
  /**
1263
1276
  * Owner's email. Values are provided by PayPal directly
1264
1277
  * (if supported) at the time of authorization or settlement. They cannot be set or mutated.
@@ -1269,12 +1282,58 @@ declare module 'stripe' {
1269
1282
  * PayPal account PayerID. This identifier uniquely identifies the PayPal customer.
1270
1283
  */
1271
1284
  payer_id: string | null;
1285
+
1286
+ /**
1287
+ * Owner's verified email. Values are verified or provided by PayPal directly
1288
+ * (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1289
+ */
1290
+ verified_email?: string | null;
1291
+ }
1292
+
1293
+ interface Payto {
1294
+ /**
1295
+ * Bank-State-Branch number of the bank account.
1296
+ */
1297
+ bsb_number: string | null;
1298
+
1299
+ /**
1300
+ * Last four digits of the bank account number.
1301
+ */
1302
+ last4: string | null;
1303
+
1304
+ /**
1305
+ * The PayID alias for the bank account.
1306
+ */
1307
+ pay_id: string | null;
1272
1308
  }
1273
1309
 
1274
1310
  interface Pix {}
1275
1311
 
1276
1312
  interface Promptpay {}
1277
1313
 
1314
+ interface Rechnung {
1315
+ dob?: Rechnung.Dob;
1316
+ }
1317
+
1318
+ namespace Rechnung {
1319
+ interface Dob {
1320
+ /**
1321
+ * The day of birth, between 1 and 31.
1322
+ */
1323
+ day: number;
1324
+
1325
+ /**
1326
+ * The month of birth, between 1 and 12.
1327
+ */
1328
+ month: number;
1329
+
1330
+ /**
1331
+ * The four-digit year of birth.
1332
+ */
1333
+ year: number;
1334
+ }
1335
+ }
1336
+
1278
1337
  interface RevolutPay {}
1279
1338
 
1280
1339
  interface SepaDebit {
@@ -1358,14 +1417,17 @@ declare module 'stripe' {
1358
1417
  | 'klarna'
1359
1418
  | 'konbini'
1360
1419
  | 'link'
1420
+ | 'mb_way'
1361
1421
  | 'mobilepay'
1362
1422
  | 'multibanco'
1363
1423
  | 'oxxo'
1364
1424
  | 'p24'
1365
1425
  | 'paynow'
1366
1426
  | 'paypal'
1427
+ | 'payto'
1367
1428
  | 'pix'
1368
1429
  | 'promptpay'
1430
+ | 'rechnung'
1369
1431
  | 'revolut_pay'
1370
1432
  | 'sepa_debit'
1371
1433
  | 'sofort'
@@ -1381,6 +1443,11 @@ declare module 'stripe' {
1381
1443
  */
1382
1444
  account_holder_type: UsBankAccount.AccountHolderType | null;
1383
1445
 
1446
+ /**
1447
+ * Account number of the bank account.
1448
+ */
1449
+ account_number?: string | null;
1450
+
1384
1451
  /**
1385
1452
  * Account type: checkings or savings. Defaults to checking if omitted.
1386
1453
  */
@@ -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.