stripe 15.5.0 → 15.6.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,31 +1,44 @@
1
1
  # Changelog
2
2
 
3
+ ## 15.6.0 - 2024-05-09
4
+ * [#2086](https://github.com/stripe/stripe-node/pull/2086) Update generated code
5
+ * Remove support for `pending_invoice_items_behavior` on `SubscriptionCreateParams`
6
+ * [#2080](https://github.com/stripe/stripe-node/pull/2080) Update generated code
7
+ * Add support for `update` test helper method on resources `Treasury.OutboundPayment` and `Treasury.OutboundTransfer`
8
+ * Add support for `allow_redisplay` on `ConfirmationToken.payment_method_preview` and `PaymentMethod`
9
+ * Add support for new values `treasury.outbound_payment.tracking_details_updated` and `treasury.outbound_transfer.tracking_details_updated` on enum `Event.type`
10
+ * Add support for `preview_mode` on `InvoiceCreatePreviewParams`, `InvoiceUpcomingLinesParams`, and `InvoiceUpcomingParams`
11
+ * Add support for `pending_invoice_items_behavior` on `SubscriptionCreateParams`
12
+ * Add support for `tracking_details` on `Treasury.OutboundPayment` and `Treasury.OutboundTransfer`
13
+ * Add support for new values `treasury.outbound_payment.tracking_details_updated` and `treasury.outbound_transfer.tracking_details_updated` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`
14
+ * [#2085](https://github.com/stripe/stripe-node/pull/2085) Remove unnecessary pointer to description in deprecation message
15
+
3
16
  ## 15.5.0 - 2024-05-02
4
17
  * [#2072](https://github.com/stripe/stripe-node/pull/2072) Update generated code
5
- * Add support for new value `shipping_address_invalid` on enums `Invoice.last_finalization_error.code`, `PaymentIntent.last_payment_error.code`, `SetupAttempt.setup_error.code`, `SetupIntent.last_setup_error.code`, and `StripeError.code`
6
- * Fix properties incorrectly marked as required in the OpenAPI spec.
7
- * Change `Apps.Secret.payload`, `BillingPortal.Configuration.features.subscription_update.products`, `Charge.refunds`, `ConfirmationToken.payment_method_preview.klarna.dob`, `Identity.VerificationReport.document.dob`, `Identity.VerificationReport.document.expiration_date`, `Identity.VerificationReport.document.number`, `Identity.VerificationReport.id_number.dob`, `Identity.VerificationReport.id_number.id_number`, `Identity.VerificationSession.provided_details`, `Identity.VerificationSession.verified_outputs.dob`, `Identity.VerificationSession.verified_outputs.id_number`, `Identity.VerificationSession.verified_outputs`, `Issuing.Dispute.balance_transactions`, `Issuing.Transaction.purchase_details`, `PaymentMethod.klarna.dob`, `Tax.Calculation.line_items`, `Tax.CalculationLineItem.tax_breakdown`, `Tax.Transaction.line_items`, `Treasury.FinancialAccount.financial_addresses[].aba.account_number`, `Treasury.ReceivedCredit.linked_flows.source_flow_details`, `Treasury.Transaction.entries`, `Treasury.Transaction.flow_details`, and `Treasury.TransactionEntry.flow_details` to be optional
8
- * Add support for `paypal` on `Dispute.payment_method_details`
9
- * Change type of `Dispute.payment_method_details.type` from `literal('card')` to `enum('card'|'paypal')`
10
- * Change type of `Entitlements.FeatureUpdateParams.metadata` from `map(string: string)` to `emptyable(map(string: string))`
11
- * Add support for `payment_method_types` on `PaymentIntentConfirmParams`
12
- * Add support for `ship_from_details` on `Tax.CalculationCreateParams`, `Tax.Calculation`, and `Tax.Transaction`
13
- * Add support for `bh`, `eg`, `ge`, `ke`, `kz`, `ng`, and `om` on `Tax.Registration.country_options` and `Tax.RegistrationCreateParams.country_options`
18
+ * Add support for new value `shipping_address_invalid` on enums `Invoice.last_finalization_error.code`, `PaymentIntent.last_payment_error.code`, `SetupAttempt.setup_error.code`, `SetupIntent.last_setup_error.code`, and `StripeError.code`
19
+ * Fix properties incorrectly marked as required in the OpenAPI spec.
20
+ * Change `Apps.Secret.payload`, `BillingPortal.Configuration.features.subscription_update.products`, `Charge.refunds`, `ConfirmationToken.payment_method_preview.klarna.dob`, `Identity.VerificationReport.document.dob`, `Identity.VerificationReport.document.expiration_date`, `Identity.VerificationReport.document.number`, `Identity.VerificationReport.id_number.dob`, `Identity.VerificationReport.id_number.id_number`, `Identity.VerificationSession.provided_details`, `Identity.VerificationSession.verified_outputs.dob`, `Identity.VerificationSession.verified_outputs.id_number`, `Identity.VerificationSession.verified_outputs`, `Issuing.Dispute.balance_transactions`, `Issuing.Transaction.purchase_details`, `PaymentMethod.klarna.dob`, `Tax.Calculation.line_items`, `Tax.CalculationLineItem.tax_breakdown`, `Tax.Transaction.line_items`, `Treasury.FinancialAccount.financial_addresses[].aba.account_number`, `Treasury.ReceivedCredit.linked_flows.source_flow_details`, `Treasury.Transaction.entries`, `Treasury.Transaction.flow_details`, and `Treasury.TransactionEntry.flow_details` to be optional
21
+ * Add support for `paypal` on `Dispute.payment_method_details`
22
+ * Change type of `Dispute.payment_method_details.type` from `literal('card')` to `enum('card'|'paypal')`
23
+ * Change type of `Entitlements.FeatureUpdateParams.metadata` from `map(string: string)` to `emptyable(map(string: string))`
24
+ * Add support for `payment_method_types` on `PaymentIntentConfirmParams`
25
+ * Add support for `ship_from_details` on `Tax.CalculationCreateParams`, `Tax.Calculation`, and `Tax.Transaction`
26
+ * Add support for `bh`, `eg`, `ge`, `ke`, `kz`, `ng`, and `om` on `Tax.Registration.country_options` and `Tax.RegistrationCreateParams.country_options`
14
27
  * [#2077](https://github.com/stripe/stripe-node/pull/2077) Deprecate Node methods and params based on OpenAPI spec
15
- - Mark as deprecated the `approve` and `decline` methods on `Issuing.Authorization`. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
28
+ - Mark as deprecated the `approve` and `decline` methods on `Issuing.Authorization`. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
16
29
  - Mark as deprecated the `persistent_token` property on `ConfirmationToken.PaymentMethodPreview.Link`, `PaymentIntent.PaymentMethodOptions.Link`, `PaymentIntentResource.PaymentMethodOptions.Link`, `PaymentMethod.Link.persistent_token`. `SetupIntents.PaymentMethodOptions.Card.Link.persistent_token`, `SetupIntentsResource.persistent_token`. This is a legacy parameter that no longer has any function.
17
30
  * [#2074](https://github.com/stripe/stripe-node/pull/2074) Add a more explicit comment on `limit` param in `autoPagingToArray`
18
31
 
19
32
  ## 15.4.0 - 2024-04-25
20
33
  * [#2071](https://github.com/stripe/stripe-node/pull/2071) Update generated code
21
- * Add support for `setup_future_usage` on `Checkout.Session.payment_method_options.amazon_pay`, `Checkout.Session.payment_method_options.revolut_pay`, `PaymentIntent.payment_method_options.amazon_pay`, and `PaymentIntent.payment_method_options.revolut_pay`
22
- * Change type of `Entitlements.ActiveEntitlement.feature` from `string` to `expandable(Entitlements.Feature)`
23
- * Remove support for inadvertently released identity verification features `email` and `phone` on `Identity.VerificationSessionCreateParams.options` and `Identity.VerificationSessionUpdateParams.options`
24
- * Change `Identity.VerificationSession.provided_details`, `Identity.VerificationSession.verified_outputs.email`, and `Identity.VerificationSession.verified_outputs.phone` to be required
25
- * Add support for new values `amazon_pay` and `revolut_pay` on enums `Invoice.payment_settings.payment_method_types[]`, `InvoiceCreateParams.payment_settings.payment_method_types[]`, `InvoiceUpdateParams.payment_settings.payment_method_types[]`, `Subscription.payment_settings.payment_method_types[]`, `SubscriptionCreateParams.payment_settings.payment_method_types[]`, and `SubscriptionUpdateParams.payment_settings.payment_method_types[]`
26
- * Add support for `amazon_pay` and `revolut_pay` on `Mandate.payment_method_details` and `SetupAttempt.payment_method_details`
27
- * Add support for `ending_before`, `limit`, and `starting_after` on `PaymentMethodConfigurationListParams`
28
- * Add support for `mobilepay` on `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, and `PaymentMethodConfiguration`
34
+ * Add support for `setup_future_usage` on `Checkout.Session.payment_method_options.amazon_pay`, `Checkout.Session.payment_method_options.revolut_pay`, `PaymentIntent.payment_method_options.amazon_pay`, and `PaymentIntent.payment_method_options.revolut_pay`
35
+ * Change type of `Entitlements.ActiveEntitlement.feature` from `string` to `expandable(Entitlements.Feature)`
36
+ * Remove support for inadvertently released identity verification features `email` and `phone` on `Identity.VerificationSessionCreateParams.options` and `Identity.VerificationSessionUpdateParams.options`
37
+ * Change `Identity.VerificationSession.provided_details`, `Identity.VerificationSession.verified_outputs.email`, and `Identity.VerificationSession.verified_outputs.phone` to be required
38
+ * Add support for new values `amazon_pay` and `revolut_pay` on enums `Invoice.payment_settings.payment_method_types[]`, `InvoiceCreateParams.payment_settings.payment_method_types[]`, `InvoiceUpdateParams.payment_settings.payment_method_types[]`, `Subscription.payment_settings.payment_method_types[]`, `SubscriptionCreateParams.payment_settings.payment_method_types[]`, and `SubscriptionUpdateParams.payment_settings.payment_method_types[]`
39
+ * Add support for `amazon_pay` and `revolut_pay` on `Mandate.payment_method_details` and `SetupAttempt.payment_method_details`
40
+ * Add support for `ending_before`, `limit`, and `starting_after` on `PaymentMethodConfigurationListParams`
41
+ * Add support for `mobilepay` on `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, and `PaymentMethodConfiguration`
29
42
  * [#2061](https://github.com/stripe/stripe-node/pull/2061) Make cloudflare package export
30
43
 
31
44
  ## 15.3.0 - 2024-04-18
package/VERSION CHANGED
@@ -1 +1 @@
1
- 15.5.0
1
+ 15.6.0
@@ -5,6 +5,10 @@ exports.OutboundPayments = void 0;
5
5
  const StripeResource_js_1 = require("../../../StripeResource.js");
6
6
  const stripeMethod = StripeResource_js_1.StripeResource.method;
7
7
  exports.OutboundPayments = StripeResource_js_1.StripeResource.extend({
8
+ update: stripeMethod({
9
+ method: 'POST',
10
+ fullPath: '/v1/test_helpers/treasury/outbound_payments/{id}',
11
+ }),
8
12
  fail: stripeMethod({
9
13
  method: 'POST',
10
14
  fullPath: '/v1/test_helpers/treasury/outbound_payments/{id}/fail',
@@ -5,6 +5,10 @@ exports.OutboundTransfers = void 0;
5
5
  const StripeResource_js_1 = require("../../../StripeResource.js");
6
6
  const stripeMethod = StripeResource_js_1.StripeResource.method;
7
7
  exports.OutboundTransfers = StripeResource_js_1.StripeResource.extend({
8
+ update: stripeMethod({
9
+ method: 'POST',
10
+ fullPath: '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}',
11
+ }),
8
12
  fail: stripeMethod({
9
13
  method: 'POST',
10
14
  fullPath: '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail',
@@ -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 = '15.5.0';
37
+ Stripe.PACKAGE_VERSION = '15.6.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;
@@ -2,6 +2,10 @@
2
2
  import { StripeResource } from '../../../StripeResource.js';
3
3
  const stripeMethod = StripeResource.method;
4
4
  export const OutboundPayments = StripeResource.extend({
5
+ update: stripeMethod({
6
+ method: 'POST',
7
+ fullPath: '/v1/test_helpers/treasury/outbound_payments/{id}',
8
+ }),
5
9
  fail: stripeMethod({
6
10
  method: 'POST',
7
11
  fullPath: '/v1/test_helpers/treasury/outbound_payments/{id}/fail',
@@ -2,6 +2,10 @@
2
2
  import { StripeResource } from '../../../StripeResource.js';
3
3
  const stripeMethod = StripeResource.method;
4
4
  export const OutboundTransfers = StripeResource.extend({
5
+ update: stripeMethod({
6
+ method: 'POST',
7
+ fullPath: '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}',
8
+ }),
5
9
  fail: stripeMethod({
6
10
  method: 'POST',
7
11
  fullPath: '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail',
@@ -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 = '15.5.0';
34
+ Stripe.PACKAGE_VERSION = '15.6.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": "15.5.0",
3
+ "version": "15.6.0",
4
4
  "description": "Stripe API wrapper",
5
5
  "keywords": [
6
6
  "stripe",
@@ -69,7 +69,7 @@ declare module 'stripe' {
69
69
  deleted?: void;
70
70
 
71
71
  /**
72
- * Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true.
72
+ * Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](https://stripe.com/connect/onboarding) to finish submitting account details.
73
73
  */
74
74
  details_submitted: boolean;
75
75
 
@@ -1030,12 +1030,12 @@ declare module 'stripe' {
1030
1030
  address?: Stripe.AddressParam;
1031
1031
 
1032
1032
  /**
1033
- * The Kana variation of the the individual's primary address (Japan only).
1033
+ * The Kana variation of the individual's primary address (Japan only).
1034
1034
  */
1035
1035
  address_kana?: Stripe.JapanAddressParam;
1036
1036
 
1037
1037
  /**
1038
- * The Kanji variation of the the individual's primary address (Japan only).
1038
+ * The Kanji variation of the individual's primary address (Japan only).
1039
1039
  */
1040
1040
  address_kanji?: Stripe.JapanAddressParam;
1041
1041
 
@@ -1055,7 +1055,7 @@ declare module 'stripe' {
1055
1055
  first_name?: string;
1056
1056
 
1057
1057
  /**
1058
- * The Kana variation of the the individual's first name (Japan only).
1058
+ * The Kana variation of the individual's first name (Japan only).
1059
1059
  */
1060
1060
  first_name_kana?: string;
1061
1061
 
@@ -2488,12 +2488,12 @@ declare module 'stripe' {
2488
2488
  address?: Stripe.AddressParam;
2489
2489
 
2490
2490
  /**
2491
- * The Kana variation of the the individual's primary address (Japan only).
2491
+ * The Kana variation of the individual's primary address (Japan only).
2492
2492
  */
2493
2493
  address_kana?: Stripe.JapanAddressParam;
2494
2494
 
2495
2495
  /**
2496
- * The Kanji variation of the the individual's primary address (Japan only).
2496
+ * The Kanji variation of the individual's primary address (Japan only).
2497
2497
  */
2498
2498
  address_kanji?: Stripe.JapanAddressParam;
2499
2499
 
@@ -2513,7 +2513,7 @@ declare module 'stripe' {
2513
2513
  first_name?: string;
2514
2514
 
2515
2515
  /**
2516
- * The Kana variation of the the individual's first name (Japan only).
2516
+ * The Kana variation of the individual's first name (Japan only).
2517
2517
  */
2518
2518
  first_name_kana?: string;
2519
2519
 
@@ -226,13 +226,11 @@ declare module 'stripe' {
226
226
  currently_due: Array<string>;
227
227
 
228
228
  /**
229
- * If the capability is disabled, this string describes why. Can be `requirements.fields_needed`, `pending.onboarding`, `pending.review`, `rejected.fraud`, `rejected.other`, `platform_paused`, `action_required.requested_capabilities`, `rejected.inactivty`, or `rejected.unsupported_business`.
229
+ * If the capability is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `requirements.fields_needed`, `pending.onboarding`, `pending.review`, `rejected.other`, `platform_paused`, `rejected.inactivty`, or `rejected.unsupported_business`.
230
230
  *
231
231
  * `rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service, such as in [Afterpay Clearpay's terms of service](https://stripe.com/afterpay-clearpay/legal#restricted-businesses).
232
232
  *
233
233
  * `rejected.inactivity` means that the capability has been paused for inactivity. This disabled reason currently only applies to the Issuing capability. See [Issuing: Managing Inactive Connects](https://support.stripe.com/questions/issuing-managing-inactive-connect-accounts) for more details.
234
- *
235
- * If you believe that a rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance.
236
234
  */
237
235
  disabled_reason: string | null;
238
236
 
@@ -1538,7 +1538,7 @@ declare module 'stripe' {
1538
1538
  > | null;
1539
1539
 
1540
1540
  /**
1541
- * Enable customers to choose if they wish to save their payment method for future use.
1541
+ * Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
1542
1542
  */
1543
1543
  payment_method_save: SavedPaymentMethodOptions.PaymentMethodSave | null;
1544
1544
  }
@@ -1832,7 +1832,7 @@ declare module 'stripe' {
1832
1832
  >;
1833
1833
 
1834
1834
  /**
1835
- * Enable customers to choose if they wish to save their payment method for future use.
1835
+ * Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
1836
1836
  */
1837
1837
  payment_method_save?: SavedPaymentMethodOptions.PaymentMethodSave;
1838
1838
  }
@@ -125,6 +125,11 @@ declare module 'stripe' {
125
125
 
126
126
  alipay?: PaymentMethodPreview.Alipay;
127
127
 
128
+ /**
129
+ * This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
130
+ */
131
+ allow_redisplay?: PaymentMethodPreview.AllowRedisplay;
132
+
128
133
  amazon_pay?: PaymentMethodPreview.AmazonPay;
129
134
 
130
135
  au_becs_debit?: PaymentMethodPreview.AuBecsDebit;
@@ -233,6 +238,8 @@ declare module 'stripe' {
233
238
 
234
239
  interface Alipay {}
235
240
 
241
+ type AllowRedisplay = 'always' | 'limited' | 'unspecified';
242
+
236
243
  interface AmazonPay {}
237
244
 
238
245
  interface AuBecsDebit {
@@ -566,7 +566,7 @@ declare module 'stripe' {
566
566
  list(options?: RequestOptions): ApiListPromise<Stripe.CreditNote>;
567
567
 
568
568
  /**
569
- * When retrieving a credit note, you'll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
569
+ * When retrieving a credit note, you'll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
570
570
  */
571
571
  listLineItems(
572
572
  id: string,
@@ -220,12 +220,14 @@ declare module 'stripe' {
220
220
  | TreasuryOutboundPaymentFailedEvent
221
221
  | TreasuryOutboundPaymentPostedEvent
222
222
  | TreasuryOutboundPaymentReturnedEvent
223
+ | TreasuryOutboundPaymentTrackingDetailsUpdatedEvent
223
224
  | TreasuryOutboundTransferCanceledEvent
224
225
  | TreasuryOutboundTransferCreatedEvent
225
226
  | TreasuryOutboundTransferExpectedArrivalDateUpdatedEvent
226
227
  | TreasuryOutboundTransferFailedEvent
227
228
  | TreasuryOutboundTransferPostedEvent
228
229
  | TreasuryOutboundTransferReturnedEvent
230
+ | TreasuryOutboundTransferTrackingDetailsUpdatedEvent
229
231
  | TreasuryReceivedCreditCreatedEvent
230
232
  | TreasuryReceivedCreditFailedEvent
231
233
  | TreasuryReceivedCreditSucceededEvent
@@ -3711,6 +3713,23 @@ declare module 'stripe' {
3711
3713
  }
3712
3714
  }
3713
3715
 
3716
+ /**
3717
+ * Occurs whenever tracking_details on an OutboundPayment is updated.
3718
+ */
3719
+ interface TreasuryOutboundPaymentTrackingDetailsUpdatedEvent
3720
+ extends EventBase {
3721
+ type: 'treasury.outbound_payment.tracking_details_updated';
3722
+ data: TreasuryOutboundPaymentTrackingDetailsUpdatedEvent.Data;
3723
+ }
3724
+
3725
+ namespace TreasuryOutboundPaymentTrackingDetailsUpdatedEvent {
3726
+ interface Data extends Stripe.Event.Data {
3727
+ object: Stripe.Treasury.OutboundPayment;
3728
+
3729
+ previous_attributes?: Partial<Stripe.Treasury.OutboundPayment>;
3730
+ }
3731
+ }
3732
+
3714
3733
  /**
3715
3734
  * Occurs whenever an OutboundTransfer is canceled.
3716
3735
  */
@@ -3808,6 +3827,23 @@ declare module 'stripe' {
3808
3827
  }
3809
3828
  }
3810
3829
 
3830
+ /**
3831
+ * Occurs whenever tracking_details on an OutboundTransfer is updated.
3832
+ */
3833
+ interface TreasuryOutboundTransferTrackingDetailsUpdatedEvent
3834
+ extends EventBase {
3835
+ type: 'treasury.outbound_transfer.tracking_details_updated';
3836
+ data: TreasuryOutboundTransferTrackingDetailsUpdatedEvent.Data;
3837
+ }
3838
+
3839
+ namespace TreasuryOutboundTransferTrackingDetailsUpdatedEvent {
3840
+ interface Data extends Stripe.Event.Data {
3841
+ object: Stripe.Treasury.OutboundTransfer;
3842
+
3843
+ previous_attributes?: Partial<Stripe.Treasury.OutboundTransfer>;
3844
+ }
3845
+ }
3846
+
3811
3847
  /**
3812
3848
  * Occurs whenever a received_credit is created as a result of funds being pushed by another account.
3813
3849
  */
package/types/Events.d.ts CHANGED
@@ -251,12 +251,14 @@ declare module 'stripe' {
251
251
  | 'treasury.outbound_payment.failed'
252
252
  | 'treasury.outbound_payment.posted'
253
253
  | 'treasury.outbound_payment.returned'
254
+ | 'treasury.outbound_payment.tracking_details_updated'
254
255
  | 'treasury.outbound_transfer.canceled'
255
256
  | 'treasury.outbound_transfer.created'
256
257
  | 'treasury.outbound_transfer.expected_arrival_date_updated'
257
258
  | 'treasury.outbound_transfer.failed'
258
259
  | 'treasury.outbound_transfer.posted'
259
260
  | 'treasury.outbound_transfer.returned'
261
+ | 'treasury.outbound_transfer.tracking_details_updated'
260
262
  | 'treasury.received_credit.created'
261
263
  | 'treasury.received_credit.failed'
262
264
  | 'treasury.received_credit.succeeded'
@@ -69,7 +69,7 @@ declare module 'stripe' {
69
69
  quantity?: number;
70
70
 
71
71
  /**
72
- * The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
72
+ * The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
73
73
  */
74
74
  subscription?: string;
75
75
 
@@ -1475,6 +1475,11 @@ declare module 'stripe' {
1475
1475
  */
1476
1476
  on_behalf_of?: Stripe.Emptyable<string>;
1477
1477
 
1478
+ /**
1479
+ * Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
1480
+ */
1481
+ preview_mode?: InvoiceCreatePreviewParams.PreviewMode;
1482
+
1478
1483
  /**
1479
1484
  * The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
1480
1485
  */
@@ -1848,6 +1853,8 @@ declare module 'stripe' {
1848
1853
  type Type = 'account' | 'self';
1849
1854
  }
1850
1855
 
1856
+ type PreviewMode = 'next' | 'recurring';
1857
+
1851
1858
  interface ScheduleDetails {
1852
1859
  /**
1853
1860
  * Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
@@ -2579,6 +2586,11 @@ declare module 'stripe' {
2579
2586
  */
2580
2587
  on_behalf_of?: Stripe.Emptyable<string>;
2581
2588
 
2589
+ /**
2590
+ * Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
2591
+ */
2592
+ preview_mode?: InvoiceListUpcomingLinesParams.PreviewMode;
2593
+
2582
2594
  /**
2583
2595
  * The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
2584
2596
  */
@@ -3016,6 +3028,8 @@ declare module 'stripe' {
3016
3028
  type Type = 'account' | 'self';
3017
3029
  }
3018
3030
 
3031
+ type PreviewMode = 'next' | 'recurring';
3032
+
3019
3033
  interface ScheduleDetails {
3020
3034
  /**
3021
3035
  * Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
@@ -3918,6 +3932,11 @@ declare module 'stripe' {
3918
3932
  */
3919
3933
  on_behalf_of?: Stripe.Emptyable<string>;
3920
3934
 
3935
+ /**
3936
+ * Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
3937
+ */
3938
+ preview_mode?: InvoiceRetrieveUpcomingParams.PreviewMode;
3939
+
3921
3940
  /**
3922
3941
  * The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
3923
3942
  */
@@ -4355,6 +4374,8 @@ declare module 'stripe' {
4355
4374
  type Type = 'account' | 'self';
4356
4375
  }
4357
4376
 
4377
+ type PreviewMode = 'next' | 'recurring';
4378
+
4358
4379
  interface ScheduleDetails {
4359
4380
  /**
4360
4381
  * Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
@@ -119,7 +119,7 @@ declare module 'stripe' {
119
119
  /**
120
120
  * [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
121
121
  * This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
122
- * @deprecated This method is deprecated, please refer to the description for details.
122
+ * @deprecated
123
123
  */
124
124
  approve(
125
125
  id: string,
@@ -134,7 +134,7 @@ declare module 'stripe' {
134
134
  /**
135
135
  * [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
136
136
  * This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
137
- * @deprecated This method is deprecated, please refer to the description for details.
137
+ * @deprecated
138
138
  */
139
139
  decline(
140
140
  id: string,
@@ -28,6 +28,11 @@ declare module 'stripe' {
28
28
 
29
29
  alipay?: PaymentMethod.Alipay;
30
30
 
31
+ /**
32
+ * This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
33
+ */
34
+ allow_redisplay?: PaymentMethod.AllowRedisplay;
35
+
31
36
  amazon_pay?: PaymentMethod.AmazonPay;
32
37
 
33
38
  au_becs_debit?: PaymentMethod.AuBecsDebit;
@@ -161,6 +166,8 @@ declare module 'stripe' {
161
166
 
162
167
  interface Alipay {}
163
168
 
169
+ type AllowRedisplay = 'always' | 'limited' | 'unspecified';
170
+
164
171
  interface AmazonPay {}
165
172
 
166
173
  interface AuBecsDebit {
@@ -3,6 +3,62 @@
3
3
  declare module 'stripe' {
4
4
  namespace Stripe {
5
5
  namespace TestHelpers {
6
+ namespace Treasury {
7
+ interface OutboundPaymentUpdateParams {
8
+ /**
9
+ * Details about network-specific tracking information.
10
+ */
11
+ tracking_details: OutboundPaymentUpdateParams.TrackingDetails;
12
+
13
+ /**
14
+ * Specifies which fields in the response should be expanded.
15
+ */
16
+ expand?: Array<string>;
17
+ }
18
+
19
+ namespace OutboundPaymentUpdateParams {
20
+ interface TrackingDetails {
21
+ /**
22
+ * ACH network tracking details.
23
+ */
24
+ ach?: TrackingDetails.Ach;
25
+
26
+ /**
27
+ * The US bank account network used to send funds.
28
+ */
29
+ type: TrackingDetails.Type;
30
+
31
+ /**
32
+ * US domestic wire network tracking details.
33
+ */
34
+ us_domestic_wire?: TrackingDetails.UsDomesticWire;
35
+ }
36
+
37
+ namespace TrackingDetails {
38
+ interface Ach {
39
+ /**
40
+ * ACH trace ID for funds sent over the `ach` network.
41
+ */
42
+ trace_id: string;
43
+ }
44
+
45
+ type Type = 'ach' | 'us_domestic_wire';
46
+
47
+ interface UsDomesticWire {
48
+ /**
49
+ * IMAD for funds sent over the `us_domestic_wire` network.
50
+ */
51
+ imad?: string;
52
+
53
+ /**
54
+ * OMAD for funds sent over the `us_domestic_wire` network.
55
+ */
56
+ omad?: string;
57
+ }
58
+ }
59
+ }
60
+ }
61
+
6
62
  namespace Treasury {
7
63
  interface OutboundPaymentFailParams {
8
64
  /**
@@ -29,7 +85,7 @@ declare module 'stripe' {
29
85
  expand?: Array<string>;
30
86
 
31
87
  /**
32
- * Optional hash to set the the return code.
88
+ * Optional hash to set the return code.
33
89
  */
34
90
  returned_details?: OutboundPaymentReturnOutboundPaymentParams.ReturnedDetails;
35
91
  }
@@ -60,6 +116,15 @@ declare module 'stripe' {
60
116
 
61
117
  namespace Treasury {
62
118
  class OutboundPaymentsResource {
119
+ /**
120
+ * Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
121
+ */
122
+ update(
123
+ id: string,
124
+ params: OutboundPaymentUpdateParams,
125
+ options?: RequestOptions
126
+ ): Promise<Stripe.Response<Stripe.Treasury.OutboundPayment>>;
127
+
63
128
  /**
64
129
  * Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
65
130
  */
@@ -3,6 +3,62 @@
3
3
  declare module 'stripe' {
4
4
  namespace Stripe {
5
5
  namespace TestHelpers {
6
+ namespace Treasury {
7
+ interface OutboundTransferUpdateParams {
8
+ /**
9
+ * Details about network-specific tracking information.
10
+ */
11
+ tracking_details: OutboundTransferUpdateParams.TrackingDetails;
12
+
13
+ /**
14
+ * Specifies which fields in the response should be expanded.
15
+ */
16
+ expand?: Array<string>;
17
+ }
18
+
19
+ namespace OutboundTransferUpdateParams {
20
+ interface TrackingDetails {
21
+ /**
22
+ * ACH network tracking details.
23
+ */
24
+ ach?: TrackingDetails.Ach;
25
+
26
+ /**
27
+ * The US bank account network used to send funds.
28
+ */
29
+ type: TrackingDetails.Type;
30
+
31
+ /**
32
+ * US domestic wire network tracking details.
33
+ */
34
+ us_domestic_wire?: TrackingDetails.UsDomesticWire;
35
+ }
36
+
37
+ namespace TrackingDetails {
38
+ interface Ach {
39
+ /**
40
+ * ACH trace ID for funds sent over the `ach` network.
41
+ */
42
+ trace_id: string;
43
+ }
44
+
45
+ type Type = 'ach' | 'us_domestic_wire';
46
+
47
+ interface UsDomesticWire {
48
+ /**
49
+ * IMAD for funds sent over the `us_domestic_wire` network.
50
+ */
51
+ imad?: string;
52
+
53
+ /**
54
+ * OMAD for funds sent over the `us_domestic_wire` network.
55
+ */
56
+ omad?: string;
57
+ }
58
+ }
59
+ }
60
+ }
61
+
6
62
  namespace Treasury {
7
63
  interface OutboundTransferFailParams {
8
64
  /**
@@ -60,6 +116,15 @@ declare module 'stripe' {
60
116
 
61
117
  namespace Treasury {
62
118
  class OutboundTransfersResource {
119
+ /**
120
+ * Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
121
+ */
122
+ update(
123
+ id: string,
124
+ params: OutboundTransferUpdateParams,
125
+ options?: RequestOptions
126
+ ): Promise<Stripe.Response<Stripe.Treasury.OutboundTransfer>>;
127
+
63
128
  /**
64
129
  * Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
65
130
  */
@@ -248,12 +248,12 @@ declare module 'stripe' {
248
248
  address?: Stripe.AddressParam;
249
249
 
250
250
  /**
251
- * The Kana variation of the the individual's primary address (Japan only).
251
+ * The Kana variation of the individual's primary address (Japan only).
252
252
  */
253
253
  address_kana?: Stripe.JapanAddressParam;
254
254
 
255
255
  /**
256
- * The Kanji variation of the the individual's primary address (Japan only).
256
+ * The Kanji variation of the individual's primary address (Japan only).
257
257
  */
258
258
  address_kanji?: Stripe.JapanAddressParam;
259
259
 
@@ -273,7 +273,7 @@ declare module 'stripe' {
273
273
  first_name?: string;
274
274
 
275
275
  /**
276
- * The Kana variation of the the individual's first name (Japan only).
276
+ * The Kana variation of the individual's first name (Japan only).
277
277
  */
278
278
  first_name_kana?: string;
279
279
 
@@ -106,6 +106,11 @@ declare module 'stripe' {
106
106
 
107
107
  status_transitions: OutboundPayment.StatusTransitions;
108
108
 
109
+ /**
110
+ * Details about network-specific tracking information if available.
111
+ */
112
+ tracking_details?: OutboundPayment.TrackingDetails | null;
113
+
109
114
  /**
110
115
  * The Transaction associated with this object.
111
116
  */
@@ -272,6 +277,40 @@ declare module 'stripe' {
272
277
  */
273
278
  returned_at: number | null;
274
279
  }
280
+
281
+ interface TrackingDetails {
282
+ ach?: TrackingDetails.Ach;
283
+
284
+ /**
285
+ * The US bank account network used to send funds.
286
+ */
287
+ type: TrackingDetails.Type;
288
+
289
+ us_domestic_wire?: TrackingDetails.UsDomesticWire;
290
+ }
291
+
292
+ namespace TrackingDetails {
293
+ interface Ach {
294
+ /**
295
+ * ACH trace ID of the OutboundPayment for payments sent over the `ach` network.
296
+ */
297
+ trace_id: string;
298
+ }
299
+
300
+ type Type = 'ach' | 'us_domestic_wire';
301
+
302
+ interface UsDomesticWire {
303
+ /**
304
+ * IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network.
305
+ */
306
+ imad: string;
307
+
308
+ /**
309
+ * OMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network.
310
+ */
311
+ omad: string | null;
312
+ }
313
+ }
275
314
  }
276
315
  }
277
316
  }
@@ -93,6 +93,11 @@ declare module 'stripe' {
93
93
 
94
94
  status_transitions: OutboundTransfer.StatusTransitions;
95
95
 
96
+ /**
97
+ * Details about network-specific tracking information if available.
98
+ */
99
+ tracking_details?: OutboundTransfer.TrackingDetails | null;
100
+
96
101
  /**
97
102
  * The Transaction associated with this object.
98
103
  */
@@ -231,6 +236,40 @@ declare module 'stripe' {
231
236
  */
232
237
  returned_at: number | null;
233
238
  }
239
+
240
+ interface TrackingDetails {
241
+ ach?: TrackingDetails.Ach;
242
+
243
+ /**
244
+ * The US bank account network used to send funds.
245
+ */
246
+ type: TrackingDetails.Type;
247
+
248
+ us_domestic_wire?: TrackingDetails.UsDomesticWire;
249
+ }
250
+
251
+ namespace TrackingDetails {
252
+ interface Ach {
253
+ /**
254
+ * ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network.
255
+ */
256
+ trace_id: string;
257
+ }
258
+
259
+ type Type = 'ach' | 'us_domestic_wire';
260
+
261
+ interface UsDomesticWire {
262
+ /**
263
+ * IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network.
264
+ */
265
+ imad: string;
266
+
267
+ /**
268
+ * OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network.
269
+ */
270
+ omad: string | null;
271
+ }
272
+ }
234
273
  }
235
274
  }
236
275
  }
@@ -362,12 +362,14 @@ declare module 'stripe' {
362
362
  | 'treasury.outbound_payment.failed'
363
363
  | 'treasury.outbound_payment.posted'
364
364
  | 'treasury.outbound_payment.returned'
365
+ | 'treasury.outbound_payment.tracking_details_updated'
365
366
  | 'treasury.outbound_transfer.canceled'
366
367
  | 'treasury.outbound_transfer.created'
367
368
  | 'treasury.outbound_transfer.expected_arrival_date_updated'
368
369
  | 'treasury.outbound_transfer.failed'
369
370
  | 'treasury.outbound_transfer.posted'
370
371
  | 'treasury.outbound_transfer.returned'
372
+ | 'treasury.outbound_transfer.tracking_details_updated'
371
373
  | 'treasury.received_credit.created'
372
374
  | 'treasury.received_credit.failed'
373
375
  | 'treasury.received_credit.succeeded'
@@ -633,12 +635,14 @@ declare module 'stripe' {
633
635
  | 'treasury.outbound_payment.failed'
634
636
  | 'treasury.outbound_payment.posted'
635
637
  | 'treasury.outbound_payment.returned'
638
+ | 'treasury.outbound_payment.tracking_details_updated'
636
639
  | 'treasury.outbound_transfer.canceled'
637
640
  | 'treasury.outbound_transfer.created'
638
641
  | 'treasury.outbound_transfer.expected_arrival_date_updated'
639
642
  | 'treasury.outbound_transfer.failed'
640
643
  | 'treasury.outbound_transfer.posted'
641
644
  | 'treasury.outbound_transfer.returned'
645
+ | 'treasury.outbound_transfer.tracking_details_updated'
642
646
  | 'treasury.received_credit.created'
643
647
  | 'treasury.received_credit.failed'
644
648
  | 'treasury.received_credit.succeeded'