stripe 18.1.1 → 18.2.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 (99) hide show
  1. package/CHANGELOG.md +66 -32
  2. package/OPENAPI_VERSION +1 -1
  3. package/VERSION +1 -1
  4. package/cjs/apiVersion.js +1 -1
  5. package/cjs/resources/Invoices.js +4 -0
  6. package/cjs/resources/Terminal/Readers.js +4 -0
  7. package/cjs/resources/TestHelpers/Terminal/Readers.js +8 -0
  8. package/cjs/stripe.core.js +1 -1
  9. package/esm/apiVersion.js +1 -1
  10. package/esm/resources/Invoices.js +4 -0
  11. package/esm/resources/Terminal/Readers.js +4 -0
  12. package/esm/resources/TestHelpers/Terminal/Readers.js +8 -0
  13. package/esm/stripe.core.js +1 -1
  14. package/package.json +1 -1
  15. package/types/AccountSessions.d.ts +65 -0
  16. package/types/AccountSessionsResource.d.ts +77 -0
  17. package/types/Accounts.d.ts +22 -15
  18. package/types/AccountsResource.d.ts +79 -55
  19. package/types/Balance.d.ts +83 -1
  20. package/types/BalanceResource.d.ts +1 -1
  21. package/types/BalanceTransactions.d.ts +10 -0
  22. package/types/BankAccounts.d.ts +3 -3
  23. package/types/Billing/Alerts.d.ts +1 -1
  24. package/types/Billing/AlertsResource.d.ts +2 -2
  25. package/types/BillingPortal/Sessions.d.ts +1 -1
  26. package/types/Capabilities.d.ts +1 -1
  27. package/types/Cards.d.ts +2 -2
  28. package/types/Charges.d.ts +20 -0
  29. package/types/ChargesResource.d.ts +4 -4
  30. package/types/Checkout/Sessions.d.ts +120 -105
  31. package/types/Checkout/SessionsResource.d.ts +117 -108
  32. package/types/ConfirmationTokens.d.ts +4 -4
  33. package/types/CountrySpecs.d.ts +1 -1
  34. package/types/CreditNotes.d.ts +13 -3
  35. package/types/CreditNotesResource.d.ts +7 -8
  36. package/types/CustomerSessions.d.ts +3 -3
  37. package/types/CustomersResource.d.ts +7 -7
  38. package/types/Disputes.d.ts +1 -1
  39. package/types/DisputesResource.d.ts +1 -1
  40. package/types/EventTypes.d.ts +17 -0
  41. package/types/Events.d.ts +4 -0
  42. package/types/Files.d.ts +1 -1
  43. package/types/FilesResource.d.ts +1 -1
  44. package/types/Identity/VerificationReports.d.ts +17 -0
  45. package/types/Identity/VerificationSessions.d.ts +19 -2
  46. package/types/Identity/VerificationSessionsResource.d.ts +5 -5
  47. package/types/InvoiceItems.d.ts +1 -1
  48. package/types/InvoiceLineItems.d.ts +1 -1
  49. package/types/InvoicePayments.d.ts +9 -2
  50. package/types/Invoices.d.ts +7 -6
  51. package/types/InvoicesResource.d.ts +88 -11
  52. package/types/Issuing/AuthorizationsResource.d.ts +4 -4
  53. package/types/Issuing/CardsResource.d.ts +3 -0
  54. package/types/Issuing/DisputesResource.d.ts +2 -2
  55. package/types/LineItems.d.ts +2 -2
  56. package/types/PaymentIntents.d.ts +143 -128
  57. package/types/PaymentIntentsResource.d.ts +492 -441
  58. package/types/PaymentMethodConfigurations.d.ts +180 -0
  59. package/types/PaymentMethodConfigurationsResource.d.ts +254 -4
  60. package/types/PaymentMethodDomainsResource.d.ts +1 -1
  61. package/types/PaymentMethods.d.ts +4 -4
  62. package/types/PaymentMethodsResource.d.ts +8 -8
  63. package/types/Payouts.d.ts +2 -2
  64. package/types/PayoutsResource.d.ts +2 -2
  65. package/types/Persons.d.ts +10 -10
  66. package/types/PlansResource.d.ts +1 -1
  67. package/types/PricesResource.d.ts +2 -2
  68. package/types/ProductsResource.d.ts +1 -1
  69. package/types/PromotionCodesResource.d.ts +1 -1
  70. package/types/Quotes.d.ts +6 -6
  71. package/types/Radar/EarlyFraudWarningsResource.d.ts +1 -1
  72. package/types/Refunds.d.ts +6 -1
  73. package/types/Reviews.d.ts +1 -1
  74. package/types/SetupAttempts.d.ts +1 -0
  75. package/types/SetupIntents.d.ts +2 -1
  76. package/types/SetupIntentsResource.d.ts +3 -3
  77. package/types/SourcesResource.d.ts +1 -1
  78. package/types/SubscriptionItems.d.ts +14 -0
  79. package/types/SubscriptionItemsResource.d.ts +28 -0
  80. package/types/SubscriptionSchedules.d.ts +47 -1
  81. package/types/SubscriptionSchedulesResource.d.ts +99 -3
  82. package/types/Subscriptions.d.ts +19 -2
  83. package/types/SubscriptionsResource.d.ts +76 -14
  84. package/types/Tax/CalculationLineItems.d.ts +5 -0
  85. package/types/Tax/CalculationsResource.d.ts +5 -0
  86. package/types/Tax/RegistrationsResource.d.ts +1 -1
  87. package/types/TaxRates.d.ts +2 -2
  88. package/types/Terminal/LocationsResource.d.ts +1 -1
  89. package/types/Terminal/Readers.d.ts +219 -1
  90. package/types/Terminal/ReadersResource.d.ts +144 -0
  91. package/types/TestHelpers/Terminal/ReadersResource.d.ts +53 -0
  92. package/types/Tokens.d.ts +3 -3
  93. package/types/TokensResource.d.ts +8 -8
  94. package/types/TransferReversals.d.ts +1 -1
  95. package/types/TransfersResource.d.ts +2 -2
  96. package/types/Treasury/ReceivedCredits.d.ts +2 -2
  97. package/types/WebhookEndpointsResource.d.ts +4 -1
  98. package/types/lib.d.ts +1 -1
  99. package/types/test/typescriptTest.ts +3 -3
