stripe 18.1.0 → 18.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 (301) hide show
  1. package/CHANGELOG.md +1220 -140
  2. package/README.md +1 -0
  3. package/VERSION +1 -1
  4. package/cjs/Error.js +91 -1
  5. package/cjs/apiVersion.js +1 -1
  6. package/cjs/resources/AccountNotices.js +21 -0
  7. package/cjs/resources/BalanceSettings.js +10 -0
  8. package/cjs/resources/Capital/FinancingOffers.js +21 -0
  9. package/cjs/resources/Capital/FinancingSummary.js +12 -0
  10. package/cjs/resources/Capital/FinancingTransactions.js +17 -0
  11. package/cjs/resources/ExternalAccounts.js +23 -0
  12. package/cjs/resources/FinancialConnections/Accounts.js +5 -0
  13. package/cjs/resources/FinancialConnections/Institutions.js +17 -0
  14. package/cjs/resources/FxQuotes.js +15 -0
  15. package/cjs/resources/GiftCards/Cards.js +23 -0
  16. package/cjs/resources/GiftCards/Transactions.js +33 -0
  17. package/cjs/resources/Invoices.js +4 -0
  18. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
  19. package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
  20. package/cjs/resources/Issuing/FraudLiabilityDebits.js +17 -0
  21. package/cjs/resources/Margins.js +22 -0
  22. package/cjs/resources/Orders.js +24 -0
  23. package/cjs/resources/{InvoicePayments.js → PaymentAttemptRecords.js} +4 -4
  24. package/cjs/resources/PaymentIntents.js +13 -0
  25. package/cjs/resources/PaymentRecords.js +29 -0
  26. package/cjs/resources/Privacy/RedactionJobs.js +42 -0
  27. package/cjs/resources/Quotes.js +32 -0
  28. package/cjs/resources/SubscriptionSchedules.js +4 -0
  29. package/cjs/resources/Tax/Associations.js +9 -0
  30. package/cjs/resources/Tax/Forms.js +20 -0
  31. package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
  32. package/cjs/resources/Terminal/Readers.js +12 -0
  33. package/cjs/resources/TestHelpers/Terminal/Readers.js +8 -0
  34. package/cjs/resources/V2/Core/AccountLinks.js +9 -0
  35. package/cjs/resources/V2/Core/Accounts/Persons.js +29 -0
  36. package/cjs/resources/V2/Core/Accounts.js +25 -0
  37. package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +28 -0
  38. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +24 -0
  39. package/cjs/resources/V2/MoneyManagement/Adjustments.js +17 -0
  40. package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +17 -0
  41. package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +21 -0
  42. package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +21 -0
  43. package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +16 -0
  44. package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +25 -0
  45. package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +29 -0
  46. package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +25 -0
  47. package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +25 -0
  48. package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +12 -0
  49. package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +17 -0
  50. package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +17 -0
  51. package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +17 -0
  52. package/cjs/resources/V2/MoneyManagement/Transactions.js +17 -0
  53. package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +16 -0
  54. package/cjs/resources.js +108 -18
  55. package/cjs/stripe.core.js +1 -1
  56. package/esm/Error.js +79 -0
  57. package/esm/apiVersion.js +1 -1
  58. package/esm/resources/AccountNotices.js +18 -0
  59. package/esm/resources/BalanceSettings.js +7 -0
  60. package/esm/resources/Capital/FinancingOffers.js +18 -0
  61. package/esm/resources/Capital/FinancingSummary.js +9 -0
  62. package/esm/resources/Capital/FinancingTransactions.js +14 -0
  63. package/esm/resources/ExternalAccounts.js +20 -0
  64. package/esm/resources/FinancialConnections/Accounts.js +5 -0
  65. package/esm/resources/FinancialConnections/Institutions.js +14 -0
  66. package/esm/resources/FxQuotes.js +12 -0
  67. package/esm/resources/GiftCards/Cards.js +20 -0
  68. package/esm/resources/GiftCards/Transactions.js +30 -0
  69. package/esm/resources/Invoices.js +4 -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/Margins.js +19 -0
  74. package/esm/resources/Orders.js +21 -0
  75. package/esm/resources/{InvoicePayments.js → PaymentAttemptRecords.js} +3 -3
  76. package/esm/resources/PaymentIntents.js +13 -0
  77. package/esm/resources/PaymentRecords.js +26 -0
  78. package/esm/resources/Privacy/RedactionJobs.js +39 -0
  79. package/esm/resources/Quotes.js +32 -0
  80. package/esm/resources/SubscriptionSchedules.js +4 -0
  81. package/esm/resources/Tax/Associations.js +6 -0
  82. package/esm/resources/Tax/Forms.js +17 -0
  83. package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
  84. package/esm/resources/Terminal/Readers.js +12 -0
  85. package/esm/resources/TestHelpers/Terminal/Readers.js +8 -0
  86. package/esm/resources/V2/Core/AccountLinks.js +6 -0
  87. package/esm/resources/V2/Core/Accounts/Persons.js +26 -0
  88. package/esm/resources/V2/Core/Accounts.js +22 -0
  89. package/esm/resources/V2/Core/Vault/GbBankAccounts.js +25 -0
  90. package/esm/resources/V2/Core/Vault/UsBankAccounts.js +21 -0
  91. package/esm/resources/V2/MoneyManagement/Adjustments.js +14 -0
  92. package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +14 -0
  93. package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +18 -0
  94. package/esm/resources/V2/MoneyManagement/InboundTransfers.js +18 -0
  95. package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +13 -0
  96. package/esm/resources/V2/MoneyManagement/OutboundPayments.js +22 -0
  97. package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +26 -0
  98. package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +22 -0
  99. package/esm/resources/V2/MoneyManagement/PayoutMethods.js +22 -0
  100. package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +9 -0
  101. package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +14 -0
  102. package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +14 -0
  103. package/esm/resources/V2/MoneyManagement/TransactionEntries.js +14 -0
  104. package/esm/resources/V2/MoneyManagement/Transactions.js +14 -0
  105. package/esm/resources/V2/TestHelpers/FinancialAddresses.js +13 -0
  106. package/esm/resources.js +84 -1
  107. package/esm/stripe.core.js +1 -1
  108. package/package.json +1 -1
  109. package/types/AccountLinksResource.d.ts +5 -1
  110. package/types/AccountNotices.d.ts +113 -0
  111. package/types/AccountNoticesResource.d.ts +98 -0
  112. package/types/AccountSessions.d.ts +45 -0
  113. package/types/AccountSessionsResource.d.ts +300 -0
  114. package/types/Accounts.d.ts +212 -1
  115. package/types/AccountsResource.d.ts +544 -0
  116. package/types/BalanceSettings.d.ts +89 -0
  117. package/types/BalanceSettingsResource.d.ts +108 -0
  118. package/types/Billing/CreditBalanceSummary.d.ts +5 -0
  119. package/types/Billing/CreditBalanceSummaryResource.d.ts +8 -3
  120. package/types/Billing/CreditBalanceTransactionsResource.d.ts +12 -4
  121. package/types/Billing/CreditGrants.d.ts +5 -0
  122. package/types/Billing/CreditGrantsResource.d.ts +11 -1
  123. package/types/Billing/MeterErrorReports.d.ts +106 -0
  124. package/types/BillingPortal/Sessions.d.ts +5 -0
  125. package/types/BillingPortal/SessionsResource.d.ts +12 -4
  126. package/types/Capital/FinancingOffers.d.ts +188 -0
  127. package/types/Capital/FinancingOffersResource.d.ts +97 -0
  128. package/types/Capital/FinancingSummary.d.ts +106 -0
  129. package/types/Capital/FinancingSummaryResource.d.ts +27 -0
  130. package/types/Capital/FinancingTransactions.d.ts +135 -0
  131. package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
  132. package/types/Cards.d.ts +5 -0
  133. package/types/CashBalances.d.ts +5 -0
  134. package/types/Charges.d.ts +166 -0
  135. package/types/ChargesResource.d.ts +1314 -0
  136. package/types/Checkout/Sessions.d.ts +315 -2
  137. package/types/Checkout/SessionsResource.d.ts +340 -1
  138. package/types/ConfirmationTokens.d.ts +125 -0
  139. package/types/Coupons.d.ts +33 -0
  140. package/types/CouponsResource.d.ts +21 -0
  141. package/types/CreditNoteLineItems.d.ts +17 -0
  142. package/types/CreditNotes.d.ts +9 -0
  143. package/types/CreditNotesResource.d.ts +5 -0
  144. package/types/CustomerBalanceTransactions.d.ts +2 -0
  145. package/types/CustomerCashBalanceTransactions.d.ts +2 -0
  146. package/types/CustomerSessions.d.ts +5 -0
  147. package/types/CustomerSessionsResource.d.ts +6 -1
  148. package/types/Customers.d.ts +2 -0
  149. package/types/CustomersResource.d.ts +8 -0
  150. package/types/Discounts.d.ts +10 -0
  151. package/types/Errors.d.ts +69 -2
  152. package/types/EventTypes.d.ts +698 -0
  153. package/types/Events.d.ts +99 -0
  154. package/types/ExternalAccountsResource.d.ts +304 -0
  155. package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
  156. package/types/FinancialConnections/Accounts.d.ts +31 -1
  157. package/types/FinancialConnections/AccountsResource.d.ts +40 -3
  158. package/types/FinancialConnections/Institutions.d.ts +93 -0
  159. package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
  160. package/types/FinancialConnections/Sessions.d.ts +51 -1
  161. package/types/FinancialConnections/SessionsResource.d.ts +43 -1
  162. package/types/FxQuotes.d.ts +153 -0
  163. package/types/FxQuotesResource.d.ts +130 -0
  164. package/types/GiftCards/Cards.d.ts +118 -0
  165. package/types/GiftCards/CardsResource.d.ts +159 -0
  166. package/types/GiftCards/Transactions.d.ts +129 -0
  167. package/types/GiftCards/TransactionsResource.d.ts +201 -0
  168. package/types/Identity/VerificationSessions.d.ts +5 -0
  169. package/types/Identity/VerificationSessionsResource.d.ts +7 -0
  170. package/types/InvoiceItems.d.ts +10 -0
  171. package/types/InvoiceItemsResource.d.ts +117 -6
  172. package/types/InvoiceLineItems.d.ts +45 -1
  173. package/types/InvoicePayments.d.ts +5 -0
  174. package/types/Invoices.d.ts +136 -3
  175. package/types/InvoicesResource.d.ts +1483 -3
  176. package/types/Issuing/CardholdersResource.d.ts +2 -1
  177. package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
  178. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
  179. package/types/Issuing/DisputeSettlementDetails.d.ts +85 -0
  180. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
  181. package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
  182. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
  183. package/types/Issuing/Settlements.d.ts +113 -0
  184. package/types/Issuing/Transactions.d.ts +5 -0
  185. package/types/Issuing/TransactionsResource.d.ts +5 -0
  186. package/types/LineItems.d.ts +49 -0
  187. package/types/Mandates.d.ts +77 -0
  188. package/types/Margins.d.ts +56 -0
  189. package/types/MarginsResource.d.ts +114 -0
  190. package/types/Orders.d.ts +1199 -0
  191. package/types/OrdersResource.d.ts +3001 -0
  192. package/types/PaymentAttemptRecords.d.ts +2112 -0
  193. package/types/PaymentAttemptRecordsResource.d.ts +47 -0
  194. package/types/PaymentIntentAmountDetailsLineItems.d.ts +110 -0
  195. package/types/PaymentIntents.d.ts +728 -2
  196. package/types/PaymentIntentsResource.d.ts +8618 -4094
  197. package/types/PaymentLinks.d.ts +6 -0
  198. package/types/PaymentLinksResource.d.ts +12 -0
  199. package/types/PaymentMethodConfigurations.d.ts +180 -0
  200. package/types/PaymentMethodConfigurationsResource.d.ts +250 -0
  201. package/types/PaymentMethods.d.ts +125 -0
  202. package/types/PaymentMethodsResource.d.ts +167 -2
  203. package/types/PaymentRecords.d.ts +2105 -0
  204. package/types/PaymentRecordsResource.d.ts +455 -0
  205. package/types/Payouts.d.ts +5 -0
  206. package/types/PayoutsResource.d.ts +5 -0
  207. package/types/Prices.d.ts +22 -0
  208. package/types/PricesResource.d.ts +22 -0
  209. package/types/Privacy/RedactionJobValidationErrors.d.ts +30 -0
  210. package/types/Privacy/RedactionJobs.d.ts +65 -0
  211. package/types/Privacy/RedactionJobsResource.d.ts +218 -0
  212. package/types/Products.d.ts +39 -0
  213. package/types/ProductsResource.d.ts +36 -0
  214. package/types/PromotionCodes.d.ts +5 -0
  215. package/types/PromotionCodesResource.d.ts +10 -0
  216. package/types/QuoteLines.d.ts +634 -0
  217. package/types/QuotePreviewInvoices.d.ts +1697 -0
  218. package/types/QuotePreviewSubscriptionSchedules.d.ts +785 -0
  219. package/types/Quotes.d.ts +603 -1
  220. package/types/QuotesResource.d.ts +2572 -218
  221. package/types/Refunds.d.ts +14 -0
  222. package/types/SetupAttempts.d.ts +50 -1
  223. package/types/SetupIntents.d.ts +121 -2
  224. package/types/SetupIntentsResource.d.ts +730 -3
  225. package/types/Sources.d.ts +29 -0
  226. package/types/SubscriptionItems.d.ts +23 -0
  227. package/types/SubscriptionItemsResource.d.ts +109 -0
  228. package/types/SubscriptionSchedules.d.ts +212 -0
  229. package/types/SubscriptionSchedulesResource.d.ts +1240 -5
  230. package/types/Subscriptions.d.ts +104 -1
  231. package/types/SubscriptionsResource.d.ts +397 -8
  232. package/types/Tax/Associations.d.ts +126 -0
  233. package/types/Tax/AssociationsResource.d.ts +29 -0
  234. package/types/Tax/Forms.d.ts +220 -0
  235. package/types/Tax/FormsResource.d.ts +107 -0
  236. package/types/TaxIds.d.ts +10 -0
  237. package/types/TaxIdsResource.d.ts +10 -0
  238. package/types/Terminal/ReaderCollectedData.d.ts +51 -0
  239. package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
  240. package/types/Terminal/Readers.d.ts +300 -0
  241. package/types/Terminal/ReadersResource.d.ts +220 -0
  242. package/types/TestHelpers/ConfirmationTokensResource.d.ts +126 -0
  243. package/types/TestHelpers/Terminal/ReadersResource.d.ts +53 -0
  244. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
  245. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
  246. package/types/Transfers.d.ts +5 -0
  247. package/types/TransfersResource.d.ts +5 -0
  248. package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
  249. package/types/Treasury/FinancialAccounts.d.ts +5 -0
  250. package/types/Treasury/FinancialAccountsResource.d.ts +37 -0
  251. package/types/Treasury/OutboundTransfers.d.ts +26 -0
  252. package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
  253. package/types/Treasury/ReceivedCredits.d.ts +26 -0
  254. package/types/Treasury/ReceivedDebits.d.ts +31 -0
  255. package/types/V2/Core/AccountLinks.d.ts +106 -0
  256. package/types/V2/Core/AccountLinksResource.d.ts +90 -0
  257. package/types/V2/Core/Accounts/PersonsResource.d.ts +3770 -0
  258. package/types/V2/Core/Accounts.d.ts +8169 -0
  259. package/types/V2/Core/AccountsResource.d.ts +10203 -0
  260. package/types/V2/Core/Persons.d.ts +1867 -0
  261. package/types/V2/Core/Vault/GbBankAccounts.d.ts +160 -0
  262. package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +172 -0
  263. package/types/V2/Core/Vault/UsBankAccounts.d.ts +70 -0
  264. package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +123 -0
  265. package/types/V2/EventTypes.d.ts +812 -1
  266. package/types/V2/FinancialAddressCreditSimulations.d.ts +27 -0
  267. package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +32 -0
  268. package/types/V2/MoneyManagement/Adjustments.d.ts +110 -0
  269. package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +83 -0
  270. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +546 -0
  271. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +52 -0
  272. package/types/V2/MoneyManagement/FinancialAddresses.d.ts +314 -0
  273. package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +288 -0
  274. package/types/V2/MoneyManagement/InboundTransfers.d.ts +206 -0
  275. package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +144 -0
  276. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +168 -0
  277. package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +115 -0
  278. package/types/V2/MoneyManagement/OutboundPayments.d.ts +278 -0
  279. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +242 -0
  280. package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +97 -0
  281. package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +296 -0
  282. package/types/V2/MoneyManagement/OutboundTransfers.d.ts +251 -0
  283. package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +207 -0
  284. package/types/V2/MoneyManagement/PayoutMethods.d.ts +151 -0
  285. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +41 -0
  286. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecs.d.ts +87 -0
  287. package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +113 -0
  288. package/types/V2/MoneyManagement/ReceivedCredits.d.ts +285 -0
  289. package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +78 -0
  290. package/types/V2/MoneyManagement/ReceivedDebits.d.ts +224 -0
  291. package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +48 -0
  292. package/types/V2/MoneyManagement/TransactionEntries.d.ts +155 -0
  293. package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +82 -0
  294. package/types/V2/MoneyManagement/Transactions.d.ts +170 -0
  295. package/types/V2/MoneyManagement/TransactionsResource.d.ts +83 -0
  296. package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +66 -0
  297. package/types/WebhookEndpointsResource.d.ts +82 -0
  298. package/types/index.d.ts +145 -5
  299. package/types/lib.d.ts +11 -1
  300. package/types/test/typescriptTest.ts +3 -3
  301. package/types/InvoicePaymentsResource.d.ts +0 -74
