stripe 8.217.0 → 8.220.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/VERSION +1 -1
  3. package/lib/resources/Customers.js +15 -0
  4. package/lib/resources/Terminal/Configurations.js +36 -0
  5. package/lib/resources/TestHelpers/Refunds.js +15 -0
  6. package/lib/resources.js +2 -0
  7. package/package.json +2 -2
  8. package/types/2020-08-27/Applications.d.ts +27 -0
  9. package/types/2020-08-27/BillingPortal/Configurations.d.ts +5 -1
  10. package/types/2020-08-27/CashBalances.d.ts +83 -0
  11. package/types/2020-08-27/Charges.d.ts +5 -1
  12. package/types/2020-08-27/Checkout/Sessions.d.ts +18 -5
  13. package/types/2020-08-27/Customers.d.ts +145 -1
  14. package/types/2020-08-27/FundingInstructions.d.ts +80 -0
  15. package/types/2020-08-27/InvoiceLineItems.d.ts +2 -1
  16. package/types/2020-08-27/Invoices.d.ts +13 -2
  17. package/types/2020-08-27/Issuing/Disputes.d.ts +9 -6
  18. package/types/2020-08-27/PaymentIntents.d.ts +291 -4
  19. package/types/2020-08-27/PaymentMethods.d.ts +14 -0
  20. package/types/2020-08-27/Plans.d.ts +1 -1
  21. package/types/2020-08-27/Prices.d.ts +1 -1
  22. package/types/2020-08-27/Products.d.ts +3 -3
  23. package/types/2020-08-27/Quotes.d.ts +9 -0
  24. package/types/2020-08-27/ShippingRates.d.ts +2 -2
  25. package/types/2020-08-27/SubscriptionSchedules.d.ts +9 -0
  26. package/types/2020-08-27/Subscriptions.d.ts +9 -0
  27. package/types/2020-08-27/TaxCodes.d.ts +1 -1
  28. package/types/2020-08-27/TaxIds.d.ts +4 -2
  29. package/types/2020-08-27/Terminal/Configurations.d.ts +1075 -0
  30. package/types/2020-08-27/Terminal/Locations.d.ts +15 -0
  31. package/types/2020-08-27/TestHelpers/Refunds.d.ts +29 -0
  32. package/types/2020-08-27/index.d.ts +6 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 8.220.0 - 2022-05-03
