stripe 14.12.0 → 14.13.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 14.13.0 - 2024-01-18
4
+ * [#1995](https://github.com/stripe/stripe-node/pull/1995) Update generated code
5
+ * Add support for providing `BankAccount`, `Card`, and `CardToken` details on the `external_account` parameter in `AccountUpdateParams`
6
+ * Add support for new value `nn` on enums `Charge.payment_method_details.ideal.bank`, `PaymentIntentConfirmParams.payment_method_data.ideal.bank`, `PaymentIntentCreateParams.payment_method_data.ideal.bank`, `PaymentIntentUpdateParams.payment_method_data.ideal.bank`, `PaymentMethod.ideal.bank`, `PaymentMethodCreateParams.ideal.bank`, `SetupAttempt.payment_method_details.ideal.bank`, `SetupIntentConfirmParams.payment_method_data.ideal.bank`, `SetupIntentCreateParams.payment_method_data.ideal.bank`, and `SetupIntentUpdateParams.payment_method_data.ideal.bank`
7
+ * Add support for new value `NNBANL2G` on enums `Charge.payment_method_details.ideal.bic`, `PaymentMethod.ideal.bic`, and `SetupAttempt.payment_method_details.ideal.bic`
8
+ * Change `CustomerSession.components.buy_button`, `CustomerSession.components.pricing_table`, and `Subscription.billing_cycle_anchor_config` to be required
9
+ * Add support for `issuer` on `InvoiceCreateParams`, `InvoiceUpcomingLinesParams`, `InvoiceUpcomingParams`, `InvoiceUpdateParams`, and `Invoice`
10
+ * Add support for `liability` on `Invoice.automatic_tax`, `InvoiceCreateParams.automatic_tax`, `InvoiceUpcomingLinesParams.automatic_tax`, `InvoiceUpcomingParams.automatic_tax`, `InvoiceUpdateParams.automatic_tax`, `Subscription.automatic_tax`, `SubscriptionCreateParams.automatic_tax`, and `SubscriptionUpdateParams.automatic_tax`
11
+ * Add support for `on_behalf_of` on `InvoiceUpcomingLinesParams` and `InvoiceUpcomingParams`
12
+ * Add support for `pin` on `Issuing.CardCreateParams`
13
+ * Add support for `revocation_reason` on `Mandate.payment_method_details.bacs_debit`
14
+ * Add support for `customer_balance` on `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, and `PaymentMethodConfiguration`
15
+ * Add support for `invoice_settings` on `SubscriptionCreateParams` and `SubscriptionUpdateParams`
16
+ * [#1992](https://github.com/stripe/stripe-node/pull/1992) Add a hint about formatting during request forwarding
17
+
3
18
  ## 14.12.0 - 2024-01-12
4
19
  * [#1990](https://github.com/stripe/stripe-node/pull/1990) Update generated code
5
20
  * Add support for new resource `CustomerSession`
package/VERSION CHANGED
@@ -1 +1 @@
1
- 14.12.0
1
+ 14.13.0
package/cjs/Webhooks.js CHANGED
@@ -149,6 +149,8 @@ function createWebhooks(platformFunctions) {
149
149
  throw new Error_js_1.StripeSignatureVerificationError(header, payload, {
150
150
  message: 'No signatures found matching the expected signature for payload.' +
151
151
  ' Are you passing the raw request body you received from Stripe? \n' +
152
+ ' If a webhook request is being forwarded by a third-party tool,' +
153
+ ' ensure that the exact request body, including JSON formatting and new line style, is preserved.\n' +
152
154
  docsLocation +
153
155
  '\n' +
154
156
  whitespaceMessage,
@@ -34,7 +34,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
34
34
  ];
35
35
  const defaultRequestSenderFactory = (stripe) => new RequestSender_js_1.RequestSender(stripe, StripeResource_js_1.StripeResource.MAX_BUFFERED_REQUEST_METRICS);
36
36
  function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
37
- Stripe.PACKAGE_VERSION = '14.12.0';
37
+ Stripe.PACKAGE_VERSION = '14.13.0';
38
38
  Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, (0, utils_js_1.determineProcessUserAgentProperties)());
39
39
  Stripe.StripeResource = StripeResource_js_1.StripeResource;
40
40
  Stripe.resources = resources;
package/esm/Webhooks.js CHANGED
@@ -146,6 +146,8 @@ export function createWebhooks(platformFunctions) {
146
146
  throw new StripeSignatureVerificationError(header, payload, {
147
147
  message: 'No signatures found matching the expected signature for payload.' +
148
148
  ' Are you passing the raw request body you received from Stripe? \n' +
149
+ ' If a webhook request is being forwarded by a third-party tool,' +
150
+ ' ensure that the exact request body, including JSON formatting and new line style, is preserved.\n' +
149
151
  docsLocation +
150
152
  '\n' +
151
153
  whitespaceMessage,
@@ -31,7 +31,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
31
31
  ];
32
32
  const defaultRequestSenderFactory = (stripe) => new RequestSender(stripe, StripeResource.MAX_BUFFERED_REQUEST_METRICS);
33
33
  export function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
34
- Stripe.PACKAGE_VERSION = '14.12.0';
34
+ Stripe.PACKAGE_VERSION = '14.13.0';
35
35
  Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, determineProcessUserAgentProperties());
36
36
  Stripe.StripeResource = StripeResource;
37
37
  Stripe.resources = resources;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stripe",
3
- "version": "14.12.0",
3
+ "version": "14.13.0",
4
4
  "description": "Stripe API wrapper",
5
5
  "keywords": [
6
6
  "stripe",
@@ -674,7 +674,7 @@ declare module 'stripe' {
674
674
  registration_number?: string;
675
675
 
676
676
  /**
677
- * The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.
677
+ * The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
678
678
  */
679
679
  structure?: Stripe.Emptyable<Company.Structure>;
680
680
 
@@ -1369,7 +1369,12 @@ declare module 'stripe' {
1369
1369
  *
1370
1370
  * By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs.
1371
1371
  */
1372
- external_account?: string;
1372
+ external_account?: Stripe.Emptyable<
1373
+ | string
1374
+ | AccountUpdateParams.BankAccount
1375
+ | AccountUpdateParams.Card
1376
+ | AccountUpdateParams.CardToken
1377
+ >;
1373
1378
 
1374
1379
  /**
1375
1380
  * Information about the person represented by the account. This field is null unless `business_type` is set to `individual`.
@@ -1393,6 +1398,44 @@ declare module 'stripe' {
1393
1398
  }
1394
1399
 
1395
1400
  namespace AccountUpdateParams {
1401
+ interface BankAccount {
1402
+ object: 'bank_account';
1403
+
1404
+ /**
1405
+ * The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object.
1406
+ */
1407
+ account_holder_name?: string;
1408
+
1409
+ /**
1410
+ * The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
1411
+ */
1412
+ account_holder_type?: BankAccount.AccountHolderType;
1413
+
1414
+ /**
1415
+ * The account number for the bank account, in string form. Must be a checking account.
1416
+ */
1417
+ account_number: string;
1418
+
1419
+ /**
1420
+ * The country in which the bank account is located.
1421
+ */
1422
+ country: string;
1423
+
1424
+ /**
1425
+ * The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts)
1426
+ */
1427
+ currency?: string;
1428
+
1429
+ /**
1430
+ * The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required.
1431
+ */
1432
+ routing_number?: string;
1433
+ }
1434
+
1435
+ namespace BankAccount {
1436
+ type AccountHolderType = 'company' | 'individual';
1437
+ }
1438
+
1396
1439
  interface BusinessProfile {
1397
1440
  /**
1398
1441
  * [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
@@ -1908,6 +1951,49 @@ declare module 'stripe' {
1908
1951
  }
1909
1952
  }
1910
1953
 
1954
+ interface Card {
1955
+ object: 'card';
1956
+
1957
+ address_city?: string;
1958
+
1959
+ address_country?: string;
1960
+
1961
+ address_line1?: string;
1962
+
1963
+ address_line2?: string;
1964
+
1965
+ address_state?: string;
1966
+
1967
+ address_zip?: string;
1968
+
1969
+ currency?: string;
1970
+
1971
+ cvc?: string;
1972
+
1973
+ exp_month: number;
1974
+
1975
+ exp_year: number;
1976
+
1977
+ name?: string;
1978
+
1979
+ number: string;
1980
+
1981
+ /**
1982
+ * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
1983
+ */
1984
+ metadata?: Stripe.MetadataParam;
1985
+
1986
+ default_for_currency?: boolean;
1987
+ }
1988
+
1989
+ interface CardToken {
1990
+ object: 'card';
1991
+
1992
+ currency?: string;
1993
+
1994
+ token: string;
1995
+ }
1996
+
1911
1997
  interface Company {
1912
1998
  /**
1913
1999
  * The company's primary address.
@@ -1980,7 +2066,7 @@ declare module 'stripe' {
1980
2066
  registration_number?: string;
1981
2067
 
1982
2068
  /**
1983
- * The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.
2069
+ * The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
1984
2070
  */
1985
2071
  structure?: Stripe.Emptyable<Company.Structure>;
1986
2072
 
@@ -2593,7 +2679,11 @@ declare module 'stripe' {
2593
2679
  /**
2594
2680
  * Please refer to full [documentation](https://stripe.com/docs/api) instead.
2595
2681
  */
2596
- external_account: string;
2682
+ external_account:
2683
+ | string
2684
+ | ExternalAccountCreateParams.Card
2685
+ | ExternalAccountCreateParams.BankAccount
2686
+ | ExternalAccountCreateParams.CardToken;
2597
2687
 
2598
2688
  /**
2599
2689
  * When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency.
@@ -2611,6 +2701,87 @@ declare module 'stripe' {
2611
2701
  metadata?: Stripe.MetadataParam;
2612
2702
  }
2613
2703
 
2704
+ namespace ExternalAccountCreateParams {
2705
+ interface BankAccount {
2706
+ object: 'bank_account';
2707
+
2708
+ /**
2709
+ * The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object.
2710
+ */
2711
+ account_holder_name?: string;
2712
+
2713
+ /**
2714
+ * The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
2715
+ */
2716
+ account_holder_type?: BankAccount.AccountHolderType;
2717
+
2718
+ /**
2719
+ * The account number for the bank account, in string form. Must be a checking account.
2720
+ */
2721
+ account_number: string;
2722
+
2723
+ /**
2724
+ * The country in which the bank account is located.
2725
+ */
2726
+ country: string;
2727
+
2728
+ /**
2729
+ * The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts)
2730
+ */
2731
+ currency?: string;
2732
+
2733
+ /**
2734
+ * The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required.
2735
+ */
2736
+ routing_number?: string;
2737
+ }
2738
+
2739
+ namespace BankAccount {
2740
+ type AccountHolderType = 'company' | 'individual';
2741
+ }
2742
+
2743
+ interface Card {
2744
+ object: 'card';
2745
+
2746
+ address_city?: string;
2747
+
2748
+ address_country?: string;
2749
+
2750
+ address_line1?: string;
2751
+
2752
+ address_line2?: string;
2753
+
2754
+ address_state?: string;
2755
+
2756
+ address_zip?: string;
2757
+
2758
+ currency?: string;
2759
+
2760
+ cvc?: string;
2761
+
2762
+ exp_month: number;
2763
+
2764
+ exp_year: number;
2765
+
2766
+ name?: string;
2767
+
2768
+ number: string;
2769
+
2770
+ /**
2771
+ * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
2772
+ */
2773
+ metadata?: Stripe.MetadataParam;
2774
+ }
2775
+
2776
+ interface CardToken {
2777
+ object: 'card';
2778
+
2779
+ currency?: string;
2780
+
2781
+ token: string;
2782
+ }
2783
+ }
2784
+
2614
2785
  interface LoginLinkCreateParams {
2615
2786
  /**
2616
2787
  * Specifies which fields in the response should be expanded.
@@ -1372,7 +1372,7 @@ declare module 'stripe' {
1372
1372
 
1373
1373
  interface Ideal {
1374
1374
  /**
1375
- * The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
1375
+ * The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
1376
1376
  */
1377
1377
  bank: Ideal.Bank | null;
1378
1378
 
@@ -1413,6 +1413,7 @@ declare module 'stripe' {
1413
1413
  | 'knab'
1414
1414
  | 'moneyou'
1415
1415
  | 'n26'
1416
+ | 'nn'
1416
1417
  | 'rabobank'
1417
1418
  | 'regiobank'
1418
1419
  | 'revolut'
@@ -1431,6 +1432,7 @@ declare module 'stripe' {
1431
1432
  | 'INGBNL2A'
1432
1433
  | 'KNABNL2H'
1433
1434
  | 'MOYONL21'
1435
+ | 'NNBANL2G'
1434
1436
  | 'NTSBDEB1'
1435
1437
  | 'RABONL2U'
1436
1438
  | 'RBRBNL21'
@@ -50,12 +50,12 @@ declare module 'stripe' {
50
50
  /**
51
51
  * This hash contains whether the buy button is enabled.
52
52
  */
53
- buy_button?: Components.BuyButton;
53
+ buy_button: Components.BuyButton;
54
54
 
55
55
  /**
56
56
  * This hash contains whether the pricing table is enabled.
57
57
  */
58
- pricing_table?: Components.PricingTable;
58
+ pricing_table: Components.PricingTable;
59
59
  }
60
60
 
61
61
  namespace Components {