@@ -5,11 +5,11 @@ declare module 'stripe' {
5
5
  /**
6
6
  * These bank accounts are payment methods on `Customer` objects.
7
7
  *
8
- * On the other hand [External Accounts](https://stripe.com/api#external_accounts) are transfer
8
+ * On the other hand [External Accounts](https://docs.stripe.com/api#external_accounts) are transfer
9
9
  * destinations on `Account` objects for connected accounts.
10
10
  * They can be bank accounts or debit cards as well, and are documented in the links above.
11
11
  *
12
- * Related guide: [Bank debits and transfers](https://stripe.com/payments/bank-debits-transfers)
12
+ * Related guide: [Bank debits and transfers](https://docs.stripe.com/payments/bank-debits-transfers)
13
13
  */
14
14
  interface BankAccount {
15
15
  /**
@@ -23,7 +23,7 @@ declare module 'stripe' {
23
23
  object: 'bank_account';
24
24
 
25
25
  /**
26
- * The account this bank account belongs to. Only applicable on Accounts (not customers or recipients) This property is only available when returned as an [External Account](https://stripe.com/api/external_account_bank_accounts/object) where [controller.is_controller](https://stripe.com/api/accounts/object#account_object-controller-is_controller) is `true`.
26
+ * The account this bank account belongs to. Only applicable on Accounts (not customers or recipients) This property is only available when returned as an [External Account](https://docs.stripe.com/api/external_account_bank_accounts/object) where [controller.is_controller](https://docs.stripe.com/api/accounts/object#account_object-controller-is_controller) is `true`.
27
27
  */
28
28
  account?: string | Stripe.Account | null;
29
29
 
@@ -58,7 +58,7 @@ declare module 'stripe' {
58
58
  gte: number;
59
59
 
60
60
  /**
61
- * The [Billing Meter](https://stripe.com/api/billing/meter) ID whose usage is monitored.
61
+ * The [Billing Meter](https://docs.stripe.com/api/billing/meter) ID whose usage is monitored.
62
62
  */
63
63
  meter: string | Stripe.Billing.Meter;
64
64
 
@@ -38,9 +38,9 @@ declare module 'stripe' {
38
38
  gte: number;
39
39
 
40
40
  /**
41
- * The [Billing Meter](https://stripe.com/api/billing/meter) ID whose usage is monitored.
41
+ * The [Billing Meter](https://docs.stripe.com/api/billing/meter) ID whose usage is monitored.
42
42
  */
43
- meter?: string;
43
+ meter: string;
44
44
 
45
45
  /**
46
46
  * Whether the alert should only fire only once, or once per billing cycle.
@@ -17,7 +17,7 @@ declare module 'stripe' {
17
17
  * Create sessions on-demand when customers intend to manage their subscriptions
18
18
  * and billing details.
19
19
  *
20
- * Related guide: [Customer management](https://stripe.com/customer-management)
20
+ * Related guide: [Customer management](https://docs.stripe.com/customer-management)
21
21
  */
22
22
  interface Session {
23
23
  /**
@@ -235,7 +235,7 @@ declare module 'stripe' {
235
235
  alternatives: Array<Requirements.Alternative> | null;
236
236
 
237
237
  /**
238
- * Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected.
238
+ * The date by which all required account information must be both submitted and verified. This includes fields listed in `currently_due` as well as those in `pending_verification`. If any required information is missing or unverified by this date, the account may be disabled. Note that `current_deadline` may change if additional `currently_due` requirements are requested.
239
239
  */
240
240
  current_deadline: number | null;
241
241
 
package/types/Cards.d.ts CHANGED
@@ -83,7 +83,7 @@ declare module 'stripe' {
83
83
  country: string | null;
84
84
 
85
85
  /**
86
- * Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available when returned as an [External Account](https://stripe.com/api/external_account_cards/object) where [controller.is_controller](https://stripe.com/api/accounts/object#account_object-controller-is_controller) is `true`.
86
+ * Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available when returned as an [External Account](https://docs.stripe.com/api/external_account_cards/object) where [controller.is_controller](https://docs.stripe.com/api/accounts/object#account_object-controller-is_controller) is `true`.
87
87
  */
88
88
  currency?: string | null;
89
89
 
@@ -98,7 +98,7 @@ declare module 'stripe' {
98
98
  cvc_check: string | null;
99
99
 
100
100
  /**
101
- * Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
101
+ * Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
102
102
  */
103
103
  default_for_currency?: boolean | null;
104
104
 
@@ -598,6 +598,16 @@ declare module 'stripe' {
598
598
  }
599
599
 
600
600
  interface Affirm {
601
+ /**
602
+ * ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to.
603
+ */
604
+ location?: string;
605
+
606
+ /**
607
+ * ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on.
608
+ */
609
+ reader?: string;
610
+
601
611
  /**
602
612
  * The Affirm transaction ID associated with this payment.
603
613
  */
@@ -2347,6 +2357,16 @@ declare module 'stripe' {
2347
2357
  */
2348
2358
  fingerprint: string | null;
2349
2359
 
2360
+ /**
2361
+ * ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to.
2362
+ */
2363
+ location?: string;
2364
+
2365
+ /**
2366
+ * ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on.
2367
+ */
2368
+ reader?: string;
2369
+
2350
2370
  /**
2351
2371
  * Transaction ID of this particular WeChat Pay transaction.
2352
2372
  */
@@ -353,7 +353,7 @@ declare module 'stripe' {
353
353
 
354
354
  class ChargesResource {
355
355
  /**
356
- * This method is no longer recommended—use the [Payment Intents API](https://stripe.com/docs/api/payment_intents)
356
+ * This method is no longer recommended—use the [Payment Intents API](https://docs.stripe.com/docs/api/payment_intents)
357
357
  * to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge
358
358
  * object used to request payment.
359
359
  */
@@ -397,9 +397,9 @@ declare module 'stripe' {
397
397
  /**
398
398
  * Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
399
399
  *
400
- * Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
400
+ * Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
401
401
  *
402
- * Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture).
402
+ * Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture).
403
403
  */
404
404
  capture(
405
405
  id: string,
@@ -412,7 +412,7 @@ declare module 'stripe' {
412
412
  ): Promise<Stripe.Response<Stripe.Charge>>;
413
413
 
414
414
  /**
415
- * Search for charges you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
415
+ * Search for charges you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language).
416
416
  * Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
417
417
  * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
418
418
  * to an hour behind during outages. Search functionality is not available to merchants in India.