stripe 14.2.0 → 14.3.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 (43) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/VERSION +1 -1
  3. package/cjs/resources/Tax/Registrations.js +18 -0
  4. package/cjs/resources.js +2 -0
  5. package/cjs/stripe.core.js +1 -1
  6. package/esm/resources/Tax/Registrations.js +15 -0
  7. package/esm/resources.js +2 -0
  8. package/esm/stripe.core.js +1 -1
  9. package/package.json +1 -1
  10. package/types/Accounts.d.ts +7 -0
  11. package/types/AccountsResource.d.ts +24 -0
  12. package/types/BalanceTransactions.d.ts +2 -1
  13. package/types/BalanceTransactionsResource.d.ts +1 -1
  14. package/types/BankAccounts.d.ts +2 -2
  15. package/types/BillingPortal/Configurations.d.ts +1 -1
  16. package/types/BillingPortal/ConfigurationsResource.d.ts +2 -2
  17. package/types/Cards.d.ts +1 -1
  18. package/types/Charges.d.ts +9 -5
  19. package/types/Checkout/Sessions.d.ts +4 -0
  20. package/types/Checkout/SessionsResource.d.ts +23 -2
  21. package/types/CustomerCashBalanceTransactions.d.ts +1 -0
  22. package/types/CustomersResource.d.ts +1 -0
  23. package/types/ExchangeRates.d.ts +25 -10
  24. package/types/FundingInstructions.d.ts +60 -2
  25. package/types/Invoices.d.ts +1 -0
  26. package/types/Issuing/Authorizations.d.ts +48 -0
  27. package/types/Issuing/Transactions.d.ts +5 -0
  28. package/types/Mandates.d.ts +1 -1
  29. package/types/PaymentIntents.d.ts +66 -3
  30. package/types/PaymentIntentsResource.d.ts +84 -0
  31. package/types/PaymentLinks.d.ts +5 -0
  32. package/types/PaymentLinksResource.d.ts +10 -0
  33. package/types/PaymentMethods.d.ts +7 -2
  34. package/types/PaymentMethodsResource.d.ts +9 -0
  35. package/types/Reporting/ReportRunsResource.d.ts +2 -1
  36. package/types/SetupAttempts.d.ts +1 -0
  37. package/types/SetupIntents.d.ts +1 -0
  38. package/types/SetupIntentsResource.d.ts +24 -0
  39. package/types/Tax/Registrations.d.ts +1010 -0
  40. package/types/Tax/RegistrationsResource.d.ts +1284 -0
  41. package/types/TestHelpers/Issuing/AuthorizationsResource.d.ts +48 -0
  42. package/types/TestHelpers/Issuing/TransactionsResource.d.ts +10 -0
  43. package/types/index.d.ts +3 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 14.3.0 - 2023-11-02
