stripe 20.1.0 → 20.2.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) hide show
  1. package/CHANGELOG.md +1544 -47
  2. package/OPENAPI_VERSION +1 -1
  3. package/README.md +1 -0
  4. package/VERSION +1 -1
  5. package/cjs/Error.js +115 -1
  6. package/cjs/StripeEventNotificationHandler.js +118 -0
  7. package/cjs/apiVersion.js +2 -3
  8. package/cjs/resources/AccountNotices.js +21 -0
  9. package/cjs/resources/Billing/Analytics/MeterUsage.js +12 -0
  10. package/cjs/resources/Capital/FinancingOffers.js +21 -0
  11. package/cjs/resources/Capital/FinancingSummary.js +12 -0
  12. package/cjs/resources/Capital/FinancingTransactions.js +17 -0
  13. package/cjs/resources/ExternalAccounts.js +23 -0
  14. package/cjs/resources/FinancialConnections/Accounts.js +5 -0
  15. package/cjs/resources/FinancialConnections/Institutions.js +17 -0
  16. package/cjs/resources/FxQuotes.js +15 -0
  17. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
  18. package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
  19. package/cjs/resources/Issuing/FraudLiabilityDebits.js +17 -0
  20. package/cjs/resources/Mandates.js +5 -0
  21. package/cjs/resources/Margins.js +22 -0
  22. package/cjs/resources/Orders.js +24 -0
  23. package/cjs/resources/PaymentIntents.js +8 -0
  24. package/cjs/resources/Privacy/RedactionJobs.js +42 -0
  25. package/cjs/resources/Quotes.js +32 -0
  26. package/cjs/resources/Reserve/Holds.js +14 -0
  27. package/cjs/resources/Reserve/Plans.js +9 -0
  28. package/cjs/resources/Reserve/Releases.js +17 -0
  29. package/cjs/resources/SubscriptionSchedules.js +4 -0
  30. package/cjs/resources/Subscriptions.js +4 -0
  31. package/cjs/resources/Tax/Forms.js +20 -0
  32. package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
  33. package/cjs/resources/V2/Billing/BillSettings/Versions.js +17 -0
  34. package/cjs/resources/V2/Billing/BillSettings.js +27 -0
  35. package/cjs/resources/V2/Billing/Cadences.js +23 -0
  36. package/cjs/resources/V2/Billing/CollectionSettings/Versions.js +17 -0
  37. package/cjs/resources/V2/Billing/CollectionSettings.js +30 -0
  38. package/cjs/resources/V2/Billing/Profiles.js +19 -0
  39. package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +33 -0
  40. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +37 -0
  41. package/cjs/resources/V2/MoneyManagement/Adjustments.js +17 -0
  42. package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +29 -0
  43. package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +21 -0
  44. package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +21 -0
  45. package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +16 -0
  46. package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +25 -0
  47. package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +29 -0
  48. package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +25 -0
  49. package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +25 -0
  50. package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +12 -0
  51. package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +17 -0
  52. package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +17 -0
  53. package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +17 -0
  54. package/cjs/resources/V2/MoneyManagement/Transactions.js +17 -0
  55. package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +16 -0
  56. package/cjs/resources.js +98 -4
  57. package/cjs/stripe.core.js +5 -1
  58. package/esm/Error.js +100 -0
  59. package/esm/StripeEventNotificationHandler.js +114 -0
  60. package/esm/apiVersion.js +1 -2
  61. package/esm/resources/AccountNotices.js +18 -0
  62. package/esm/resources/Billing/Analytics/MeterUsage.js +9 -0
  63. package/esm/resources/Capital/FinancingOffers.js +18 -0
  64. package/esm/resources/Capital/FinancingSummary.js +9 -0
  65. package/esm/resources/Capital/FinancingTransactions.js +14 -0
  66. package/esm/resources/ExternalAccounts.js +20 -0
  67. package/esm/resources/FinancialConnections/Accounts.js +5 -0
  68. package/esm/resources/FinancialConnections/Institutions.js +14 -0
  69. package/esm/resources/FxQuotes.js +12 -0
  70. package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
  71. package/esm/resources/Issuing/DisputeSettlementDetails.js +14 -0
  72. package/esm/resources/Issuing/FraudLiabilityDebits.js +14 -0
  73. package/esm/resources/Mandates.js +5 -0
  74. package/esm/resources/Margins.js +19 -0
  75. package/esm/resources/Orders.js +21 -0
  76. package/esm/resources/PaymentIntents.js +8 -0
  77. package/esm/resources/Privacy/RedactionJobs.js +39 -0
  78. package/esm/resources/Quotes.js +32 -0
  79. package/esm/resources/Reserve/Holds.js +11 -0
  80. package/esm/resources/Reserve/Plans.js +6 -0
  81. package/esm/resources/Reserve/Releases.js +14 -0
  82. package/esm/resources/SubscriptionSchedules.js +4 -0
  83. package/esm/resources/Subscriptions.js +4 -0
  84. package/esm/resources/Tax/Forms.js +17 -0
  85. package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
  86. package/esm/resources/V2/Billing/BillSettings/Versions.js +14 -0
  87. package/esm/resources/V2/Billing/BillSettings.js +24 -0
  88. package/esm/resources/V2/Billing/Cadences.js +20 -0
  89. package/esm/resources/V2/Billing/CollectionSettings/Versions.js +14 -0
  90. package/esm/resources/V2/Billing/CollectionSettings.js +27 -0
  91. package/esm/resources/V2/Billing/Profiles.js +16 -0
  92. package/esm/resources/V2/Core/Vault/GbBankAccounts.js +30 -0
  93. package/esm/resources/V2/Core/Vault/UsBankAccounts.js +34 -0
  94. package/esm/resources/V2/MoneyManagement/Adjustments.js +14 -0
  95. package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +26 -0
  96. package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +18 -0
  97. package/esm/resources/V2/MoneyManagement/InboundTransfers.js +18 -0
  98. package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +13 -0
  99. package/esm/resources/V2/MoneyManagement/OutboundPayments.js +22 -0
  100. package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +26 -0
  101. package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +22 -0
  102. package/esm/resources/V2/MoneyManagement/PayoutMethods.js +22 -0
  103. package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +9 -0
  104. package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +14 -0
  105. package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +14 -0
  106. package/esm/resources/V2/MoneyManagement/TransactionEntries.js +14 -0
  107. package/esm/resources/V2/MoneyManagement/Transactions.js +14 -0
  108. package/esm/resources/V2/TestHelpers/FinancialAddresses.js +13 -0
  109. package/esm/resources.js +89 -0
  110. package/esm/stripe.core.js +5 -1
  111. package/package.json +1 -1
  112. package/types/AccountLinksResource.d.ts +5 -1
  113. package/types/AccountNotices.d.ts +113 -0
  114. package/types/AccountNoticesResource.d.ts +98 -0
  115. package/types/AccountSessions.d.ts +45 -0
  116. package/types/AccountSessionsResource.d.ts +264 -0
  117. package/types/Accounts.d.ts +225 -1
  118. package/types/AccountsResource.d.ts +562 -0
  119. package/types/BankAccounts.d.ts +2 -0
  120. package/types/Billing/AlertTriggereds.d.ts +1 -1
  121. package/types/Billing/Analytics/MeterUsage.d.ts +31 -0
  122. package/types/Billing/Analytics/MeterUsageResource.d.ts +689 -0
  123. package/types/Billing/Analytics/MeterUsageRows.d.ts +51 -0
  124. package/types/Capabilities.d.ts +2 -0
  125. package/types/Capital/FinancingOffers.d.ts +188 -0
  126. package/types/Capital/FinancingOffersResource.d.ts +97 -0
  127. package/types/Capital/FinancingSummary.d.ts +109 -0
  128. package/types/Capital/FinancingSummaryResource.d.ts +27 -0
  129. package/types/Capital/FinancingTransactions.d.ts +135 -0
  130. package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
  131. package/types/Cards.d.ts +5 -0
  132. package/types/Charges.d.ts +152 -0
  133. package/types/ChargesResource.d.ts +3855 -75
  134. package/types/Checkout/Sessions.d.ts +279 -2
  135. package/types/Checkout/SessionsResource.d.ts +362 -2
  136. package/types/ConfirmationTokens.d.ts +103 -0
  137. package/types/Coupons.d.ts +35 -0
  138. package/types/CouponsResource.d.ts +23 -0
  139. package/types/CreditNoteLineItems.d.ts +17 -0
  140. package/types/CustomerSessions.d.ts +41 -0
  141. package/types/CustomerSessionsResource.d.ts +41 -0
  142. package/types/CustomersResource.d.ts +7 -0
  143. package/types/Disputes.d.ts +40 -0
  144. package/types/DisputesResource.d.ts +11 -0
  145. package/types/Errors.d.ts +85 -0
  146. package/types/EventTypes.d.ts +630 -0
  147. package/types/Events.d.ts +96 -0
  148. package/types/ExternalAccountsResource.d.ts +304 -0
  149. package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
  150. package/types/FinancialConnections/Accounts.d.ts +34 -1
  151. package/types/FinancialConnections/AccountsResource.d.ts +35 -3
  152. package/types/FinancialConnections/Institutions.d.ts +98 -0
  153. package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
  154. package/types/FinancialConnections/Sessions.d.ts +49 -1
  155. package/types/FinancialConnections/SessionsResource.d.ts +38 -1
  156. package/types/FxQuotes.d.ts +155 -0
  157. package/types/FxQuotesResource.d.ts +130 -0
  158. package/types/InvoiceItems.d.ts +5 -0
  159. package/types/InvoiceItemsResource.d.ts +98 -0
  160. package/types/InvoiceLineItems.d.ts +45 -1
  161. package/types/Invoices.d.ts +198 -4
  162. package/types/InvoicesResource.d.ts +1606 -3
  163. package/types/Issuing/CardholdersResource.d.ts +2 -1
  164. package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
  165. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
  166. package/types/Issuing/DisputeSettlementDetails.d.ts +85 -0
  167. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
  168. package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
  169. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
  170. package/types/Issuing/Settlements.d.ts +113 -0
  171. package/types/Issuing/Transactions.d.ts +5 -0
  172. package/types/Issuing/TransactionsResource.d.ts +5 -0
  173. package/types/LineItems.d.ts +45 -1
  174. package/types/Mandates.d.ts +69 -1
  175. package/types/MandatesResource.d.ts +31 -0
  176. package/types/Margins.d.ts +56 -0
  177. package/types/MarginsResource.d.ts +114 -0
  178. package/types/Orders.d.ts +1163 -0
  179. package/types/OrdersResource.d.ts +5505 -0
  180. package/types/PaymentAttemptRecords.d.ts +117 -0
  181. package/types/PaymentIntents.d.ts +683 -3
  182. package/types/PaymentIntentsResource.d.ts +19095 -6508
  183. package/types/PaymentLinks.d.ts +5 -0
  184. package/types/PaymentLinksResource.d.ts +10 -0
  185. package/types/PaymentMethodConfigurations.d.ts +180 -0
  186. package/types/PaymentMethodConfigurationsResource.d.ts +250 -0
  187. package/types/PaymentMethods.d.ts +108 -0
  188. package/types/PaymentMethodsResource.d.ts +110 -0
  189. package/types/PaymentRecords.d.ts +117 -0
  190. package/types/Persons.d.ts +2 -0
  191. package/types/Prices.d.ts +22 -0
  192. package/types/PricesResource.d.ts +22 -0
  193. package/types/Privacy/RedactionJobValidationErrors.d.ts +60 -0
  194. package/types/Privacy/RedactionJobs.d.ts +111 -0
  195. package/types/Privacy/RedactionJobsResource.d.ts +230 -0
  196. package/types/QuoteLines.d.ts +634 -0
  197. package/types/QuotePreviewInvoices.d.ts +1821 -0
  198. package/types/QuotePreviewSubscriptionSchedules.d.ts +908 -0
  199. package/types/Quotes.d.ts +589 -1
  200. package/types/QuotesResource.d.ts +2567 -237
  201. package/types/Refunds.d.ts +14 -0
  202. package/types/Reserve/Holds.d.ts +104 -0
  203. package/types/Reserve/HoldsResource.d.ts +76 -0
  204. package/types/Reserve/Plans.d.ts +103 -0
  205. package/types/Reserve/PlansResource.d.ts +29 -0
  206. package/types/Reserve/Releases.d.ts +105 -0
  207. package/types/Reserve/ReleasesResource.d.ts +60 -0
  208. package/types/SetupAttempts.d.ts +42 -1
  209. package/types/SetupIntents.d.ts +138 -2
  210. package/types/SetupIntentsResource.d.ts +629 -3
  211. package/types/Sources.d.ts +29 -0
  212. package/types/SubscriptionItems.d.ts +26 -0
  213. package/types/SubscriptionItemsResource.d.ts +109 -0
  214. package/types/SubscriptionSchedules.d.ts +200 -0
  215. package/types/SubscriptionSchedulesResource.d.ts +1230 -12
  216. package/types/Subscriptions.d.ts +257 -1
  217. package/types/SubscriptionsResource.d.ts +726 -2
  218. package/types/Tax/Forms.d.ts +220 -0
  219. package/types/Tax/FormsResource.d.ts +107 -0
  220. package/types/Terminal/Configurations.d.ts +9 -0
  221. package/types/Terminal/ConfigurationsResource.d.ts +28 -0
  222. package/types/Terminal/ReaderCollectedData.d.ts +51 -0
  223. package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
  224. package/types/Terminal/Readers.d.ts +20 -0
  225. package/types/TestHelpers/ConfirmationTokensResource.d.ts +103 -0
  226. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
  227. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
  228. package/types/Transfers.d.ts +5 -0
  229. package/types/TransfersResource.d.ts +5 -0
  230. package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
  231. package/types/Treasury/FinancialAccounts.d.ts +5 -0
  232. package/types/Treasury/FinancialAccountsResource.d.ts +37 -0
  233. package/types/Treasury/OutboundTransfers.d.ts +26 -0
  234. package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
  235. package/types/Treasury/ReceivedCredits.d.ts +26 -0
  236. package/types/Treasury/ReceivedDebits.d.ts +31 -0
  237. package/types/V2/Billing/BillSettingVersions.d.ts +97 -0
  238. package/types/V2/Billing/BillSettings/VersionsResource.d.ts +58 -0
  239. package/types/V2/Billing/BillSettings.d.ts +120 -0
  240. package/types/V2/Billing/BillSettingsResource.d.ts +241 -0
  241. package/types/V2/Billing/Cadences.d.ts +690 -0
  242. package/types/V2/Billing/CadencesResource.d.ts +487 -0
  243. package/types/V2/Billing/CollectionSettingVersions.d.ts +318 -0
  244. package/types/V2/Billing/CollectionSettings/VersionsResource.d.ts +62 -0
  245. package/types/V2/Billing/CollectionSettings.d.ts +341 -0
  246. package/types/V2/Billing/CollectionSettingsResource.d.ts +683 -0
  247. package/types/V2/Billing/Profiles.d.ts +70 -0
  248. package/types/V2/Billing/ProfilesResource.d.ts +150 -0
  249. package/types/V2/Core/AccountLinks.d.ts +10 -2
  250. package/types/V2/Core/AccountLinksResource.d.ts +10 -2
  251. package/types/V2/Core/AccountTokensResource.d.ts +12 -0
  252. package/types/V2/Core/Accounts.d.ts +999 -84
  253. package/types/V2/Core/AccountsResource.d.ts +523 -2
  254. package/types/V2/Core/EventTypes.d.ts +1564 -9
  255. package/types/V2/Core/Vault/GbBankAccounts.d.ts +160 -0
  256. package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +194 -0
  257. package/types/V2/Core/Vault/UsBankAccounts.d.ts +121 -0
  258. package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +198 -0
  259. package/types/V2/EventMisc.d.ts +37 -0
  260. package/types/V2/FinancialAddressCreditSimulations.d.ts +27 -0
  261. package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +46 -0
  262. package/types/V2/MoneyManagement/Adjustments.d.ts +122 -0
  263. package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +83 -0
  264. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +186 -0
  265. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +172 -0
  266. package/types/V2/MoneyManagement/FinancialAddresses.d.ts +175 -0
  267. package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +109 -0
  268. package/types/V2/MoneyManagement/InboundTransfers.d.ts +250 -0
  269. package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +156 -0
  270. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +222 -0
  271. package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +127 -0
  272. package/types/V2/MoneyManagement/OutboundPayments.d.ts +318 -0
  273. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +254 -0
  274. package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +97 -0
  275. package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +298 -0
  276. package/types/V2/MoneyManagement/OutboundTransfers.d.ts +291 -0
  277. package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +220 -0
  278. package/types/V2/MoneyManagement/PayoutMethods.d.ts +165 -0
  279. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpec.d.ts +93 -0
  280. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +41 -0
  281. package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +115 -0
  282. package/types/V2/MoneyManagement/ReceivedCredits.d.ts +323 -0
  283. package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +78 -0
  284. package/types/V2/MoneyManagement/ReceivedDebits.d.ts +188 -0
  285. package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +48 -0
  286. package/types/V2/MoneyManagement/TransactionEntries.d.ts +200 -0
  287. package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +82 -0
  288. package/types/V2/MoneyManagement/Transactions.d.ts +227 -0
  289. package/types/V2/MoneyManagement/TransactionsResource.d.ts +83 -0
  290. package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +80 -0
  291. package/types/WebhookEndpointsResource.d.ts +76 -0
  292. package/types/apiVersion.d.ts +1 -2
  293. package/types/index.d.ts +160 -0
  294. package/types/lib.d.ts +10 -0
  295. package/types/test/typescriptTest.ts +27 -0
