stripe 17.6.0-beta.1 → 17.6.0-beta.3

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 (39) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +23 -16
  3. package/VERSION +1 -1
  4. package/cjs/apiVersion.js +1 -1
  5. package/cjs/stripe.core.js +1 -1
  6. package/esm/apiVersion.js +1 -1
  7. package/esm/stripe.core.js +1 -1
  8. package/package.json +3 -15
  9. package/types/AccountSessions.d.ts +130 -0
  10. package/types/AccountSessionsResource.d.ts +25 -4
  11. package/types/Accounts.d.ts +7 -0
  12. package/types/AccountsResource.d.ts +92 -0
  13. package/types/Billing/CreditBalanceTransactions.d.ts +1 -1
  14. package/types/BillingPortal/Configurations.d.ts +4 -1
  15. package/types/BillingPortal/ConfigurationsResource.d.ts +10 -4
  16. package/types/Charges.d.ts +7 -3
  17. package/types/Checkout/Sessions.d.ts +19 -1
  18. package/types/Checkout/SessionsResource.d.ts +9 -0
  19. package/types/ConfirmationTokens.d.ts +6 -1
  20. package/types/CustomersResource.d.ts +1 -0
  21. package/types/FinancialConnections/TransactionsResource.d.ts +1 -1
  22. package/types/PaymentIntents.d.ts +4 -0
  23. package/types/PaymentIntentsResource.d.ts +45 -0
  24. package/types/PaymentLinks.d.ts +2 -0
  25. package/types/PaymentLinksResource.d.ts +4 -0
  26. package/types/PaymentMethodConfigurations.d.ts +36 -0
  27. package/types/PaymentMethodConfigurationsResource.d.ts +50 -0
  28. package/types/PaymentMethods.d.ts +6 -1
  29. package/types/PaymentMethodsResource.d.ts +16 -0
  30. package/types/Refunds.d.ts +2 -2
  31. package/types/SetupIntentsResource.d.ts +24 -0
  32. package/types/Terminal/Configurations.d.ts +19 -0
  33. package/types/Terminal/ConfigurationsResource.d.ts +44 -0
  34. package/types/Terminal/Readers.d.ts +0 -20
  35. package/types/TestHelpers/ConfirmationTokensResource.d.ts +8 -0
  36. package/types/TokensResource.d.ts +22 -0
  37. package/types/WebhookEndpointsResource.d.ts +2 -1
  38. package/types/lib.d.ts +1 -1
  39. package/types/test/typescriptTest.ts +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## 17.6.0-beta.3 - 2025-01-23
