stripe 8.216.0 → 8.217.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 8.217.0 - 2022-04-13
4
+ * [#1395](https://github.com/stripe/stripe-node/pull/1395) API Updates
5
+ * Add support for `increment_authorization` method on resource `PaymentIntent`
6
+ * Add support for `incremental_authorization_supported` on `Charge.payment_method_details.card_present`
7
+ * Add support for `request_incremental_authorization_support` on `PaymentIntent.payment_method_options.card_present`, `PaymentIntentConfirmParams.payment_method_options.card_present`, `PaymentIntentCreateParams.payment_method_options.card_present`, and `PaymentIntentUpdateParams.payment_method_options.card_present`
8
+
3
9
  ## 8.216.0 - 2022-04-08
4
10
  * [#1391](https://github.com/stripe/stripe-node/pull/1391) API Updates
5
11
  * Add support for `apply_customer_balance` method on resource `PaymentIntent`
package/VERSION CHANGED
@@ -1 +1 @@
1
- 8.216.0
1
+ 8.217.0
@@ -49,6 +49,11 @@ module.exports = StripeResource.extend({
49
49
  path: '/{intent}/confirm',
50
50
  }),
51
51
 
52
+ incrementAuthorization: stripeMethod({
53
+ method: 'POST',
54
+ path: '/{intent}/increment_authorization',
55
+ }),
56
+
52
57
  search: stripeMethod({
53
58
  method: 'GET',
54
59
  path: '/search',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stripe",
3
- "version": "8.216.0",
3
+ "version": "8.217.0",
4
4
  "description": "Stripe API wrapper",
5
5
  "keywords": [
6
6
  "stripe",
@@ -1006,6 +1006,11 @@ declare module 'stripe' {
1006
1006
  */
1007
1007
  iin?: string | null;
1008
1008
 
1009
+ /**
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.
1011
+ */
1012
+ incremental_authorization_supported: boolean | null;
1013
+
1009
1014
  /**
1010
1015
  * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
1011
1016
  */
@@ -529,7 +529,7 @@ declare module 'stripe' {
529
529
 
530
530
  /**
531
531
  * PaymentMethod objects represent your customer's payment instruments.
532
- * They can be used with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or saved to
532
+ * You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
533
533
  * Customer objects to store instrument details for future payments.
534
534
  *
535
535
  * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
@@ -69,9 +69,9 @@ declare module 'stripe' {
69
69
  /**
70
70
  * The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.
71
71
  *
72
- * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
72
+ * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
73
73
  *
74
- * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?integration=elements) and learn about how `client_secret` should be handled.
74
+ * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled.
75
75
  */
76
76
  client_secret: string | null;
77
77
 
@@ -282,7 +282,7 @@ declare module 'stripe' {
282
282
 
283
283
  /**
284
284
  * PaymentMethod objects represent your customer's payment instruments.
285
- * They can be used with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or saved to
285
+ * You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
286
286
  * Customer objects to store instrument details for future payments.
287
287
  *
288
288
  * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
@@ -1032,6 +1032,11 @@ declare module 'stripe' {
1032
1032
  * Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
1033
1033
  */
1034
1034
  request_extended_authorization: boolean | null;
1035
+
1036
+ /**
1037
+ * Request ability to [increment](docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
1038
+ */
1039
+ request_incremental_authorization_support: boolean | null;
1035
1040
  }
1036
1041
 
1037
1042
  interface Eps {
@@ -2513,6 +2518,11 @@ declare module 'stripe' {
2513
2518
  * Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
2514
2519
  */
2515
2520
  request_extended_authorization?: boolean;
2521
+
2522
+ /**
2523
+ * Request ability to [increment](docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
2524
+ */
2525
+ request_incremental_authorization_support?: boolean;
2516
2526
  }
2517
2527
 
2518
2528
  interface Eps {
@@ -3943,6 +3953,11 @@ declare module 'stripe' {
3943
3953
  * Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
3944
3954
  */
3945
3955
  request_extended_authorization?: boolean;
3956
+
3957
+ /**
3958
+ * Request ability to [increment](docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
3959
+ */
3960
+ request_incremental_authorization_support?: boolean;
3946
3961
  }
3947
3962
 
3948
3963
  interface Eps {
@@ -5510,6 +5525,11 @@ declare module 'stripe' {
5510
5525
  * Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
5511
5526
  */
5512
5527
  request_extended_authorization?: boolean;
5528
+
5529
+ /**
5530
+ * Request ability to [increment](docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
5531
+ */
5532
+ request_incremental_authorization_support?: boolean;
5513
5533
  }
5514
5534
 
5515
5535
  interface Eps {
@@ -5867,6 +5887,48 @@ declare module 'stripe' {
5867
5887
  }
5868
5888
  }
5869
5889
 
5890
+ interface PaymentIntentIncrementAuthorizationParams {
5891
+ /**
5892
+ * The updated total amount you intend to collect from the cardholder. This amount must be greater than the currently authorized amount.
5893
+ */
5894
+ amount: number;
5895
+
5896
+ /**
5897
+ * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
5898
+ */
5899
+ application_fee_amount?: number;
5900
+
5901
+ /**
5902
+ * An arbitrary string attached to the object. Often useful for displaying to users.
5903
+ */
5904
+ description?: string;
5905
+
5906
+ /**
5907
+ * Specifies which fields in the response should be expanded.
5908
+ */
5909
+ expand?: Array<string>;
5910
+
5911
+ /**
5912
+ * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
5913
+ */
5914
+ metadata?: Stripe.MetadataParam;
5915
+
5916
+ /**
5917
+ * The parameters used to automatically create a Transfer when the payment is captured.
5918
+ * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
5919
+ */
5920
+ transfer_data?: PaymentIntentIncrementAuthorizationParams.TransferData;
5921
+ }
5922
+
5923
+ namespace PaymentIntentIncrementAuthorizationParams {
5924
+ interface TransferData {
5925
+ /**
5926
+ * The amount that will be transferred automatically when a charge succeeds.
5927
+ */
5928
+ amount?: number;
5929
+ }
5930
+ }
5931
+
5870
5932
  interface PaymentIntentSearchParams {
5871
5933
  /**
5872
5934
  * The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents).
@@ -6051,6 +6113,38 @@ declare module 'stripe' {
6051
6113
  options?: RequestOptions
6052
6114
  ): Promise<Stripe.Response<Stripe.PaymentIntent>>;
6053
6115
 
6116
+ /**
6117
+ * Perform an incremental authorization on an eligible
6118
+ * [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
6119
+ * PaymentIntent's status must be requires_capture and
6120
+ * [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported)
6121
+ * must be true.
6122
+ *
6123
+ * Incremental authorizations attempt to increase the authorized amount on
6124
+ * your customer's card to the new, higher amount provided. As with the
6125
+ * initial authorization, incremental authorizations may be declined. A
6126
+ * single PaymentIntent can call this endpoint multiple times to further
6127
+ * increase the authorized amount.
6128
+ *
6129
+ * If the incremental authorization succeeds, the PaymentIntent object is
6130
+ * returned with the updated
6131
+ * [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
6132
+ * If the incremental authorization fails, a
6133
+ * [card_declined](https://stripe.com/docs/error-codes#card-declined) error is returned, and no
6134
+ * fields on the PaymentIntent or Charge are updated. The PaymentIntent
6135
+ * object remains capturable for the previously authorized amount.
6136
+ *
6137
+ * Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines.
6138
+ * Once captured, a PaymentIntent can no longer be incremented.
6139
+ *
6140
+ * Learn more about [incremental authorizations](https://stripe.com/docs/terminal/features/incremental-authorizations).
6141
+ */
6142
+ incrementAuthorization(
6143
+ id: string,
6144
+ params: PaymentIntentIncrementAuthorizationParams,
6145
+ options?: RequestOptions
6146
+ ): Promise<Stripe.Response<Stripe.PaymentIntent>>;
6147
+
6054
6148
  /**
6055
6149
  * Search for PaymentIntents you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
6056
6150
  * Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
@@ -384,7 +384,7 @@ declare module 'stripe' {
384
384
 
385
385
  /**
386
386
  * PaymentMethod objects represent your customer's payment instruments.
387
- * They can be used with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or saved to
387
+ * You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
388
388
  * Customer objects to store instrument details for future payments.
389
389
  *
390
390
  * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
@@ -29,7 +29,7 @@ declare module 'stripe' {
29
29
  /**
30
30
  * The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.
31
31
  *
32
- * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
32
+ * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
33
33
  */
34
34
  client_secret: string | null;
35
35
 
@@ -172,7 +172,7 @@ declare module 'stripe' {
172
172
 
173
173
  /**
174
174
  * PaymentMethod objects represent your customer's payment instruments.
175
- * They can be used with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or saved to
175
+ * You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
176
176
  * Customer objects to store instrument details for future payments.
177
177
  *
178
178
  * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).