@@ -735,12 +735,55 @@ declare module 'stripe' {
735
735
  */
736
736
  coupon?: string;
737
737
 
738
+ /**
739
+ * Data used to generate a new [Coupon](https://docs.stripe.com/api/coupon) object inline. One of `coupon` or `coupon_data` is required when updating discounts.
740
+ */
741
+ coupon_data?: Discount.CouponData;
742
+
738
743
  /**
739
744
  * The ID of a promotion code to apply to this Session.
740
745
  */
741
746
  promotion_code?: string;
742
747
  }
743
748
 
749
+ namespace Discount {
750
+ interface CouponData {
751
+ /**
752
+ * A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).
753
+ */
754
+ amount_off?: number;
755
+
756
+ /**
757
+ * Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed).
758
+ */
759
+ currency?: string;
760
+
761
+ /**
762
+ * Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`.
763
+ */
764
+ duration?: CouponData.Duration;
765
+
766
+ /**
767
+ * Set of [key-value pairs](https://docs.stripe.com/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`.
768
+ */
769
+ metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
770
+
771
+ /**
772
+ * Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.
773
+ */
774
+ name?: string;
775
+
776
+ /**
777
+ * A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed).
778
+ */
779
+ percent_off?: number;
780
+ }
781
+
782
+ namespace CouponData {
783
+ type Duration = 'forever' | 'once' | 'repeating';
784
+ }
785
+ }
786
+
744
787
  type ExcludedPaymentMethodType =