4
+ * [#2253](https://github.com/stripe/stripe-node/pull/2253) Update generated code for beta
5
+ * Change `Refund.destination_details.blik.network_decline_code` and `Refund.destination_details.swish.network_decline_code` to be required
6
+ * Remove support for `stripe_account` on `Terminal.Reader.action.collect_payment_method`, `Terminal.Reader.action.confirm_payment_intent`, `Terminal.Reader.action.process_payment_intent`, and `Terminal.Reader.action.refund_payment`
7
+
8
+ ## 17.6.0-beta.2 - 2025-01-17
9
+ * [#2247](https://github.com/stripe/stripe-node/pull/2247) Update generated code for beta
10
+ * Add support for `pay_by_bank_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
11
+ * Add support for `directorship_declaration` on `AccountCreateParams.company`, `AccountUpdateParams.company`, and `TokenCreateParams.account.company`
12
+ * Add support for `proof_of_ultimate_beneficial_ownership` on `AccountCreateParams.documents` and `AccountUpdateParams.documents`
13
+ * Add support for `tax_threshold_monitoring` on `AccountSessionCreateParams.components`
14
+ * Add support for `financial_account_transactions`, `financial_account`, `issuing_card`, and `issuing_cards_list` on `AccountSession.components`
15
+ * Change `Billing.CreditBalanceTransaction.credit.credits_application_invoice_voided` to be required
16
+ * Add support for new value `always_invoice` on enums `BillingPortal.Configuration.features.subscription_cancel.proration_behavior`, `BillingPortal.ConfigurationCreateParams.features.subscription_cancel.proration_behavior`, and `BillingPortal.ConfigurationUpdateParams.features.subscription_cancel.proration_behavior`
17
+ * Add support for `pay_by_bank` on `Charge.payment_method_details`, `Checkout.SessionCreateParams.payment_method_options`, `ConfirmationToken.payment_method_preview`, `ConfirmationTokenCreateParams.testHelpers.payment_method_data`, `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethodUpdateParams`, `PaymentMethod`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, and `SetupIntentUpdateParams.payment_method_data`
18
+ * Add support for new value `pay_by_bank` on enum `Checkout.SessionCreateParams.payment_method_types[]`
19
+ * Add support for new value `SD` on enums `Checkout.Session.shipping_address_collection.allowed_countries[]`, `Checkout.SessionCreateParams.shipping_address_collection.allowed_countries[]`, `PaymentLink.shipping_address_collection.allowed_countries[]`, `PaymentLinkCreateParams.shipping_address_collection.allowed_countries[]`, and `PaymentLinkUpdateParams.shipping_address_collection.allowed_countries[]`
20
+ * Add support for `discounts` on `Checkout.Session`
21
+ * Add support for new value `pay_by_bank` on enums `ConfirmationTokenCreateParams.testHelpers.payment_method_data.type`, `PaymentIntentConfirmParams.payment_method_data.type`, `PaymentIntentCreateParams.payment_method_data.type`, `PaymentIntentUpdateParams.payment_method_data.type`, `SetupIntentConfirmParams.payment_method_data.type`, `SetupIntentCreateParams.payment_method_data.type`, and `SetupIntentUpdateParams.payment_method_data.type`
22
+ * Add support for new value `pay_by_bank` on enums `ConfirmationToken.payment_method_preview.type` and `PaymentMethod.type`
23
+ * Add support for new value `pay_by_bank` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type`
24
+ * Add support for new value `pay_by_bank` on enums `PaymentLink.payment_method_types[]`, `PaymentLinkCreateParams.payment_method_types[]`, and `PaymentLinkUpdateParams.payment_method_types[]`
25
+ * Add support for `jpy` on `Terminal.Configuration.tipping`, `Terminal.ConfigurationCreateParams.tipping`, and `Terminal.ConfigurationUpdateParams.tipping`
26
+ * Add support for new value `2025-01-27.acacia` on enum `WebhookEndpointCreateParams.api_version`
27
+
3
28
  ## 17.6.0-beta.1 - 2025-01-09
4
29
  * [#2239](https://github.com/stripe/stripe-node/pull/2239) Update generated code for beta
5
30
  * Add support for `close` method on resource `Treasury.FinancialAccount`
package/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  [![Version](https://img.shields.io/npm/v/stripe.svg)](https://www.npmjs.org/package/stripe)
4
4
  [![Build Status](https://github.com/stripe/stripe-node/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-node/actions?query=branch%3Amaster)
5
- [![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-node/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-node?branch=master)
6
5
  [![Downloads](https://img.shields.io/npm/dm/stripe.svg)](https://www.npmjs.com/package/stripe)
7
6
  [![Try on RunKit](https://badge.runkitcdn.com/stripe.svg)](https://runkit.com/npm/stripe)
8
7
 
@@ -597,16 +596,9 @@ New features and bug fixes are released on the latest major version of the `stri
597
596
 
598
597
  ## Development
599
598
 
600
- Run all tests:
599
+ [Contribution guidelines for this project](CONTRIBUTING.md)
601
600
 
602
- ```bash
603
- $ yarn install
604
- $ yarn test
605
- ```
606
-
607
- If you do not have `yarn` installed, you can get it with `npm install --global yarn`.
608
-
609
- The tests also depends on [stripe-mock][stripe-mock], so make sure to fetch and
601
+ The tests depend on [stripe-mock][stripe-mock], so make sure to fetch and
610
602
  run it from a background terminal ([stripe-mock's README][stripe-mock-usage]
611
603
  also contains instructions for installing via Homebrew and other methods):
612
604
 
@@ -615,24 +607,38 @@ go get -u github.com/stripe/stripe-mock
615
607
  stripe-mock
616
608
  ```
617
609
 
618
- Run a single test suite without a coverage report:
610
+ We use [just](https://github.com/casey/just) for conveniently running development tasks. You can use them directly, or copy the commands out of the `justfile`. To our help docs, run `just`.
611
+
612
+ Run all tests (installing the dependencies first, if needed)
613
+
614
+ ```bash
615
+ just test
616
+ # or: yarn && yarn test
617
+ ```
618
+
619
+ If you do not have `yarn` installed, consult its [installation instructions](https://classic.yarnpkg.com/lang/en/docs/install/).
620
+
621
+ Run a single test suite:
619
622
 
620
623
  ```bash
621
- $ yarn mocha-only test/Error.spec.ts
624
+ just test test/Error.spec.ts
625
+ # or: yarn test test/Error.spec.ts
622
626
  ```
623
627
 
624
628
  Run a single test (case sensitive) in watch mode:
625
629
 
626
630
  ```bash
627
- $ yarn mocha-only test/Error.spec.ts --grep 'Populates with type' --watch
631
+ just test test/Error.spec.ts --grep 'StripeError' --watch
632
+ # or: yarn test test/Error.spec.ts --grep 'StripeError' --watch
628
633
  ```
629
634
 
630
635
  If you wish, you may run tests using your Stripe _Test_ API key by setting the
631
636
  environment variable `STRIPE_TEST_API_KEY` before running the tests:
632
637
 
633
638
  ```bash
634
- $ export STRIPE_TEST_API_KEY='sk_test....'
635
- $ yarn test
639
+ export STRIPE_TEST_API_KEY='sk_test....'
640
+ just test
641
+ # or: yarn test
636
642
  ```
637
643
 
638
644
  Run prettier:
@@ -640,7 +646,8 @@ Run prettier:
640
646
  Add an [editor integration](https://prettier.io/docs/en/editors.html) or:
641
647
 
642
648
  ```bash
643
- $ yarn fix
649
+ just format
650
+ # or: yarn prettier src/**/*.ts --write
644
651
  ```
645
652
 
646
653
  [api-keys]: https://dashboard.stripe.com/account/apikeys
package/VERSION CHANGED
@@ -1 +1 @@
1
- 17.6.0-beta.1
1
+ 17.6.0-beta.3
package/cjs/apiVersion.js CHANGED
@@ -2,4 +2,4 @@
2
2
  // File generated from our OpenAPI spec
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.ApiVersion = void 0;
5
- exports.ApiVersion = '2024-12-18.acacia';
5
+ exports.ApiVersion = '2025-01-27.acacia';
@@ -36,7 +36,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
36
36
  ];
37
37
  const defaultRequestSenderFactory = (stripe) => new RequestSender_js_1.RequestSender(stripe, StripeResource_js_1.StripeResource.MAX_BUFFERED_REQUEST_METRICS);
38
38
  function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
39
- Stripe.PACKAGE_VERSION = '17.6.0-beta.1';
39
+ Stripe.PACKAGE_VERSION = '17.6.0-beta.3';
40
40
  Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, (0, utils_js_1.determineProcessUserAgentProperties)());
41
41
  Stripe.StripeResource = StripeResource_js_1.StripeResource;
42
42
  Stripe.resources = resources;
package/esm/apiVersion.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // File generated from our OpenAPI spec
2
- export const ApiVersion = '2024-12-18.acacia';
2
+ export const ApiVersion = '2025-01-27.acacia';
@@ -33,7 +33,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
33
33
  ];
34
34
  const defaultRequestSenderFactory = (stripe) => new RequestSender(stripe, StripeResource.MAX_BUFFERED_REQUEST_METRICS);
35
35
  export function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
36
- Stripe.PACKAGE_VERSION = '17.6.0-beta.1';
36
+ Stripe.PACKAGE_VERSION = '17.6.0-beta.3';
37
37
  Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, determineProcessUserAgentProperties());
38
38
  Stripe.StripeResource = StripeResource;
39
39
  Stripe.resources = resources;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stripe",
3
- "version": "17.6.0-beta.1",
3
+ "version": "17.6.0-beta.3",
4
4
  "description": "Stripe API wrapper",
5
5
  "keywords": [
6
6
  "stripe",
@@ -35,7 +35,6 @@
35
35
  "@typescript-eslint/parser": "^4.33.0",
36
36
  "chai": "^4.3.6",
37
37
  "chai-as-promised": "~7.1.1",
38
- "coveralls": "^3.1.1",
39
38
  "eslint": "^7.32.0",
40
39
  "eslint-config-prettier": "^8.5.0",
41
40
  "eslint-plugin-chai-friendly": "^0.7.2",
@@ -60,19 +59,8 @@
60
59
  },
61
60
  "license": "MIT",
62
61
  "scripts": {
63
- "build": "yarn build-esm && yarn build-cjs",
64
- "build-esm": "mkdir -p esm && tsc -p tsconfig.esm.json && echo '{\"type\":\"module\"}' > esm/package.json",
65
- "build-cjs": "mkdir -p cjs && tsc -p tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > cjs/package.json",
66
- "clean": "rm -rf ./.nyc_output ./node_modules/.cache ./coverage ./esm ./cjs",
67
- "prepack": "yarn install && yarn build",
68
- "mocha": "nyc mocha",
69
- "mocha-only": "mocha",
70
- "test": "yarn build && yarn test-typescript && yarn mocha",
71
- "test-typescript": "tsc --build types/test",
72
- "lint": "eslint --ext .js,.jsx,.ts .",
73
- "fix": "yarn lint --fix && ./scripts/updateAPIVersion.js",
74
- "report": "nyc -r text -r lcov report",
75
- "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
62
+ "test": "tsc -p tsconfig.cjs.json && mocha",
63
+ "prepack": "just install && just build"
76
64
  },
77
65
  "exports": {
78
66
  "types": "./types/index.d.ts",
@@ -60,6 +60,14 @@ declare module 'stripe' {
60
60
 
61
61
  documents: Components.Documents;
62
62
 
63
+ financial_account: Components.FinancialAccount;
64
+
65
+ financial_account_transactions: Components.FinancialAccountTransactions;
66
+
67
+ issuing_card: Components.IssuingCard;
68
+
69
+ issuing_cards_list: Components.IssuingCardsList;
70
+
63
71
  notification_banner: Components.NotificationBanner;
64
72
 
65
73
  payment_details: Components.PaymentDetails;
@@ -212,6 +220,128 @@ declare module 'stripe' {
212
220
  interface Features {}
213
221
  }
214
222
 
223
+ interface FinancialAccount {
224
+ /**
225
+ * Whether the embedded component is enabled.
226
+ */
227
+ enabled: boolean;
228
+
229
+ features: FinancialAccount.Features;
230
+ }
231
+
232
+ namespace FinancialAccount {
233
+ interface Features {
234
+ /**
235
+ * Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
236
+ */
237
+ disable_stripe_user_authentication: boolean;
238
+
239
+ /**
240
+ * Whether to allow external accounts to be linked for money transfer.
241
+ */
242
+ external_account_collection: boolean;
243
+
244
+ /**
245
+ * Whether to allow sending money.
246
+ */
247
+ send_money: boolean;
248
+
249
+ /**
250
+ * Whether to allow transferring balance.
251
+ */
252
+ transfer_balance: boolean;
253
+ }
254
+ }
255
+
256
+ interface FinancialAccountTransactions {
257
+ /**
258
+ * Whether the embedded component is enabled.
259
+ */
260
+ enabled: boolean;
261
+
262
+ features: FinancialAccountTransactions.Features;
263
+ }
264
+
265
+ namespace FinancialAccountTransactions {
266
+ interface Features {
267
+ /**
268
+ * Whether to allow card spend dispute management features.
269
+ */
270
+ card_spend_dispute_management: boolean;
271
+ }
272
+ }
273
+
274
+ interface IssuingCard {
275
+ /**
276
+ * Whether the embedded component is enabled.
277
+ */
278
+ enabled: boolean;
279
+
280
+ features: IssuingCard.Features;
281
+ }
282
+
283
+ namespace IssuingCard {
284
+ interface Features {
285
+ /**
286
+ * Whether to allow card management features.
287
+ */
288
+ card_management: boolean;
289
+
290
+ /**
291
+ * Whether to allow card spend dispute management features.
292
+ */
293
+ card_spend_dispute_management: boolean;
294
+
295
+ /**
296
+ * Whether to allow cardholder management features.
297
+ */
298
+ cardholder_management: boolean;
299
+
300
+ /**
301
+ * Whether to allow spend control management features.
302
+ */
303
+ spend_control_management: boolean;
304
+ }
305
+ }
306
+
307
+ interface IssuingCardsList {
308
+ /**
309
+ * Whether the embedded component is enabled.
310
+ */
311
+ enabled: boolean;
312
+
313
+ features: IssuingCardsList.Features;
314
+ }
315
+
316
+ namespace IssuingCardsList {
317
+ interface Features {
318
+ /**
319
+ * Whether to allow card management features.
320
+ */
321
+ card_management: boolean;
322
+
323
+ /**
324
+ * Whether to allow card spend dispute management features.
325
+ */
326
+ card_spend_dispute_management: boolean;
327
+
328
+ /**
329
+ * Whether to allow cardholder management features.
330
+ */
331
+ cardholder_management: boolean;
332
+
333
+ /**
334
+ * Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts.
335
+ */
336
+ disable_stripe_user_authentication: boolean;
337
+
338
+ /**
339
+ * Whether to allow spend control management features.
340
+ */
341
+ spend_control_management: boolean;
342
+ }
343
+ }
344
+
215
345
  interface NotificationBanner {
216
346
  /**
217
347
  * Whether the embedded component is enabled.
@@ -72,22 +72,22 @@ declare module 'stripe' {
72
72
  documents?: Components.Documents;
73
73
 
74
74
  /**
75
- * Configuration for the financial account component.
75
+ * Configuration for the financial account embedded component.
76
76
  */
77
77
  financial_account?: Components.FinancialAccount;
78
78
 
79
79
  /**
80
- * Configuration for the financial account transactions component.
80
+ * Configuration for the financial account transactions embedded component.
81
81
  */
82
82
  financial_account_transactions?: Components.FinancialAccountTransactions;
83
83
 
84
84
  /**
85
- * Configuration for the issuing card component.
85
+ * Configuration for the issuing card embedded component.
86
86
  */
87
87
  issuing_card?: Components.IssuingCard;
88
88
 
89
89
  /**
90
- * Configuration for the issuing cards list component.
90
+ * Configuration for the issuing cards list embedded component.
91
91
  */
92
92
  issuing_cards_list?: Components.IssuingCardsList;
93
93
 
@@ -140,6 +140,11 @@ declare module 'stripe' {
140
140
  * Configuration for the tax settings embedded component.
141
141
  */
142
142
  tax_settings?: Components.TaxSettings;
143
+
144
+ /**
145
+ * Configuration for the tax threshold monitoring embedded component.
146
+ */
147
+ tax_threshold_monitoring?: Components.TaxThresholdMonitoring;
143
148
  }
144
149
 
145
150
  namespace Components {
@@ -728,6 +733,22 @@ declare module 'stripe' {
728
733
  namespace TaxSettings {
729
734
  interface Features {}
730
735
  }
736
+
737
+ interface TaxThresholdMonitoring {
738
+ /**
739
+ * Whether the embedded component is enabled.
740
+ */
741
+ enabled: boolean;
742
+
743
+ /**
744
+ * The list of features enabled in the embedded component.
745
+ */
746
+ features?: TaxThresholdMonitoring.Features;
747
+ }
748
+
749
+ namespace TaxThresholdMonitoring {
750
+ interface Features {}
751
+ }
731
752
  }
732
753
  }
733
754
 
@@ -424,6 +424,11 @@ declare module 'stripe' {
424
424
  */
425
425
  p24_payments?: Capabilities.P24Payments;
426
426
 
427
+ /**
428
+ * The status of the pay_by_bank payments capability of the account, or whether the account can directly process pay_by_bank charges.
429
+ */
430
+ pay_by_bank_payments?: Capabilities.PayByBankPayments;
431
+
427
432
  /**
428
433
  * The status of the Payco capability of the account, or whether the account can directly process Payco payments.
429
434
  */
@@ -633,6 +638,8 @@ declare module 'stripe' {
633
638
 
634
639
  type P24Payments = 'active' | 'inactive' | 'pending';
635
640
 
641
+ type PayByBankPayments = 'active' | 'inactive' | 'pending';
642
+
636
643
  type PaycoPayments = 'active' | 'inactive' | 'pending';
637
644
 
638
645
  type PaynowPayments = 'active' | 'inactive' | 'pending';
@@ -409,6 +409,11 @@ declare module 'stripe' {
409
409
  */
410
410
  p24_payments?: Capabilities.P24Payments;
411
411
 
412
+ /**
413
+ * The pay_by_bank_payments capability.
414
+ */
415
+ pay_by_bank_payments?: Capabilities.PayByBankPayments;
416
+
412
417
  /**
413
418
  * The payco_payments capability.
414
419
  */
@@ -823,6 +828,13 @@ declare module 'stripe' {
823
828
  requested?: boolean;
824
829
  }
825
830
 
831
+ interface PayByBankPayments {
832
+ /**
833
+ * Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
834
+ */
835
+ requested?: boolean;
836
+ }
837
+
826
838
  interface PaycoPayments {
827
839
  /**
828
840
  * Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
@@ -1020,6 +1032,11 @@ declare module 'stripe' {
1020
1032
  */
1021
1033
  directors_provided?: boolean;
1022
1034
 
1035
+ /**
1036
+ * This hash is used to attest that the directors information provided to Stripe is both current and correct.
1037
+ */
1038
+ directorship_declaration?: Company.DirectorshipDeclaration;
1039
+
1023
1040
  /**
1024
1041
  * Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.executive` requirement.
1025
1042
  */
@@ -1101,6 +1118,23 @@ declare module 'stripe' {
1101
1118
  }
1102
1119
 
1103
1120
  namespace Company {
1121
+ interface DirectorshipDeclaration {
1122
+ /**
1123
+ * The Unix timestamp marking when the directorship declaration attestation was made.
1124
+ */
1125
+ date?: number;
1126
+
1127
+ /**
1128
+ * The IP address from which the directorship declaration attestation was made.
1129
+ */
1130
+ ip?: string;
1131
+
1132
+ /**
1133
+ * The user agent of the browser from which the directorship declaration attestation was made.
1134
+ */
1135
+ user_agent?: string;
1136
+ }
1137
+
1104
1138
  interface OwnershipDeclaration {
1105
1139
  /**
1106
1140
  * The Unix timestamp marking when the beneficial owner attestation was made.
@@ -1301,6 +1335,11 @@ declare module 'stripe' {
1301
1335
  * One or more documents showing the company's proof of registration with the national business registry.
1302
1336
  */
1303
1337
  proof_of_registration?: Documents.ProofOfRegistration;
1338
+
1339
+ /**
1340
+ * One or more documents that demonstrate proof of ultimate beneficial ownership.
1341
+ */
1342
+ proof_of_ultimate_beneficial_ownership?: Documents.ProofOfUltimateBeneficialOwnership;
1304
1343
  }
1305
1344
 
1306
1345
  namespace Documents {
@@ -1352,6 +1391,13 @@ declare module 'stripe' {
1352
1391
  */
1353
1392
  files?: Array<string>;
1354
1393
  }
1394
+
1395
+ interface ProofOfUltimateBeneficialOwnership {
1396
+ /**
1397
+ * One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
1398
+ */
1399
+ files?: Array<string>;
1400
+ }
1355
1401
  }
1356
1402
 
1357
1403
  interface ExternalAccount {
@@ -2375,6 +2421,11 @@ declare module 'stripe' {
2375
2421
  */
2376
2422
  p24_payments?: Capabilities.P24Payments;
2377
2423
 
2424
+ /**
2425
+ * The pay_by_bank_payments capability.
2426
+ */
2427
+ pay_by_bank_payments?: Capabilities.PayByBankPayments;
2428
+
2378
2429
  /**
2379
2430
  * The payco_payments capability.
2380
2431
  */
@@ -2789,6 +2840,13 @@ declare module 'stripe' {
2789
2840
  requested?: boolean;
2790
2841
  }
2791
2842
 
2843
+ interface PayByBankPayments {
2844
+ /**
2845
+ * Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
2846
+ */
2847
+ requested?: boolean;
2848
+ }
2849
+
2792
2850
  interface PaycoPayments {
2793
2851
  /**
2794
2852
  * Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
@@ -3029,6 +3087,11 @@ declare module 'stripe' {
3029
3087
  */
3030
3088
  directors_provided?: boolean;
3031
3089
 
3090
+ /**
3091
+ * This hash is used to attest that the directors information provided to Stripe is both current and correct.
3092
+ */
3093
+ directorship_declaration?: Company.DirectorshipDeclaration;
3094
+
3032
3095
  /**
3033
3096
  * Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.executive` requirement.
3034
3097
  */
@@ -3110,6 +3173,23 @@ declare module 'stripe' {
3110
3173
  }
3111
3174
 
3112
3175
  namespace Company {
3176
+ interface DirectorshipDeclaration {
3177
+ /**
3178
+ * The Unix timestamp marking when the directorship declaration attestation was made.
3179
+ */
3180
+ date?: number;
3181
+
3182
+ /**
3183
+ * The IP address from which the directorship declaration attestation was made.
3184
+ */
3185
+ ip?: string;
3186
+
3187
+ /**
3188
+ * The user agent of the browser from which the directorship declaration attestation was made.
3189
+ */
3190
+ user_agent?: string;
3191
+ }
3192
+
3113
3193
  interface OwnershipDeclaration {
3114
3194
  /**
3115
3195
  * The Unix timestamp marking when the beneficial owner attestation was made.
@@ -3213,6 +3293,11 @@ declare module 'stripe' {
3213
3293
  * One or more documents showing the company's proof of registration with the national business registry.
3214
3294
  */
3215
3295
  proof_of_registration?: Documents.ProofOfRegistration;
3296
+
3297
+ /**
3298
+ * One or more documents that demonstrate proof of ultimate beneficial ownership.
3299
+ */
3300
+ proof_of_ultimate_beneficial_ownership?: Documents.ProofOfUltimateBeneficialOwnership;
3216
3301
  }
3217
3302
 
3218
3303
  namespace Documents {
@@ -3264,6 +3349,13 @@ declare module 'stripe' {
3264
3349
  */
3265
3350
  files?: Array<string>;
3266
3351
  }
3352
+
3353
+ interface ProofOfUltimateBeneficialOwnership {
3354
+ /**
3355
+ * One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
3356
+ */
3357
+ files?: Array<string>;
3358
+ }
3267
3359
  }
3268
3360
 
3269
3361
  interface Groups {
@@ -65,7 +65,7 @@ declare module 'stripe' {
65
65
  /**
66
66
  * Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`.
67
67
  */
68
- credits_application_invoice_voided?: Credit.CreditsApplicationInvoiceVoided | null;
68
+ credits_application_invoice_voided: Credit.CreditsApplicationInvoiceVoided | null;
69
69
 
70
70
  /**
71
71
  * The type of credit transaction.
@@ -181,7 +181,10 @@ declare module 'stripe' {
181
181
 
182
182
  type Mode = 'at_period_end' | 'immediately';
183
183
 
184
- type ProrationBehavior = 'create_prorations' | 'none';
184
+ type ProrationBehavior =
185
+ | 'always_invoice'
186
+ | 'create_prorations'
187
+ | 'none';
185
188
  }
186
189
 
187
190
  interface SubscriptionUpdate {
@@ -136,7 +136,7 @@ declare module 'stripe' {
136
136
  mode?: SubscriptionCancel.Mode;
137
137
 
138
138
  /**
139
- * Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period.
139
+ * Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
140
140
  */
141
141
  proration_behavior?: SubscriptionCancel.ProrationBehavior;
142
142
  }
@@ -168,7 +168,10 @@ declare module 'stripe' {
168
168
 
169
169
  type Mode = 'at_period_end' | 'immediately';
170
170
 
171
- type ProrationBehavior = 'create_prorations' | 'none';
171
+ type ProrationBehavior =
172
+ | 'always_invoice'
173
+ | 'create_prorations'
174
+ | 'none';
172
175
  }
173
176
 
174
177
  interface SubscriptionUpdate {
@@ -395,7 +398,7 @@ declare module 'stripe' {
395
398
  mode?: SubscriptionCancel.Mode;
396
399
 
397
400
  /**
398
- * Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period.
401
+ * Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
399
402
  */
400
403
  proration_behavior?: SubscriptionCancel.ProrationBehavior;
401
404
  }
@@ -427,7 +430,10 @@ declare module 'stripe' {
427
430
 
428
431
  type Mode = 'at_period_end' | 'immediately';
429
432
 
430
- type ProrationBehavior = 'create_prorations' | 'none';
433
+ type ProrationBehavior =
434
+ | 'always_invoice'
435
+ | 'create_prorations'
436
+ | 'none';
431
437
  }
432
438
 
433
439
  interface SubscriptionUpdate {