@@ -3,11 +3,6 @@
3
3
  declare module 'stripe' {
4
4
  namespace Stripe {
5
5
  interface SubscriptionCreateParams {
6
- /**
7
- * The identifier of the customer to subscribe.
8
- */
9
- customer: string;
10
-
11
6
  /**
12
7
  * A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
13
8
  */
@@ -38,6 +33,11 @@ declare module 'stripe' {
38
33
  */
39
34
  billing_cycle_anchor_config?: SubscriptionCreateParams.BillingCycleAnchorConfig;
40
35
 
36
+ /**
37
+ * Configure billing_mode in each subscription to opt in improved credit proration behavior.
38
+ */
39
+ billing_mode?: SubscriptionCreateParams.BillingMode;
40
+
41
41
  /**
42
42
  * A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
43
43
  */
@@ -58,6 +58,16 @@ declare module 'stripe' {
58
58
  */
59
59
  currency?: string;
60
60
 
61
+ /**
62
+ * The identifier of the customer to subscribe.
63
+ */
64
+ customer?: string;
65
+
66
+ /**
67
+ * The identifier of the account to subscribe.
68
+ */
69
+ customer_account?: string;
70
+
61
71
  /**
62
72
  * Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.
63
73
  */
@@ -145,6 +155,11 @@ declare module 'stripe' {
145
155
  SubscriptionCreateParams.PendingInvoiceItemInterval
146
156
  >;
147
157
 
158
+ /**
159
+ * If specified, the invoicing for the given billing cycle iterations will be processed now.
160
+ */
161
+ prebilling?: SubscriptionCreateParams.Prebilling;
162
+
148
163
  /**
149
164
  * Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.
150
165
  */
@@ -216,12 +231,56 @@ declare module 'stripe' {
216
231
  */
217
232
  discount?: string;
218
233
 
234
+ /**
235
+ * Details to determine how long the discount should be applied for.
236
+ */
237
+ discount_end?: Discount.DiscountEnd;
238
+
219
239
  /**
220
240
  * ID of the promotion code to create a new discount for.
221
241
  */
222
242
  promotion_code?: string;
223
243
  }
224
244
 
245
+ namespace Discount {
246
+ interface DiscountEnd {
247
+ /**
248
+ * Time span for the redeemed discount.
249
+ */
250
+ duration?: DiscountEnd.Duration;
251
+
252
+ /**
253
+ * A precise Unix timestamp for the discount to end. Must be in the future.
254
+ */
255
+ timestamp?: number;
256
+
257
+ /**
258
+ * The type of calculation made to determine when the discount ends.
259
+ */
260
+ type: DiscountEnd.Type;
261
+ }
262
+
263
+ namespace DiscountEnd {
264
+ interface Duration {
265
+ /**
266
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
267
+ */
268
+ interval: Duration.Interval;
269
+
270
+ /**
271
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
272
+ */
273
+ interval_count: number;
274
+ }
275
+
276
+ namespace Duration {
277
+ type Interval = 'day' | 'month' | 'week' | 'year';
278
+ }
279
+
280
+ type Type = 'duration' | 'timestamp';
281
+ }
282
+ }
283
+
225
284
  interface PriceData {
226
285
  /**
227
286
  * 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).
@@ -311,6 +370,8 @@ declare module 'stripe' {
311
370
  second?: number;
312
371
  }
313
372
 
373
+ type BillingMode = 'classic' | 'flexible';
374
+
314
375
  type CollectionMethod = 'charge_automatically' | 'send_invoice';
315
376
 
316
377
  interface Discount {
@@ -324,12 +385,56 @@ declare module 'stripe' {
324
385
  */
325
386
  discount?: string;
326
387
 
388
+ /**
389
+ * Details to determine how long the discount should be applied for.
390
+ */
391
+ discount_end?: Discount.DiscountEnd;
392
+
327
393
  /**
328
394
  * ID of the promotion code to create a new discount for.
329
395
  */
330
396
  promotion_code?: string;
331
397
  }
332
398
 
399
+ namespace Discount {
400
+ interface DiscountEnd {
401
+ /**
402
+ * Time span for the redeemed discount.
403
+ */
404
+ duration?: DiscountEnd.Duration;
405
+
406
+ /**
407
+ * A precise Unix timestamp for the discount to end. Must be in the future.
408
+ */
409
+ timestamp?: number;
410
+
411
+ /**
412
+ * The type of calculation made to determine when the discount ends.
413
+ */
414
+ type: DiscountEnd.Type;
415
+ }
416
+
417
+ namespace DiscountEnd {
418
+ interface Duration {
419
+ /**
420
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
421
+ */
422
+ interval: Duration.Interval;
423
+
424
+ /**
425
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
426
+ */
427
+ interval_count: number;
428
+ }
429
+
430
+ namespace Duration {
431
+ type Interval = 'day' | 'month' | 'week' | 'year';
432
+ }
433
+
434
+ type Type = 'duration' | 'timestamp';
435
+ }
436
+ }
437
+
333
438
  interface InvoiceSettings {
334
439
  /**
335
440
  * The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
@@ -395,6 +500,11 @@ declare module 'stripe' {
395
500
  * A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
396
501
  */
397
502
  tax_rates?: Stripe.Emptyable<Array<string>>;
503
+
504
+ /**
505
+ * Define options to configure the trial on the subscription item.
506
+ */
507
+ trial?: Item.Trial;
398
508
  }
399
509
 
400
510
  namespace Item {
@@ -409,12 +519,56 @@ declare module 'stripe' {
409
519
  */
410
520
  discount?: string;
411
521
 
522
+ /**
523
+ * Details to determine how long the discount should be applied for.
524
+ */
525
+ discount_end?: Discount.DiscountEnd;
526
+
412
527
  /**
413
528
  * ID of the promotion code to create a new discount for.
414
529
  */
415
530
  promotion_code?: string;
416
531
  }
417
532
 
533
+ namespace Discount {
534
+ interface DiscountEnd {
535
+ /**
536
+ * Time span for the redeemed discount.
537
+ */
538
+ duration?: DiscountEnd.Duration;
539
+
540
+ /**
541
+ * A precise Unix timestamp for the discount to end. Must be in the future.
542
+ */
543
+ timestamp?: number;
544
+
545
+ /**
546
+ * The type of calculation made to determine when the discount ends.
547
+ */
548
+ type: DiscountEnd.Type;
549
+ }
550
+
551
+ namespace DiscountEnd {
552
+ interface Duration {
553
+ /**
554
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
555
+ */
556
+ interval: Duration.Interval;
557
+
558
+ /**
559
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
560
+ */
561
+ interval_count: number;
562
+ }
563
+
564
+ namespace Duration {
565
+ type Interval = 'day' | 'month' | 'week' | 'year';
566
+ }
567
+
568
+ type Type = 'duration' | 'timestamp';
569
+ }
570
+ }
571
+
418
572
  interface PriceData {
419
573
  /**
420
574
  * 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).
@@ -466,6 +620,22 @@ declare module 'stripe' {
466
620
 
467
621
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
468
622
  }
623
+
624
+ interface Trial {
625
+ /**
626
+ * List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
627
+ */
628
+ converts_to?: Array<string>;
629
+
630
+ /**
631
+ * Determines the type of trial for this item.
632
+ */
633
+ type: Trial.Type;
634
+ }
635
+
636
+ namespace Trial {
637
+ type Type = 'free' | 'paid';
638
+ }
469
639
  }
470
640
 
471
641
  type PaymentBehavior =
@@ -517,6 +687,13 @@ declare module 'stripe' {
517
687
  PaymentMethodOptions.CustomerBalance
518
688
  >;
519
689
 
690
+ /**
691
+ * This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
692
+ */
693
+ id_bank_transfer?: Stripe.Emptyable<
694
+ PaymentMethodOptions.IdBankTransfer
695
+ >;
696
+
520
697
  /**
521
698
  * This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
522
699
  */
@@ -666,6 +843,8 @@ declare module 'stripe' {
666
843
  }
667
844
  }
668
845
 
846
+ interface IdBankTransfer {}
847
+
669
848
  interface Konbini {}
670
849
 
671
850
  interface SepaDebit {}
@@ -706,6 +885,11 @@ declare module 'stripe' {
706
885
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
707
886
  */
708
887
  account_subcategories?: Array<Filters.AccountSubcategory>;
888
+
889
+ /**
890
+ * ID of the institution to use to filter for selectable accounts.
891
+ */
892
+ institution?: string;
709
893
  }
710
894
 
711
895
  namespace Filters {
@@ -718,7 +902,11 @@ declare module 'stripe' {
718
902
  | 'payment_method'
719
903
  | 'transactions';
720
904
 
721
- type Prefetch = 'balances' | 'ownership' | 'transactions';
905
+ type Prefetch =
906
+ | 'balances'
907
+ | 'inferred_balances'
908
+ | 'ownership'
909
+ | 'transactions';
722
910
  }
723
911
 
724
912
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -737,11 +925,13 @@ declare module 'stripe' {
737
925
  | 'boleto'
738
926
  | 'card'
739
927
  | 'cashapp'
928
+ | 'custom'
740
929
  | 'customer_balance'
741
930
  | 'eps'
742
931
  | 'fpx'
743
932
  | 'giropay'
744
933
  | 'grabpay'
934
+ | 'id_bank_transfer'
745
935
  | 'ideal'
746
936
  | 'jp_credit_transfer'
747
937
  | 'kakao_pay'
@@ -761,6 +951,7 @@ declare module 'stripe' {
761
951
  | 'sepa_credit_transfer'
762
952
  | 'sepa_debit'
763
953
  | 'sofort'
954
+ | 'stripe_balance'
764
955
  | 'swish'
765
956
  | 'us_bank_account'
766
957
  | 'wechat_pay';
@@ -784,6 +975,22 @@ declare module 'stripe' {
784
975
  type Interval = 'day' | 'month' | 'week' | 'year';
785
976
  }
786
977
 
978
+ interface Prebilling {
979
+ /**
980
+ * This is used to determine the number of billing cycles to prebill.
981
+ */
982
+ iterations: number;
983
+
984
+ /**
985
+ * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
986
+ */
987
+ update_behavior?: Prebilling.UpdateBehavior;
988
+ }
989
+
990
+ namespace Prebilling {
991
+ type UpdateBehavior = 'prebill' | 'reset';
992
+ }
993
+
787
994
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
788
995
 
789
996
  interface TransferData {
@@ -957,6 +1164,11 @@ declare module 'stripe' {
957
1164
  SubscriptionUpdateParams.PendingInvoiceItemInterval
958
1165
  >;
959
1166
 
1167
+ /**
1168
+ * If specified, the invoicing for the given billing cycle iterations will be processed now.
1169
+ */
1170
+ prebilling?: SubscriptionUpdateParams.Prebilling;
1171
+
960
1172
  /**
961
1173
  * Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
962
1174
  */
@@ -1028,12 +1240,56 @@ declare module 'stripe' {
1028
1240
  */
1029
1241
  discount?: string;
1030
1242
 
1243
+ /**
1244
+ * Details to determine how long the discount should be applied for.
1245
+ */
1246
+ discount_end?: Discount.DiscountEnd;
1247
+
1031
1248
  /**
1032
1249
  * ID of the promotion code to create a new discount for.
1033
1250
  */
1034
1251
  promotion_code?: string;
1035
1252
  }
1036
1253
 
1254
+ namespace Discount {
1255
+ interface DiscountEnd {
1256
+ /**
1257
+ * Time span for the redeemed discount.
1258
+ */
1259
+ duration?: DiscountEnd.Duration;
1260
+
1261
+ /**
1262
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1263
+ */
1264
+ timestamp?: number;
1265
+
1266
+ /**
1267
+ * The type of calculation made to determine when the discount ends.
1268
+ */
1269
+ type: DiscountEnd.Type;
1270
+ }
1271
+
1272
+ namespace DiscountEnd {
1273
+ interface Duration {
1274
+ /**
1275
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1276
+ */
1277
+ interval: Duration.Interval;
1278
+
1279
+ /**
1280
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1281
+ */
1282
+ interval_count: number;
1283
+ }
1284
+
1285
+ namespace Duration {
1286
+ type Interval = 'day' | 'month' | 'week' | 'year';
1287
+ }
1288
+
1289
+ type Type = 'duration' | 'timestamp';
1290
+ }
1291
+ }
1292
+
1037
1293
  interface PriceData {
1038
1294
  /**
1039
1295
  * 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).
@@ -1135,12 +1391,56 @@ declare module 'stripe' {
1135
1391
  */
1136
1392
  discount?: string;
1137
1393
 
1394
+ /**
1395
+ * Details to determine how long the discount should be applied for.
1396
+ */
1397
+ discount_end?: Discount.DiscountEnd;
1398
+
1138
1399
  /**
1139
1400
  * ID of the promotion code to create a new discount for.
1140
1401
  */
1141
1402
  promotion_code?: string;
1142
1403
  }
1143
1404
 
1405
+ namespace Discount {
1406
+ interface DiscountEnd {
1407
+ /**
1408
+ * Time span for the redeemed discount.
1409
+ */
1410
+ duration?: DiscountEnd.Duration;
1411
+
1412
+ /**
1413
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1414
+ */
1415
+ timestamp?: number;
1416
+
1417
+ /**
1418
+ * The type of calculation made to determine when the discount ends.
1419
+ */
1420
+ type: DiscountEnd.Type;
1421
+ }
1422
+
1423
+ namespace DiscountEnd {
1424
+ interface Duration {
1425
+ /**
1426
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1427
+ */
1428
+ interval: Duration.Interval;
1429
+
1430
+ /**
1431
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1432
+ */
1433
+ interval_count: number;
1434
+ }
1435
+
1436
+ namespace Duration {
1437
+ type Interval = 'day' | 'month' | 'week' | 'year';
1438
+ }
1439
+
1440
+ type Type = 'duration' | 'timestamp';
1441
+ }
1442
+ }
1443
+
1144
1444
  interface InvoiceSettings {
1145
1445
  /**
1146
1446
  * The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
@@ -1235,12 +1535,56 @@ declare module 'stripe' {
1235
1535
  */
1236
1536
  discount?: string;
1237
1537
 
1538
+ /**
1539
+ * Details to determine how long the discount should be applied for.
1540
+ */
1541
+ discount_end?: Discount.DiscountEnd;
1542
+
1238
1543
  /**
1239
1544
  * ID of the promotion code to create a new discount for.
1240
1545
  */
1241
1546
  promotion_code?: string;
1242
1547
  }
1243
1548
 
1549
+ namespace Discount {
1550
+ interface DiscountEnd {
1551
+ /**
1552
+ * Time span for the redeemed discount.
1553
+ */
1554
+ duration?: DiscountEnd.Duration;
1555
+
1556
+ /**
1557
+ * A precise Unix timestamp for the discount to end. Must be in the future.
1558
+ */
1559
+ timestamp?: number;
1560
+
1561
+ /**
1562
+ * The type of calculation made to determine when the discount ends.
1563
+ */
1564
+ type: DiscountEnd.Type;
1565
+ }
1566
+
1567
+ namespace DiscountEnd {
1568
+ interface Duration {
1569
+ /**
1570
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1571
+ */
1572
+ interval: Duration.Interval;
1573
+
1574
+ /**
1575
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1576
+ */
1577
+ interval_count: number;
1578
+ }
1579
+
1580
+ namespace Duration {
1581
+ type Interval = 'day' | 'month' | 'week' | 'year';
1582
+ }
1583
+
1584
+ type Type = 'duration' | 'timestamp';
1585
+ }
1586
+ }
1587
+
1244
1588
  interface PriceData {
1245
1589
  /**
1246
1590
  * 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).
@@ -1359,6 +1703,13 @@ declare module 'stripe' {
1359
1703
  PaymentMethodOptions.CustomerBalance
1360
1704
  >;
1361
1705
 
1706
+ /**
1707
+ * This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
1708
+ */
1709
+ id_bank_transfer?: Stripe.Emptyable<
1710
+ PaymentMethodOptions.IdBankTransfer
1711
+ >;
1712
+
1362
1713
  /**
1363
1714
  * This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
1364
1715
  */
@@ -1508,6 +1859,8 @@ declare module 'stripe' {
1508
1859
  }
1509
1860
  }
1510
1861
 
1862
+ interface IdBankTransfer {}
1863
+
1511
1864
  interface Konbini {}
1512
1865
 
1513
1866
  interface SepaDebit {}
@@ -1548,6 +1901,11 @@ declare module 'stripe' {
1548
1901
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1549
1902
  */
1550
1903
  account_subcategories?: Array<Filters.AccountSubcategory>;
1904
+
1905
+ /**
1906
+ * ID of the institution to use to filter for selectable accounts.
1907
+ */
1908
+ institution?: string;
1551
1909
  }
1552
1910
 
1553
1911
  namespace Filters {
@@ -1560,7 +1918,11 @@ declare module 'stripe' {
1560
1918
  | 'payment_method'
1561
1919
  | 'transactions';
1562
1920
 
1563
- type Prefetch = 'balances' | 'ownership' | 'transactions';
1921
+ type Prefetch =
1922
+ | 'balances'
1923
+ | 'inferred_balances'
1924
+ | 'ownership'
1925
+ | 'transactions';
1564
1926
  }
1565
1927
 
1566
1928
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -1579,11 +1941,13 @@ declare module 'stripe' {
1579
1941
  | 'boleto'
1580
1942
  | 'card'
1581
1943
  | 'cashapp'
1944
+ | 'custom'
1582
1945
  | 'customer_balance'
1583
1946
  | 'eps'
1584
1947
  | 'fpx'
1585
1948
  | 'giropay'
1586
1949
  | 'grabpay'
1950
+ | 'id_bank_transfer'
1587
1951
  | 'ideal'
1588
1952
  | 'jp_credit_transfer'
1589
1953
  | 'kakao_pay'
@@ -1603,6 +1967,7 @@ declare module 'stripe' {
1603
1967
  | 'sepa_credit_transfer'
1604
1968
  | 'sepa_debit'
1605
1969
  | 'sofort'
1970
+ | 'stripe_balance'
1606
1971
  | 'swish'
1607
1972
  | 'us_bank_account'
1608
1973
  | 'wechat_pay';
@@ -1626,6 +1991,22 @@ declare module 'stripe' {
1626
1991
  type Interval = 'day' | 'month' | 'week' | 'year';
1627
1992
  }
1628
1993
 
1994
+ interface Prebilling {
1995
+ /**
1996
+ * This is used to determine the number of billing cycles to prebill.
1997
+ */
1998
+ iterations: number;
1999
+
2000
+ /**
2001
+ * Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
2002
+ */
2003
+ update_behavior?: Prebilling.UpdateBehavior;
2004
+ }
2005
+
2006
+ namespace Prebilling {
2007
+ type UpdateBehavior = 'prebill' | 'reset';
2008
+ }
2009
+
1629
2010
  type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
1630
2011
 
1631
2012
  interface TransferData {
@@ -1692,6 +2073,11 @@ declare module 'stripe' {
1692
2073
  */
1693
2074
  customer?: string;
1694
2075
 
2076
+ /**
2077
+ * The ID of the account whose subscriptions will be retrieved.
2078
+ */
2079
+ customer_account?: string;
2080
+
1695
2081
  /**
1696
2082
  * Specifies which fields in the response should be expanded.
1697
2083
  */
@@ -1852,7 +2238,10 @@ declare module 'stripe' {
1852
2238
  * Schedules provide the flexibility to model more complex billing configurations that change over time.
1853
2239
  */
1854
2240
  create(
1855
- params: SubscriptionCreateParams,
2241
+ params?: SubscriptionCreateParams,
2242
+ options?: RequestOptions
2243
+ ): Promise<Stripe.Response<Stripe.Subscription>>;
2244
+ create(
1856
2245
  options?: RequestOptions
1857
2246
  ): Promise<Stripe.Response<Stripe.Subscription>>;
1858
2247