4
+ * [#1943](https://github.com/stripe/stripe-node/pull/1943) Update generated code
5
+ * Add support for new resource `Tax.Registration`
6
+ * Add support for `create`, `list`, and `update` methods on resource `Registration`
7
+ * Add support for `revolut_pay_payments` on `Account` APIs.
8
+ * Add support for new value `token_card_network_invalid` on error code enums.
9
+ * Add support for new value `payment_unreconciled` on enum `BalanceTransaction.type`
10
+ * Add support for `revolut_pay` throughout the API.
11
+ * Change `.paypal.payer_email` to be required in several locations.
12
+ * Add support for `aba` and `swift` on `FundingInstructions.bank_transfer.financial_addresses[]` and `PaymentIntent.next_action.display_bank_transfer_instructions.financial_addresses[]`
13
+ * Add support for new values `ach`, `domestic_wire_us`, and `swift` on enums `FundingInstructions.bank_transfer.financial_addresses[].supported_networks[]` and `PaymentIntent.next_action.display_bank_transfer_instructions.financial_addresses[].supported_networks[]`
14
+ * Add support for new values `aba` and `swift` on enums `FundingInstructions.bank_transfer.financial_addresses[].type` and `PaymentIntent.next_action.display_bank_transfer_instructions.financial_addresses[].type`
15
+ * Add support for `url` on `Issuing.Authorization.merchant_data`, `Issuing.AuthorizationCreateParams.testHelpers.merchant_data`, `Issuing.Transaction.merchant_data`, `Issuing.TransactionCreateForceCaptureParams.testHelpers.merchant_data`, and `Issuing.TransactionCreateUnlinkedRefundParams.testHelpers.merchant_data`
16
+ * Add support for `authentication_exemption` and `three_d_secure` on `Issuing.Authorization.verification_data` and `Issuing.AuthorizationCreateParams.testHelpers.verification_data`
17
+ * Add support for `description` on `PaymentLink.payment_intent_data`, `PaymentLinkCreateParams.payment_intent_data`, and `PaymentLinkUpdateParams.payment_intent_data`
18
+ * Add support for new value `unreconciled_customer_funds` on enum `Reporting.ReportRunCreateParams.parameters.reporting_category`
19
+
3
20
  ## 14.2.0 - 2023-10-26
4
21
  * [#1939](https://github.com/stripe/stripe-node/pull/1939) Update generated code
5
22
  * Add support for new value `balance_invalid_parameter` on enums `Invoice.last_finalization_error.code`, `PaymentIntent.last_payment_error.code`, `SetupAttempt.setup_error.code`, `SetupIntent.last_setup_error.code`, and `StripeError.code`
package/VERSION CHANGED
@@ -1 +1 @@
1
- 14.2.0
1
+ 14.3.0
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Registrations = void 0;
5
+ const StripeResource_js_1 = require("../../StripeResource.js");
6
+ const stripeMethod = StripeResource_js_1.StripeResource.method;
7
+ exports.Registrations = StripeResource_js_1.StripeResource.extend({
8
+ create: stripeMethod({ method: 'POST', fullPath: '/v1/tax/registrations' }),
9
+ update: stripeMethod({
10
+ method: 'POST',
11
+ fullPath: '/v1/tax/registrations/{id}',
12
+ }),
13
+ list: stripeMethod({
14
+ method: 'GET',
15
+ fullPath: '/v1/tax/registrations',
16
+ methodType: 'list',
17
+ }),
18
+ });
package/cjs/resources.js CHANGED
@@ -34,6 +34,7 @@ const ReceivedCredits_js_2 = require("./resources/Treasury/ReceivedCredits.js");
34
34
  const ReceivedDebits_js_1 = require("./resources/TestHelpers/Treasury/ReceivedDebits.js");
35
35
  const ReceivedDebits_js_2 = require("./resources/Treasury/ReceivedDebits.js");
36
36
  const Refunds_js_1 = require("./resources/TestHelpers/Refunds.js");
37
+ const Registrations_js_1 = require("./resources/Tax/Registrations.js");
37
38
  const ReportRuns_js_1 = require("./resources/Reporting/ReportRuns.js");
38
39
  const ReportTypes_js_1 = require("./resources/Reporting/ReportTypes.js");
39
40
  const ScheduledQueryRuns_js_1 = require("./resources/Sigma/ScheduledQueryRuns.js");
@@ -189,6 +190,7 @@ exports.Sigma = (0, ResourceNamespace_js_1.resourceNamespace)('sigma', {
189
190
  });
190
191
  exports.Tax = (0, ResourceNamespace_js_1.resourceNamespace)('tax', {
191
192
  Calculations: Calculations_js_1.Calculations,
193
+ Registrations: Registrations_js_1.Registrations,
192
194
  Settings: Settings_js_1.Settings,
193
195
  Transactions: Transactions_js_3.Transactions,
194
196
  });
@@ -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.2.0';
37
+ Stripe.PACKAGE_VERSION = '14.3.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;
@@ -0,0 +1,15 @@
1
+ // File generated from our OpenAPI spec
2
+ import { StripeResource } from '../../StripeResource.js';
3
+ const stripeMethod = StripeResource.method;
4
+ export const Registrations = StripeResource.extend({
5
+ create: stripeMethod({ method: 'POST', fullPath: '/v1/tax/registrations' }),
6
+ update: stripeMethod({
7
+ method: 'POST',
8
+ fullPath: '/v1/tax/registrations/{id}',
9
+ }),
10
+ list: stripeMethod({
11
+ method: 'GET',
12
+ fullPath: '/v1/tax/registrations',
13
+ methodType: 'list',
14
+ }),
15
+ });
package/esm/resources.js CHANGED
@@ -30,6 +30,7 @@ import { ReceivedCredits as TreasuryReceivedCredits } from './resources/Treasury
30
30
  import { ReceivedDebits as TestHelpersTreasuryReceivedDebits } from './resources/TestHelpers/Treasury/ReceivedDebits.js';
31
31
  import { ReceivedDebits as TreasuryReceivedDebits } from './resources/Treasury/ReceivedDebits.js';
32
32
  import { Refunds as TestHelpersRefunds } from './resources/TestHelpers/Refunds.js';
33
+ import { Registrations as TaxRegistrations } from './resources/Tax/Registrations.js';
33
34
  import { ReportRuns as ReportingReportRuns } from './resources/Reporting/ReportRuns.js';
34
35
  import { ReportTypes as ReportingReportTypes } from './resources/Reporting/ReportTypes.js';
35
36
  import { ScheduledQueryRuns as SigmaScheduledQueryRuns } from './resources/Sigma/ScheduledQueryRuns.js';
@@ -136,6 +137,7 @@ export const Sigma = resourceNamespace('sigma', {
136
137
  });
137
138
  export const Tax = resourceNamespace('tax', {
138
139
  Calculations: TaxCalculations,
140
+ Registrations: TaxRegistrations,
139
141
  Settings: TaxSettings,
140
142
  Transactions: TaxTransactions,
141
143
  });
@@ -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.2.0';
34
+ Stripe.PACKAGE_VERSION = '14.3.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.2.0",
3
+ "version": "14.3.0",
4
4
  "description": "Stripe API wrapper",
5
5
  "keywords": [
6
6
  "stripe",
@@ -322,6 +322,11 @@ declare module 'stripe' {
322
322
  */
323
323
  promptpay_payments?: Capabilities.PromptpayPayments;
324
324
 
325
+ /**
326
+ * The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments.
327
+ */
328
+ revolut_pay_payments?: Capabilities.RevolutPayPayments;
329
+
325
330
  /**
326
331
  * The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges.
327
332
  */
@@ -420,6 +425,8 @@ declare module 'stripe' {
420
425
 
421
426
  type PromptpayPayments = 'active' | 'inactive' | 'pending';
422
427
 
428
+ type RevolutPayPayments = 'active' | 'inactive' | 'pending';
429
+
423
430
  type SepaDebitPayments = 'active' | 'inactive' | 'pending';
424
431
 
425
432
  type SofortPayments = 'active' | 'inactive' | 'pending';
@@ -295,6 +295,11 @@ declare module 'stripe' {
295
295
  */
296
296
  promptpay_payments?: Capabilities.PromptpayPayments;
297
297
 
298
+ /**
299
+ * The revolut_pay_payments capability.
300
+ */
301
+ revolut_pay_payments?: Capabilities.RevolutPayPayments;
302
+
298
303
  /**
299
304
  * The sepa_debit_payments capability.
300
305
  */
@@ -533,6 +538,13 @@ declare module 'stripe' {
533
538
  requested?: boolean;
534
539
  }
535
540
 
541
+ interface RevolutPayPayments {
542
+ /**
543
+ * 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.
544
+ */
545
+ requested?: boolean;
546
+ }
547
+
536
548
  interface SepaDebitPayments {
537
549
  /**
538
550
  * 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.
@@ -1577,6 +1589,11 @@ declare module 'stripe' {
1577
1589
  */
1578
1590
  promptpay_payments?: Capabilities.PromptpayPayments;
1579
1591
 
1592
+ /**
1593
+ * The revolut_pay_payments capability.
1594
+ */
1595
+ revolut_pay_payments?: Capabilities.RevolutPayPayments;
1596
+
1580
1597
  /**
1581
1598
  * The sepa_debit_payments capability.
1582
1599
  */
@@ -1815,6 +1832,13 @@ declare module 'stripe' {
1815
1832
  requested?: boolean;
1816
1833
  }
1817
1834
 
1835
+ interface RevolutPayPayments {
1836
+ /**
1837
+ * 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.
1838
+ */
1839
+ requested?: boolean;
1840
+ }
1841
+
1818
1842
  interface SepaDebitPayments {
1819
1843
  /**
1820
1844
  * 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.
@@ -80,7 +80,7 @@ declare module 'stripe' {
80
80
  status: string;
81
81
 
82
82
  /**
83
- * Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
83
+ * Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
84
84
  */
85
85
  type: BalanceTransaction.Type;
86
86
  }
@@ -137,6 +137,7 @@ declare module 'stripe' {
137
137
  | 'payment_failure_refund'
138
138
  | 'payment_refund'
139
139
  | 'payment_reversal'
140
+ | 'payment_unreconciled'
140
141
  | 'payout'
141
142
  | 'payout_cancel'
142
143
  | 'payout_failure'
@@ -33,7 +33,7 @@ declare module 'stripe' {
33
33
  source?: string;
34
34
 
35
35
  /**
36
- * Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
36
+ * Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
37
37
  */
38
38
  type?: string;
39
39
  }
@@ -110,9 +110,9 @@ declare module 'stripe' {
110
110
  routing_number: string | null;
111
111
 
112
112
  /**
113
- * For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated.
113
+ * For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated.
114
114
  *
115
- * For external accounts, possible values are `new`, `errored` and `verification_failed`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. In India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.
115
+ * For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payouts fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.
116
116
  */
117
117
  status: string;
118
118
  }
@@ -210,7 +210,7 @@ declare module 'stripe' {
210
210
  enabled: boolean;
211
211
 
212
212
  /**
213
- * The list of products that support subscription updates.
213
+ * The list of up to 10 products that support subscription updates.
214
214
  */
215
215
  products: Array<SubscriptionUpdate.Product> | null;
216
216
 
@@ -200,7 +200,7 @@ declare module 'stripe' {
200
200
  enabled: boolean;
201
201
 
202
202
  /**
203
- * The list of products that support subscription updates.
203
+ * The list of up to 10 products that support subscription updates.
204
204
  */
205
205
  products: Stripe.Emptyable<Array<SubscriptionUpdate.Product>>;
206
206
 
@@ -449,7 +449,7 @@ declare module 'stripe' {
449
449
  enabled?: boolean;
450
450
 
451
451
  /**
452
- * The list of products that support subscription updates.
452
+ * The list of up to 10 products that support subscription updates.
453
453
  */
454
454
  products?: Stripe.Emptyable<Array<SubscriptionUpdate.Product>>;
455
455
 
package/types/Cards.d.ts CHANGED
@@ -163,7 +163,7 @@ declare module 'stripe' {
163
163
  name: string | null;
164
164
 
165
165
  /**
166
- * For external accounts, possible values are `new` and `errored`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.
166
+ * For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated.
167
167
  */
168
168
  status?: string | null;
169
169
 
@@ -428,6 +428,8 @@ declare module 'stripe' {
428
428
 
429
429
  promptpay?: PaymentMethodDetails.Promptpay;
430
430
 
431
+ revolut_pay?: PaymentMethodDetails.RevolutPay;
432
+
431
433
  sepa_credit_transfer?: PaymentMethodDetails.SepaCreditTransfer;
432
434
 
433
435
  sepa_debit?: PaymentMethodDetails.SepaDebit;
@@ -1664,28 +1666,28 @@ declare module 'stripe' {
1664
1666
  * Owner's email. Values are provided by PayPal directly
1665
1667
  * (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1666
1668
  */
1667
- payer_email?: string | null;
1669
+ payer_email: string | null;
1668
1670
 
1669
1671
  /**
1670
1672
  * PayPal account PayerID. This identifier uniquely identifies the PayPal customer.
1671
1673
  */
1672
- payer_id?: string | null;
1674
+ payer_id: string | null;
1673
1675
 
1674
1676
  /**
1675
1677
  * Owner's full name. Values provided by PayPal directly
1676
1678
  * (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1677
1679
  */
1678
- payer_name?: string | null;
1680
+ payer_name: string | null;
1679
1681
 
1680
1682
  /**
1681
1683
  * The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction.
1682
1684
  */
1683
- seller_protection?: Paypal.SellerProtection | null;
1685
+ seller_protection: Paypal.SellerProtection | null;
1684
1686
 
1685
1687
  /**
1686
1688
  * A unique ID generated by PayPal for this transaction.
1687
1689
  */
1688
- transaction_id?: string | null;
1690
+ transaction_id: string | null;
1689
1691
  }
1690
1692
 
1691
1693
  namespace Paypal {
@@ -1722,6 +1724,8 @@ declare module 'stripe' {
1722
1724
  reference: string | null;
1723
1725
  }
1724
1726
 
1727
+ interface RevolutPay {}
1728
+
1725
1729
  interface SepaCreditTransfer {
1726
1730
  /**
1727
1731
  * Name of the bank associated with the bank account.
@@ -842,6 +842,8 @@ declare module 'stripe' {
842
842
 
843
843
  pix?: PaymentMethodOptions.Pix;
844
844
 
845
+ revolut_pay?: PaymentMethodOptions.RevolutPay;
846
+
845
847
  sepa_debit?: PaymentMethodOptions.SepaDebit;
846
848
 
847
849
  sofort?: PaymentMethodOptions.Sofort;
@@ -1264,6 +1266,8 @@ declare module 'stripe' {
1264
1266
  expires_after_seconds: number | null;
1265
1267
  }
1266
1268
 
1269
+ interface RevolutPay {}
1270
+
1267
1271
  interface SepaDebit {
1268
1272
  /**
1269
1273
  * Indicates that you intend to make future payments with this PaymentIntent's payment method.
@@ -57,10 +57,10 @@ declare module 'stripe' {
57
57
  custom_text?: SessionCreateParams.CustomText;
58
58
 
59
59
  /**
60
- * ID of an existing Customer, if one exists. In `payment` mode, the customer's most recent card
60
+ * ID of an existing Customer, if one exists. In `payment` mode, the customer's most recently saved card
61
61
  * payment method will be used to prefill the email, name, card details, and billing address
62
62
  * on the Checkout page. In `subscription` mode, the customer's [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method)
63
- * will be used if it's a card, and otherwise the most recent card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details.
63
+ * will be used if it's a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details.
64
64
  *
65
65
  * If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout.
66
66
  * If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer.
@@ -995,6 +995,11 @@ declare module 'stripe' {
995
995
  */
996
996
  pix?: PaymentMethodOptions.Pix;
997
997
 
998
+ /**
999
+ * contains details about the RevolutPay payment method options.
1000
+ */
1001
+ revolut_pay?: PaymentMethodOptions.RevolutPay;
1002
+
998
1003
  /**
999
1004
  * contains details about the Sepa Debit payment method options.
1000
1005
  */
@@ -1507,6 +1512,21 @@ declare module 'stripe' {
1507
1512
  expires_after_seconds?: number;
1508
1513
  }
1509
1514
 
1515
+ interface RevolutPay {
1516
+ /**
1517
+ * Indicates that you intend to make future payments with this PaymentIntent's payment method.
1518
+ *
1519
+ * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
1520
+ *
1521
+ * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
1522
+ */
1523
+ setup_future_usage?: RevolutPay.SetupFutureUsage;
1524
+ }
1525
+
1526
+ namespace RevolutPay {
1527
+ type SetupFutureUsage = 'none' | 'off_session';
1528
+ }
1529
+
1510
1530
  interface SepaDebit {
1511
1531
  /**
1512
1532
  * Indicates that you intend to make future payments with this PaymentIntent's payment method.
@@ -1633,6 +1653,7 @@ declare module 'stripe' {
1633
1653
  | 'paypal'
1634
1654
  | 'pix'
1635
1655
  | 'promptpay'
1656
+ | 'revolut_pay'
1636
1657
  | 'sepa_debit'
1637
1658
  | 'sofort'
1638
1659
  | 'us_bank_account'
@@ -202,6 +202,7 @@ declare module 'stripe' {
202
202
  | 'refunded_from_payment'
203
203
  | 'return_canceled'
204
204
  | 'return_initiated'
205
+ | 'transferred_to_balance'
205
206
  | 'unapplied_from_payment';
206
207
 
207
208
  interface UnappliedFromPayment {
@@ -760,6 +760,7 @@ declare module 'stripe' {
760
760
  | 'paypal'
761
761
  | 'pix'
762
762
  | 'promptpay'
763
+ | 'revolut_pay'
763
764
  | 'sepa_debit'
764
765
  | 'sofort'
765
766
  | 'us_bank_account'
@@ -3,17 +3,32 @@
3
3
  declare module 'stripe' {
4
4
  namespace Stripe {
5
5
  /**
6
- * `Exchange Rate` objects allow you to determine the rates that Stripe is
7
- * currently using to convert from one currency to another. Since this number is
8
- * variable throughout the day, there are various reasons why you might want to
9
- * know the current rate (for example, to dynamically price an item for a user
10
- * with a default payment in a foreign currency).
6
+ * `ExchangeRate` objects allow you to determine the rates that Stripe is currently
7
+ * using to convert from one currency to another. Since this number is variable
8
+ * throughout the day, there are various reasons why you might want to know the current
9
+ * rate (for example, to dynamically price an item for a user with a default
10
+ * payment in a foreign currency).
11
11
  *
12
- * If you want a guarantee that the charge is made with a certain exchange rate
13
- * you expect is current, you can pass in `exchange_rate` to charges endpoints.
14
- * If the value is no longer up to date, the charge won't go through. Please
15
- * refer to our [Exchange Rates API](https://stripe.com/docs/exchange-rates) guide for more
16
- * details.
12
+ * Please refer to our [Exchange Rates API](https://stripe.com/docs/fx-rates) guide for more details.
13
+ *
14
+ * *[Note: this integration path is supported but no longer recommended]* Additionally,
15
+ * you can guarantee that a charge is made with an exchange rate that you expect is
16
+ * current. To do so, you must pass in the exchange_rate to charges endpoints. If the
17
+ * value is no longer up to date, the charge won't go through. Please refer to our
18
+ * [Using with charges](https://stripe.com/docs/exchange-rates) guide for more details.
19
+ *
20
+ * -----
21
+ *
22
+ * &nbsp;
23
+ *
24
+ * *This Exchange Rates API is a Beta Service and is subject to Stripe's terms of service. You may use the API solely for the purpose of transacting on Stripe. For example, the API may be queried in order to:*
25
+ *
26
+ * - *localize prices for processing payments on Stripe*
27
+ * - *reconcile Stripe transactions*
28
+ * - *determine how much money to send to a connected account*
29
+ * - *determine app fees to charge a connected account*
30
+ *
31
+ * *Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.*
17
32
  */
18
33
  interface ExchangeRate {
19
34
  /**
@@ -53,6 +53,11 @@ declare module 'stripe' {
53
53
 
54
54
  namespace BankTransfer {
55
55
  interface FinancialAddress {
56
+ /**
57
+ * ABA Records contain U.S. bank account details per the ABA format.
58
+ */
59
+ aba?: FinancialAddress.Aba;
60
+
56
61
  /**
57
62
  * Iban Records contain E.U. bank account details per the SEPA format.
58
63
  */
@@ -73,6 +78,11 @@ declare module 'stripe' {
73
78
  */
74
79
  supported_networks?: Array<FinancialAddress.SupportedNetwork>;
75
80
 
81
+ /**
82
+ * SWIFT Records contain U.S. bank account details per the SWIFT format.
83
+ */
84
+ swift?: FinancialAddress.Swift;
85
+
76
86
  /**
77
87
  * The type of financial address
78
88
  */
@@ -85,6 +95,23 @@ declare module 'stripe' {
85
95
  }
86
96
 
87
97
  namespace FinancialAddress {
98
+ interface Aba {
99
+ /**
100
+ * The ABA account number
101
+ */
102
+ account_number: string;
103
+
104
+ /**
105
+ * The bank name
106
+ */
107
+ bank_name: string;
108
+
109
+ /**
110
+ * The ABA routing number
111
+ */
112
+ routing_number: string;
113
+ }
114
+
88
115
  interface Iban {
89
116
  /**
90
117
  * The name of the person or business that owns the bank account
@@ -141,9 +168,40 @@ declare module 'stripe' {
141
168
  clabe: string;
142
169
  }
143
170
 
144
- type SupportedNetwork = 'bacs' | 'fps' | 'sepa' | 'spei' | 'zengin';
171
+ type SupportedNetwork =
172
+ | 'ach'
173
+ | 'bacs'
174
+ | 'domestic_wire_us'
175
+ | 'fps'
176
+ | 'sepa'
177
+ | 'spei'
178
+ | 'swift'
179
+ | 'zengin';
180
+
181
+ interface Swift {
182
+ /**
183
+ * The account number
184
+ */
185
+ account_number: string;
186
+
187
+ /**
188
+ * The bank name
189
+ */
190
+ bank_name: string;
191
+
192
+ /**
193
+ * The SWIFT code
194
+ */
195
+ swift_code: string;
196
+ }
145
197
 
146
- type Type = 'iban' | 'sort_code' | 'spei' | 'zengin';
198
+ type Type =
199
+ | 'aba'
200
+ | 'iban'
201
+ | 'sort_code'
202
+ | 'spei'
203
+ | 'swift'
204
+ | 'zengin';
147
205
 
148
206
  interface Zengin {
149
207
  /**
@@ -894,6 +894,7 @@ declare module 'stripe' {
894
894
  | 'testmode_charges_only'
895
895
  | 'tls_version_unsupported'
896
896
  | 'token_already_used'
897
+ | 'token_card_network_invalid'
897
898
  | 'token_in_use'
898
899
  | 'transfer_source_balance_parameters_mismatch'
899
900
  | 'transfers_not_allowed'