745
788
  | 'acss_debit'
746
789
  | 'affirm'
@@ -761,6 +804,7 @@ declare module 'stripe' {
761
804
  | 'eps'
762
805
  | 'fpx'
763
806
  | 'giropay'
807
+ | 'gopay'
764
808
  | 'grabpay'
765
809
  | 'ideal'
766
810
  | 'kakao_pay'
@@ -778,13 +822,17 @@ declare module 'stripe' {
778
822
  | 'payco'
779
823
  | 'paynow'
780
824
  | 'paypal'
825
+ | 'paypay'
781
826
  | 'payto'
782
827
  | 'pix'
783
828
  | 'promptpay'
829
+ | 'qris'
830
+ | 'rechnung'
784
831
  | 'revolut_pay'
785
832
  | 'samsung_pay'
786
833
  | 'satispay'
787
834
  | 'sepa_debit'
835
+ | 'shopeepay'
788
836
  | 'sofort'
789
837
  | 'swish'
790
838
  | 'twint'
@@ -1793,6 +1841,11 @@ declare module 'stripe' {
1793
1841
  */
1794
1842
  installments?: Card.Installments;
1795
1843
 
1844
+ /**
1845
+ * Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this CheckoutSession.
1846
+ */
1847
+ request_decremental_authorization?: Card.RequestDecrementalAuthorization;
1848
+
1796
1849
  /**
1797
1850
  * Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this CheckoutSession.
1798
1851
  */
@@ -1854,6 +1907,8 @@ declare module 'stripe' {
1854
1907
  enabled?: boolean;
1855
1908
  }
1856
1909
 
1910
+ type RequestDecrementalAuthorization = 'if_available' | 'never';
1911
+
1857
1912
  type RequestExtendedAuthorization = 'if_available' | 'never';
1858
1913
 
1859
1914
  type RequestIncrementalAuthorization = 'if_available' | 'never';
@@ -2336,6 +2391,11 @@ declare module 'stripe' {
2336
2391
  */
2337
2392
  reference?: string;
2338
2393
 
2394
+ /**
2395
+ * 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.
2396
+ */
2397
+ reference_id?: string;
2398
+
2339
2399
  /**
2340
2400
  * The risk correlation ID for an on-session payment using a saved PayPal payment method.
2341
2401
  */
@@ -2353,6 +2413,11 @@ declare module 'stripe' {
2353
2413
  * 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`.
2354
2414
  */
2355
2415
  setup_future_usage?: Stripe.Emptyable<Paypal.SetupFutureUsage>;
2416
+
2417
+ /**
2418
+ * 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.
2419
+ */
2420
+ subsellers?: Array<string>;
2356
2421
  }
2357
2422
 
2358
2423
  namespace Paypal {
@@ -2481,6 +2546,11 @@ declare module 'stripe' {
2481
2546
  */
2482
2547
  expires_after_seconds?: number;
2483
2548
 
2549
+ /**
2550
+ * Additional fields for mandate creation.
2551
+ */
2552
+ mandate_options?: Pix.MandateOptions;
2553
+
2484
2554
  /**
2485
2555
  * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2486
2556
  *
@@ -2490,11 +2560,68 @@ declare module 'stripe' {
2490
2560
  *
2491
2561
  * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
2492
2562
  */
2493
- setup_future_usage?: 'none';
2563
+ setup_future_usage?: Pix.SetupFutureUsage;
2494
2564
  }
2495
2565
 
2496
2566
  namespace Pix {
2497
2567
  type AmountIncludesIof = 'always' | 'never';
2568
+
2569
+ interface MandateOptions {
2570
+ /**
2571
+ * Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
2572
+ */
2573
+ amount?: number;
2574
+
2575
+ /**
2576
+ * Determines if the amount includes the IOF tax. Defaults to `never`.
2577
+ */
2578
+ amount_includes_iof?: MandateOptions.AmountIncludesIof;
2579
+
2580
+ /**
2581
+ * Type of amount. Defaults to `maximum`.
2582
+ */
2583
+ amount_type?: MandateOptions.AmountType;
2584
+
2585
+ /**
2586
+ * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
2587
+ */
2588
+ currency?: string;
2589
+
2590
+ /**
2591
+ * Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
2592
+ */
2593
+ end_date?: string;
2594
+
2595
+ /**
2596
+ * Schedule at which the future payments will be charged. Defaults to `weekly`.
2597
+ */
2598
+ payment_schedule?: MandateOptions.PaymentSchedule;
2599
+
2600
+ /**
2601
+ * Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
2602
+ */
2603
+ reference?: string;
2604
+
2605
+ /**
2606
+ * Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
2607
+ */
2608
+ start_date?: string;
2609
+ }
2610
+
2611
+ namespace MandateOptions {
2612
+ type AmountIncludesIof = 'always' | 'never';
2613
+
2614
+ type AmountType = 'fixed' | 'maximum';
2615
+
2616
+ type PaymentSchedule =
2617
+ | 'halfyearly'
2618
+ | 'monthly'
2619
+ | 'quarterly'
2620
+ | 'weekly'
2621
+ | 'yearly';
2622
+ }
2623
+
2624
+ type SetupFutureUsage = 'none' | 'off_session';
2498
2625
  }
2499
2626
 
2500
2627
  interface RevolutPay {
@@ -2648,7 +2775,11 @@ declare module 'stripe' {
2648
2775
  | 'payment_method'
2649
2776
  | 'transactions';
2650
2777
 
2651
- type Prefetch = 'balances' | 'ownership' | 'transactions';
2778
+ type Prefetch =
2779
+ | 'balances'
2780
+ | 'inferred_balances'
2781
+ | 'ownership'
2782
+ | 'transactions';
2652
2783
  }
2653
2784
 
2654
2785
  type SetupFutureUsage = 'none' | 'off_session' | 'on_session';
@@ -2704,6 +2835,7 @@ declare module 'stripe' {
2704
2835
  | 'eps'
2705
2836
  | 'fpx'
2706
2837
  | 'giropay'
2838
+ | 'gopay'
2707
2839
  | 'grabpay'
2708
2840
  | 'ideal'
2709
2841
  | 'kakao_pay'
@@ -2722,13 +2854,17 @@ declare module 'stripe' {
2722
2854
  | 'payco'
2723
2855
  | 'paynow'
2724
2856
  | 'paypal'
2857
+ | 'paypay'
2725
2858
  | 'payto'
2726
2859
  | 'pix'
2727
2860
  | 'promptpay'
2861
+ | 'qris'
2862
+ | 'rechnung'
2728
2863
  | 'revolut_pay'
2729
2864
  | 'samsung_pay'
2730
2865
  | 'satispay'
2731
2866
  | 'sepa_debit'
2867
+ | 'shopeepay'
2732
2868
  | 'sofort'
2733
2869
  | 'swish'
2734
2870
  | 'twint'
@@ -2737,6 +2873,27 @@ declare module 'stripe' {
2737
2873
  | 'zip';
2738
2874
 
2739
2875
  interface Permissions {
2876
+ /**
2877
+ * Permissions for updating the Checkout Session.
2878
+ */
2879
+ update?: Permissions.Update;
2880
+
2881
+ /**
2882
+ * Determines which entity is allowed to update the discounts (coupons or promotion codes) that apply to this session.
2883
+ *
2884
+ * Default is `client_only`. Stripe Checkout client will automatically handle discount updates. If set to `server_only`, only your server is allowed to update discounts.
2885
+ */
2886
+ update_discounts?: Permissions.UpdateDiscounts;
2887
+
2888
+ /**
2889
+ * Determines which entity is allowed to update the line items.
2890
+ *
2891
+ * 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.
2892
+ *
2893
+ * 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.
2894
+ */
2895
+ update_line_items?: Permissions.UpdateLineItems;
2896
+
2740
2897
  /**
2741
2898
  * Determines which entity is allowed to update the shipping details.
2742
2899
  *
@@ -2748,6 +2905,36 @@ declare module 'stripe' {
2748
2905
  }
2749
2906
 
2750
2907
  namespace Permissions {
2908
+ interface Update {
2909
+ /**
2910
+ * Determines which entity is allowed to update the line items.
2911
+ *
2912
+ * 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.
2913
+ *
2914
+ * 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.
2915
+ */
2916
+ line_items?: Update.LineItems;
2917
+
2918
+ /**
2919
+ * Determines which entity is allowed to update the shipping details.
2920
+ *
2921
+ * 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.
2922
+ *
2923
+ * 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.
2924
+ */
2925
+ shipping_details?: Update.ShippingDetails;
2926
+ }
2927
+
2928
+ namespace Update {
2929
+ type LineItems = 'client_only' | 'server_only';
2930
+
2931
+ type ShippingDetails = 'client_only' | 'server_only';
2932
+ }
2933
+
2934
+ type UpdateDiscounts = 'client_only' | 'server_only';
2935
+
2936
+ type UpdateLineItems = 'client_only' | 'server_only';
2937
+
2751
2938
  type UpdateShippingDetails = 'client_only' | 'server_only';
2752
2939
  }
2753
2940
 
@@ -3402,16 +3589,31 @@ declare module 'stripe' {
3402
3589
  }
3403
3590
 
3404
3591
  interface SessionUpdateParams {
3592
+ /**
3593
+ * Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.
3594
+ */
3595
+ automatic_tax?: SessionUpdateParams.AutomaticTax;
3596
+
3405
3597
  /**
3406
3598
  * Information about the customer collected within the Checkout Session. Can only be set when updating `embedded` or `custom` sessions.
3407
3599
  */
3408
3600
  collected_information?: SessionUpdateParams.CollectedInformation;
3409
3601
 
3602
+ /**
3603
+ * List of coupons and promotion codes attached to the Checkout Session.
3604
+ */
3605
+ discounts?: Stripe.Emptyable<Array<SessionUpdateParams.Discount>>;
3606
+
3410
3607
  /**
3411
3608
  * Specifies which fields in the response should be expanded.
3412
3609
  */
3413
3610
  expand?: Array<string>;
3414
3611
 
3612
+ /**
3613
+ * Generate a post-purchase Invoice for one-time payments.
3614
+ */
3615
+ invoice_creation?: SessionUpdateParams.InvoiceCreation;
3616
+
3415
3617
  /**
3416
3618
  * A list of items the customer is purchasing.
3417
3619
  *
@@ -3440,9 +3642,39 @@ declare module 'stripe' {
3440
3642
  shipping_options?: Stripe.Emptyable<
3441
3643
  Array<SessionUpdateParams.ShippingOption>
3442
3644
  >;
3645
+
3646
+ /**
3647
+ * A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.
3648
+ */
3649
+ subscription_data?: SessionUpdateParams.SubscriptionData;
3443
3650
  }
3444
3651
 
3445
3652
  namespace SessionUpdateParams {
3653
+ interface AutomaticTax {
3654
+ /**
3655
+ * The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
3656
+ */
3657
+ liability?: AutomaticTax.Liability;
3658
+ }
3659
+
3660
+ namespace AutomaticTax {
3661
+ interface Liability {
3662
+ /**
3663
+ * The connected account being referenced when `type` is `account`.
3664
+ */
3665
+ account?: string;
3666
+
3667
+ /**
3668
+ * Type of the account referenced in the request.
3669
+ */
3670
+ type: Liability.Type;
3671
+ }
3672
+
3673
+ namespace Liability {
3674
+ type Type = 'account' | 'self';
3675
+ }
3676
+ }
3677
+
3446
3678
  interface CollectedInformation {
3447
3679
  /**
3448
3680
  * The shipping details to apply to this Session.
@@ -3498,6 +3730,90 @@ declare module 'stripe' {
3498
3730
  }
3499
3731
  }
3500
3732
 
3733
+ interface Discount {
3734
+ /**
3735
+ * The ID of the [Coupon](https://docs.stripe.com/api/coupons) to apply to this Session. One of `coupon` or `coupon_data` is required when updating discounts.
3736
+ */
3737
+ coupon?: string;
3738
+
3739
+ /**
3740
+ * Data used to generate a new [Coupon](https://docs.stripe.com/api/coupon) object inline. One of `coupon` or `coupon_data` is required when updating discounts.
3741
+ */
3742
+ coupon_data?: Discount.CouponData;
3743
+ }
3744
+
3745
+ namespace Discount {
3746
+ interface CouponData {
3747
+ /**
3748
+ * A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).
3749
+ */
3750
+ amount_off?: number;
3751
+
3752
+ /**
3753
+ * Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed).
3754
+ */
3755
+ currency?: string;
3756
+
3757
+ /**
3758
+ * Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`.
3759
+ */
3760
+ duration?: CouponData.Duration;
3761
+
3762
+ /**
3763
+ * Set of [key-value pairs](https://docs.stripe.com/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`.
3764
+ */
3765
+ metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
3766
+
3767
+ /**
3768
+ * Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.
3769
+ */
3770
+ name?: string;
3771
+
3772
+ /**
3773
+ * A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed).
3774
+ */
3775
+ percent_off?: number;
3776
+ }
3777
+
3778
+ namespace CouponData {
3779
+ type Duration = 'forever' | 'once' | 'repeating';
3780
+ }
3781
+ }
3782
+
3783
+ interface InvoiceCreation {
3784
+ /**
3785
+ * Parameters passed when creating invoices for payment-mode Checkout Sessions.
3786
+ */
3787
+ invoice_data?: InvoiceCreation.InvoiceData;
3788
+ }
3789
+
3790
+ namespace InvoiceCreation {
3791
+ interface InvoiceData {
3792
+ /**
3793
+ * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
3794
+ */
3795
+ issuer?: InvoiceData.Issuer;
3796
+ }
3797
+
3798
+ namespace InvoiceData {
3799
+ interface Issuer {
3800
+ /**
3801
+ * The connected account being referenced when `type` is `account`.
3802
+ */
3803
+ account?: string;
3804
+
3805
+ /**
3806
+ * Type of the account referenced in the request.
3807
+ */
3808
+ type: Issuer.Type;
3809
+ }
3810
+
3811
+ namespace Issuer {
3812
+ type Type = 'account' | 'self';
3813
+ }
3814
+ }
3815
+ }
3816
+
3501
3817
  interface LineItem {
3502
3818
  /**
3503
3819
  * When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout.
@@ -3780,6 +4096,50 @@ declare module 'stripe' {
3780
4096
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
3781
4097
  }
3782
4098
  }
4099
+
4100
+ interface SubscriptionData {
4101
+ /**
4102
+ * All invoices will be billed using the specified settings.
4103
+ */
4104
+ invoice_settings?: SubscriptionData.InvoiceSettings;
4105
+
4106
+ /**
4107
+ * Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future.
4108
+ */
4109
+ trial_end?: number;
4110
+
4111
+ /**
4112
+ * Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
4113
+ */
4114
+ trial_period_days?: Stripe.Emptyable<number>;
4115
+ }
4116
+
4117
+ namespace SubscriptionData {
4118
+ interface InvoiceSettings {
4119
+ /**
4120
+ * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
4121
+ */
4122
+ issuer?: InvoiceSettings.Issuer;
4123
+ }
4124
+
4125
+ namespace InvoiceSettings {
4126
+ interface Issuer {
4127
+ /**
4128
+ * The connected account being referenced when `type` is `account`.
4129
+ */
4130
+ account?: string;
4131
+
4132
+ /**
4133
+ * Type of the account referenced in the request.
4134
+ */
4135
+ type: Issuer.Type;
4136
+ }
4137
+
4138
+ namespace Issuer {
4139
+ type Type = 'account' | 'self';
4140
+ }
4141
+ }
4142
+ }
3783
4143
  }
3784
4144
 
3785
4145
  interface SessionListParams extends PaginationParams {