4
+ * [#1407](https://github.com/stripe/stripe-node/pull/1407) API Updates
5
+ * Add support for new resource `CashBalance`
6
+ * Change type of `BillingPortal.Configuration.application` from `$Application` to `deletable($Application)`
7
+ * Add support for `alipay` on `Checkout.Session.payment_method_options` and `CheckoutSessionCreateParams.payment_method_options`
8
+ * Change type of `CheckoutSessionCreateParams.payment_method_options.konbini.expires_after_days` from `emptyStringable(integer)` to `integer`
9
+ * Add support for new value `eu_oss_vat` on enums `Checkout.Session.customer_details.tax_ids[].type`, `Invoice.customer_tax_ids[].type`, and `TaxId.type`
10
+ * Add support for new value `eu_oss_vat` on enums `CustomerCreateParams.tax_id_data[].type`, `InvoiceUpcomingLinesParams.customer_details.tax_ids[].type`, `InvoiceUpcomingParams.customer_details.tax_ids[].type`, and `TaxIdCreateParams.type`
11
+ * Add support for `cash_balance` on `Customer`
12
+ * Add support for `application` on `Invoice`, `Quote`, `SubscriptionSchedule`, and `Subscription`
13
+ * [#1403](https://github.com/stripe/stripe-node/pull/1403) Add tests for specifying a custom host on StripeMethod.
14
+
15
+ ## 8.219.0 - 2022-04-21
16
+ * [#1398](https://github.com/stripe/stripe-node/pull/1398) API Updates
17
+ * Add support for `expire` test helper method on resource `Refund`
18
+ * Change type of `BillingPortal.Configuration.application` from `string` to `expandable($Application)`
19
+ * Change `IssuingDisputeCreateParams.transaction` to be optional
20
+
21
+ ## 8.218.0 - 2022-04-18
22
+ * [#1396](https://github.com/stripe/stripe-node/pull/1396) API Updates
23
+ * Add support for new resources `FundingInstructions` and `Terminal.Configuration`
24
+ * Add support for `create_funding_instructions` method on resource `Customer`
25
+ * Add support for new value `customer_balance` as a payment method `type`.
26
+ * Add support for `customer_balance` on `Charge.payment_method_details`, `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`, `PaymentMethodCreateParams`, and `PaymentMethod`
27
+ * Add support for `cash_balance` on `CustomerCreateParams` and `CustomerUpdateParams`
28
+ * Add support for `amount_details` on `PaymentIntent`
29
+ * Add support for `display_bank_transfer_instructions` on `PaymentIntent.next_action`
30
+ * Add support for `configuration_overrides` on `Terminal.Location`, `TerminalLocationCreateParams`, and `TerminalLocationUpdateParams`
31
+
3
32
  ## 8.217.0 - 2022-04-13
4
33
  * [#1395](https://github.com/stripe/stripe-node/pull/1395) API Updates
5
34
  * Add support for `increment_authorization` method on resource `PaymentIntent`
package/VERSION CHANGED
@@ -1 +1 @@
1
- 8.217.0
1
+ 8.220.0
@@ -34,6 +34,11 @@ module.exports = StripeResource.extend({
34
34
  path: '/{customer}',
35
35
  }),
36
36
 
37
+ createFundingInstructions: stripeMethod({
38
+ method: 'POST',
39
+ path: '/{customer}/funding_instructions',
40
+ }),
41
+
37
42
  deleteDiscount: stripeMethod({
38
43
  method: 'DELETE',
39
44
  path: '/{customer}/discount',
@@ -51,6 +56,16 @@ module.exports = StripeResource.extend({
51
56
  methodType: 'search',
52
57
  }),
53
58
 
59
+ retrieveCashBalance: stripeMethod({
60
+ method: 'GET',
61
+ path: '/{customer}/cash_balance',
62
+ }),
63
+
64
+ updateCashBalance: stripeMethod({
65
+ method: 'POST',
66
+ path: '/{customer}/cash_balance',
67
+ }),
68
+
54
69
  createBalanceTransaction: stripeMethod({
55
70
  method: 'POST',
56
71
  path: '/{customer}/balance_transactions',
@@ -0,0 +1,36 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ 'use strict';
4
+
5
+ const StripeResource = require('../../StripeResource');
6
+ const stripeMethod = StripeResource.method;
7
+
8
+ module.exports = StripeResource.extend({
9
+ path: 'terminal/configurations',
10
+
11
+ create: stripeMethod({
12
+ method: 'POST',
13
+ path: '',
14
+ }),
15
+
16
+ retrieve: stripeMethod({
17
+ method: 'GET',
18
+ path: '/{configuration}',
19
+ }),
20
+
21
+ update: stripeMethod({
22
+ method: 'POST',
23
+ path: '/{configuration}',
24
+ }),
25
+
26
+ list: stripeMethod({
27
+ method: 'GET',
28
+ path: '',
29
+ methodType: 'list',
30
+ }),
31
+
32
+ del: stripeMethod({
33
+ method: 'DELETE',
34
+ path: '/{configuration}',
35
+ }),
36
+ });
@@ -0,0 +1,15 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ 'use strict';
4
+
5
+ const StripeResource = require('../../StripeResource');
6
+ const stripeMethod = StripeResource.method;
7
+
8
+ module.exports = StripeResource.extend({
9
+ path: 'test_helpers/refunds',
10
+
11
+ expire: stripeMethod({
12
+ method: 'POST',
13
+ path: '/{refund}/expire',
14
+ }),
15
+ });
package/lib/resources.js CHANGED
@@ -87,11 +87,13 @@ module.exports = {
87
87
  ScheduledQueryRuns: require('./resources/Sigma/ScheduledQueryRuns'),
88
88
  }),
89
89
  Terminal: resourceNamespace('terminal', {
90
+ Configurations: require('./resources/Terminal/Configurations'),
90
91
  ConnectionTokens: require('./resources/Terminal/ConnectionTokens'),
91
92
  Locations: require('./resources/Terminal/Locations'),
92
93
  Readers: require('./resources/Terminal/Readers'),
93
94
  }),
94
95
  TestHelpers: resourceNamespace('testHelpers', {
96
+ Refunds: require('./resources/TestHelpers/Refunds'),
95
97
  TestClocks: require('./resources/TestHelpers/TestClocks'),
96
98
  Terminal: resourceNamespace('terminal', {
97
99
  Readers: require('./resources/TestHelpers/Terminal/Readers'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stripe",
3
- "version": "8.217.0",
3
+ "version": "8.220.0",
4
4
  "description": "Stripe API wrapper",
5
5
  "keywords": [
6
6
  "stripe",
@@ -57,7 +57,7 @@
57
57
  "clean": "rm -rf ./.nyc_output ./node_modules/.cache ./coverage",
58
58
  "mocha": "nyc mocha --config=test/.mocharc.js",
59
59
  "mocha-only": "mocha --config=test/.mocharc.js",
60
- "test": "yarn lint && yarn test-typescript && yarn mocha",
60
+ "test": "yarn test-typescript && yarn mocha",
61
61
  "test-typescript": "tsc --build types/test",
62
62
  "lint": "eslint --ext .js,.jsx,.ts .",
63
63
  "fix": "yarn lint --fix && ./scripts/updateAPIVersion.js",
@@ -16,6 +16,33 @@ declare module 'stripe' {
16
16
  */
17
17
  object: 'application';
18
18
 
19
+ deleted?: void;
20
+
21
+ /**
22
+ * The name of the application.
23
+ */
24
+ name: string | null;
25
+ }
26
+
27
+ /**
28
+ * The DeletedApplication object.
29
+ */
30
+ interface DeletedApplication {
31
+ /**
32
+ * Unique identifier for the object.
33
+ */
34
+ id: string;
35
+
36
+ /**
37
+ * String representing the object's type. Objects of the same type share the same value.
38
+ */
39
+ object: 'application';
40
+
41
+ /**
42
+ * Always true for a deleted object
43
+ */
44
+ deleted: true;
45
+
19
46
  /**
20
47
  * The name of the application.
21
48
  */
@@ -25,7 +25,11 @@ declare module 'stripe' {
25
25
  /**
26
26
  * ID of the Connect Application that created the configuration.
27
27
  */
28
- application: string | null;
28
+ application:
29
+ | string
30
+ | Stripe.Application
31
+ | Stripe.DeletedApplication
32
+ | null;
29
33
 
30
34
  business_profile: Configuration.BusinessProfile;
31
35
 
@@ -0,0 +1,83 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ /**
6
+ * The CashBalance object.
7
+ */
8
+ interface CashBalance {
9
+ /**
10
+ * String representing the object's type. Objects of the same type share the same value.
11
+ */
12
+ object: 'cash_balance';
13
+
14
+ /**
15
+ * A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0.
16
+ */
17
+ available: {
18
+ [key: string]: number;
19
+ } | null;
20
+
21
+ /**
22
+ * The ID of the customer whose cash balance this object represents.
23
+ */
24
+ customer: string;
25
+
26
+ /**
27
+ * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
28
+ */
29
+ livemode: boolean;
30
+
31
+ settings: CashBalance.Settings;
32
+ }
33
+
34
+ namespace CashBalance {
35
+ interface Settings {
36
+ /**
37
+ * The configuration for how funds that land in the customer cash balance are reconciled.
38
+ */
39
+ reconciliation_mode: Settings.ReconciliationMode;
40
+ }
41
+
42
+ namespace Settings {
43
+ type ReconciliationMode = 'automatic' | 'manual';
44
+ }
45
+ }
46
+
47
+ interface CashBalanceRetrieveParams {
48
+ /**
49
+ * Specifies which fields in the response should be expanded.
50
+ */
51
+ expand?: Array<string>;
52
+ }
53
+
54
+ interface CashBalanceUpdateParams {
55
+ /**
56
+ * Specifies which fields in the response should be expanded.
57
+ */
58
+ expand?: Array<string>;
59
+
60
+ settings?: CashBalanceUpdateParams.Settings;
61
+ }
62
+
63
+ namespace CashBalanceUpdateParams {
64
+ interface Settings {
65
+ /**
66
+ * Method for using the customer balance to pay outstanding
67
+ * `customer_balance` PaymentIntents. If set to `automatic`, all available
68
+ * funds will automatically be used to pay any outstanding PaymentIntent.
69
+ * If set to `manual`, only customer balance funds from bank transfers
70
+ * with a reference code matching
71
+ * `payment_intent.next_action.display_bank_transfer_intructions.reference_code` will
72
+ * automatically be used to pay the corresponding outstanding
73
+ * PaymentIntent.
74
+ */
75
+ reconciliation_mode?: Settings.ReconciliationMode;
76
+ }
77
+
78
+ namespace Settings {
79
+ type ReconciliationMode = 'automatic' | 'manual';
80
+ }
81
+ }
82
+ }
83
+ }
@@ -409,6 +409,8 @@ declare module 'stripe' {
409
409
 
410
410
  card_present?: PaymentMethodDetails.CardPresent;
411
411
 
412
+ customer_balance?: PaymentMethodDetails.CustomerBalance;
413
+
412
414
  eps?: PaymentMethodDetails.Eps;
413
415
 
414
416
  fpx?: PaymentMethodDetails.Fpx;
@@ -1007,7 +1009,7 @@ declare module 'stripe' {
1007
1009
  iin?: string | null;
1008
1010
 
1009
1011
  /**
1010
- * Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support] /docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support.
1012
+ * Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support).
1011
1013
  */
1012
1014
  incremental_authorization_supported: boolean | null;
1013
1015
 
@@ -1102,6 +1104,8 @@ declare module 'stripe' {
1102
1104
  }
1103
1105
  }
1104
1106
 
1107
+ interface CustomerBalance {}
1108
+
1105
1109
  interface Eps {
1106
1110
  /**
1107
1111
  * The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
@@ -339,7 +339,7 @@ declare module 'stripe' {
339
339
 
340
340
  interface TaxId {
341
341
  /**
342
- * The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown`
342
+ * The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown`
343
343
  */
344
344
  type: TaxId.Type;
345
345
 
@@ -366,6 +366,7 @@ declare module 'stripe' {
366
366
  | 'ch_vat'
367
367
  | 'cl_tin'
368
368
  | 'es_cif'
369
+ | 'eu_oss_vat'
369
370
  | 'eu_vat'
370
371
  | 'gb_vat'
371
372
  | 'ge_vat'
@@ -448,6 +449,8 @@ declare module 'stripe' {
448
449
  interface PaymentMethodOptions {
449
450
  acss_debit?: PaymentMethodOptions.AcssDebit;
450
451
 
452
+ alipay?: PaymentMethodOptions.Alipay;
453
+
451
454
  boleto?: PaymentMethodOptions.Boleto;
452
455
 
453
456
  konbini?: PaymentMethodOptions.Konbini;
@@ -508,6 +511,8 @@ declare module 'stripe' {
508
511
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
509
512
  }
510
513
 
514
+ interface Alipay {}
515
+
511
516
  interface Boleto {
512
517
  /**
513
518
  * The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.
@@ -979,7 +984,8 @@ declare module 'stripe' {
979
984
  * When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout
980
985
  * with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details).
981
986
  *
982
- * Sessions that do not create Customers will instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) in the Dashboard.
987
+ * Sessions that don't create Customers instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq)
988
+ * in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions.
983
989
  *
984
990
  * Can only be set in `payment` and `setup` mode.
985
991
  */
@@ -1325,7 +1331,7 @@ declare module 'stripe' {
1325
1331
  name: string;
1326
1332
 
1327
1333
  /**
1328
- * A [tax code](https://stripe.com/docs/tax/tax-codes) ID.
1334
+ * A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
1329
1335
  */
1330
1336
  tax_code?: string;
1331
1337
  }
@@ -1536,6 +1542,11 @@ declare module 'stripe' {
1536
1542
  */
1537
1543
  acss_debit?: PaymentMethodOptions.AcssDebit;
1538
1544
 
1545
+ /**
1546
+ * contains details about the Alipay payment method options.
1547
+ */
1548
+ alipay?: PaymentMethodOptions.Alipay;
1549
+
1539
1550
  /**
1540
1551
  * contains details about the Boleto payment method options.
1541
1552
  */
@@ -1623,6 +1634,8 @@ declare module 'stripe' {
1623
1634
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
1624
1635
  }
1625
1636
 
1637
+ interface Alipay {}
1638
+
1626
1639
  interface Boleto {
1627
1640
  /**
1628
1641
  * The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
@@ -1634,7 +1647,7 @@ declare module 'stripe' {
1634
1647
  /**
1635
1648
  * The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
1636
1649
  */
1637
- expires_after_days?: Stripe.Emptyable<number>;
1650
+ expires_after_days?: number;
1638
1651
  }
1639
1652
 
1640
1653
  interface Oxxo {
@@ -2009,7 +2022,7 @@ declare module 'stripe' {
2009
2022
  tax_behavior?: ShippingRateData.TaxBehavior;
2010
2023
 
2011
2024
  /**
2012
- * A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The Shipping tax code is `txcd_92010001`.
2025
+ * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
2013
2026
  */
2014
2027
  tax_code?: string;
2015
2028
 
@@ -26,6 +26,11 @@ declare module 'stripe' {
26
26
  */
27
27
  balance: number;
28
28
 
29
+ /**
30
+ * The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance".The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically.
31
+ */
32
+ cash_balance?: Stripe.CashBalance | null;
33
+
29
34
  /**
30
35
  * Time at which the object was created. Measured in seconds since the Unix epoch.
31
36
  */
@@ -277,6 +282,11 @@ declare module 'stripe' {
277
282
  */
278
283
  balance?: number;
279
284
 
285
+ /**
286
+ * Balance information and default balance settings for this customer.
287
+ */
288
+ cash_balance?: CustomerCreateParams.CashBalance;
289
+
280
290
  coupon?: string;
281
291
 
282
292
  /**
@@ -365,6 +375,34 @@ declare module 'stripe' {
365
375
  }
366
376
 
367
377
  namespace CustomerCreateParams {
378
+ interface CashBalance {
379
+ /**
380
+ * Settings controlling the behavior of the customer's cash balance,
381
+ * such as reconciliation of funds received.
382
+ */
383
+ settings?: CashBalance.Settings;
384
+ }
385
+
386
+ namespace CashBalance {
387
+ interface Settings {
388
+ /**
389
+ * Method for using the customer balance to pay outstanding
390
+ * `customer_balance` PaymentIntents. If set to `automatic`, all available
391
+ * funds will automatically be used to pay any outstanding PaymentIntent.
392
+ * If set to `manual`, only customer balance funds from bank transfers
393
+ * with a reference code matching
394
+ * `payment_intent.next_action.display_bank_transfer_intructions.reference_code` will
395
+ * automatically be used to pay the corresponding outstanding
396
+ * PaymentIntent.
397
+ */
398
+ reconciliation_mode?: Settings.ReconciliationMode;
399
+ }
400
+
401
+ namespace Settings {
402
+ type ReconciliationMode = 'automatic' | 'manual';
403
+ }
404
+ }
405
+
368
406
  interface InvoiceSettings {
369
407
  /**
370
408
  * Default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.
@@ -430,7 +468,7 @@ declare module 'stripe' {
430
468
 
431
469
  interface TaxIdDatum {
432
470
  /**
433
- * Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`
471
+ * Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`
434
472
  */
435
473
  type: TaxIdDatum.Type;
436
474
 
@@ -457,6 +495,7 @@ declare module 'stripe' {
457
495
  | 'ch_vat'
458
496
  | 'cl_tin'
459
497
  | 'es_cif'
498
+ | 'eu_oss_vat'
460
499
  | 'eu_vat'
461
500
  | 'gb_vat'
462
501
  | 'ge_vat'
@@ -508,6 +547,11 @@ declare module 'stripe' {
508
547
  */
509
548
  balance?: number;
510
549
 
550
+ /**
551
+ * Balance information and default balance settings for this customer.
552
+ */
553
+ cash_balance?: CustomerUpdateParams.CashBalance;
554
+
511
555
  coupon?: string;
512
556
 
513
557
  /**
@@ -598,6 +642,34 @@ declare module 'stripe' {
598
642
  }
599
643
 
600
644
  namespace CustomerUpdateParams {
645
+ interface CashBalance {
646
+ /**
647
+ * Settings controlling the behavior of the customer's cash balance,
648
+ * such as reconciliation of funds received.
649
+ */
650
+ settings?: CashBalance.Settings;
651
+ }
652
+
653
+ namespace CashBalance {
654
+ interface Settings {
655
+ /**
656
+ * Method for using the customer balance to pay outstanding
657
+ * `customer_balance` PaymentIntents. If set to `automatic`, all available
658
+ * funds will automatically be used to pay any outstanding PaymentIntent.
659
+ * If set to `manual`, only customer balance funds from bank transfers
660
+ * with a reference code matching
661
+ * `payment_intent.next_action.display_bank_transfer_intructions.reference_code` will
662
+ * automatically be used to pay the corresponding outstanding
663
+ * PaymentIntent.
664
+ */
665
+ reconciliation_mode?: Settings.ReconciliationMode;
666
+ }
667
+
668
+ namespace Settings {
669
+ type ReconciliationMode = 'automatic' | 'manual';
670
+ }
671
+ }
672
+
601
673
  interface InvoiceSettings {
602
674
  /**
603
675
  * Default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.
@@ -683,6 +755,44 @@ declare module 'stripe' {
683
755
 
684
756
  interface CustomerDeleteParams {}
685
757
 
758
+ interface CustomerCreateFundingInstructionsParams {
759
+ /**
760
+ * Additional parameters for `bank_transfer` funding types
761
+ */
762
+ bank_transfer: CustomerCreateFundingInstructionsParams.BankTransfer;
763
+
764
+ /**
765
+ * 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).
766
+ */
767
+ currency: string;
768
+
769
+ /**
770
+ * The `funding_type` to get the instructions for.
771
+ */
772
+ funding_type: 'bank_transfer';
773
+
774
+ /**
775
+ * Specifies which fields in the response should be expanded.
776
+ */
777
+ expand?: Array<string>;
778
+ }
779
+
780
+ namespace CustomerCreateFundingInstructionsParams {
781
+ interface BankTransfer {
782
+ /**
783
+ * List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
784
+ *
785
+ * Permitted values include: `zengin`.
786
+ */
787
+ requested_address_types?: Array<'zengin'>;
788
+
789
+ /**
790
+ * The type of the `bank_transfer`
791
+ */
792
+ type: 'jp_bank_transfer';
793
+ }
794
+ }
795
+
686
796
  interface CustomerDeleteDiscountParams {}
687
797
 
688
798
  interface CustomerListPaymentMethodsParams extends PaginationParams {
@@ -708,6 +818,7 @@ declare module 'stripe' {
708
818
  | 'boleto'
709
819
  | 'card'
710
820
  | 'card_present'
821
+ | 'customer_balance'
711
822
  | 'eps'
712
823
  | 'fpx'
713
824
  | 'giropay'
@@ -804,6 +915,17 @@ declare module 'stripe' {
804
915
  options?: RequestOptions
805
916
  ): Promise<Stripe.Response<Stripe.DeletedCustomer>>;
806
917
 
918
+ /**
919
+ * Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new
920
+ * funding instructions will be created. If funding instructions have already been created for a given customer, the same
921
+ * funding instructions will be retrieved. In other words, we will return the same funding instructions each time.
922
+ */
923
+ createFundingInstructions(
924
+ id: string,
925
+ params: CustomerCreateFundingInstructionsParams,
926
+ options?: RequestOptions
927
+ ): Promise<Stripe.Response<Stripe.FundingInstructions>>;
928
+
807
929
  /**
808
930
  * Removes the currently applied discount on a customer.
809
931
  */
@@ -837,6 +959,28 @@ declare module 'stripe' {
837
959
  options?: RequestOptions
838
960
  ): ApiSearchResultPromise<Stripe.Customer>;
839
961
 
962
+ /**
963
+ * Retrieves a customer's cash balance.
964
+ */
965
+ retrieveCashBalance(
966
+ id: string,
967
+ params?: CashBalanceRetrieveParams,
968
+ options?: RequestOptions
969
+ ): Promise<Stripe.Response<Stripe.CashBalance>>;
970
+ retrieveCashBalance(
971
+ id: string,
972
+ options?: RequestOptions
973
+ ): Promise<Stripe.Response<Stripe.CashBalance>>;
974
+
975
+ /**
976
+ * Updates a customer's cash balance.
977
+ */
978
+ updateCashBalance(
979
+ id: string,
980
+ params?: CashBalanceUpdateParams,
981
+ options?: RequestOptions
982
+ ): Promise<Stripe.Response<Stripe.CashBalance>>;
983
+
840
984
  /**
841
985
  * Creates an immutable transaction that updates the customer's credit [balance](https://stripe.com/docs/billing/customer/balance).
842
986
  */