stripe 19.2.0 → 19.2.1

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,12 @@
1
1
  # Changelog
2
+ ## 19.2.1 - 2025-11-04
3
+ * [#2492](https://github.com/stripe/stripe-node/pull/2492) Add support for value `payment_record` to enum `InvoicePayment.payment.type`
4
+ * [#2485](https://github.com/stripe/stripe-node/pull/2485) correctly calculate content-length for JSON bodies that contain unicode
5
+
2
6
  ## 19.2.0 - 2025-10-29
7
+
8
+ This release changes the pinned API version to `2025-10-29.clover`.
9
+
3
10
  * [#2477](https://github.com/stripe/stripe-node/pull/2477) Update generated code
4
11
  * Improve docs for PaymentIntent related endpoints
5
12
  * [#2469](https://github.com/stripe/stripe-node/pull/2469) Update generated code
package/VERSION CHANGED
@@ -1 +1 @@
1
- 19.2.0
1
+ 19.2.1
@@ -430,7 +430,7 @@ class RequestSender {
430
430
  contentType: apiMode == 'v2'
431
431
  ? 'application/json'
432
432
  : 'application/x-www-form-urlencoded',
433
- contentLength: requestData.length,
433
+ contentLength: Buffer.byteLength(requestData, 'utf8'),
434
434
  apiVersion: apiVersion,
435
435
  clientUserAgent,
436
436
  method,
@@ -37,7 +37,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
37
37
  ];
38
38
  const defaultRequestSenderFactory = (stripe) => new RequestSender_js_1.RequestSender(stripe, StripeResource_js_1.StripeResource.MAX_BUFFERED_REQUEST_METRICS);
39
39
  function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
40
- Stripe.PACKAGE_VERSION = '19.2.0';
40
+ Stripe.PACKAGE_VERSION = '19.2.1';
41
41
  Stripe.API_VERSION = apiVersion_js_1.ApiVersion;
42
42
  Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, (0, utils_js_1.determineProcessUserAgentProperties)());
43
43
  Stripe.StripeResource = StripeResource_js_1.StripeResource;
@@ -427,7 +427,7 @@ export class RequestSender {
427
427
  contentType: apiMode == 'v2'
428
428
  ? 'application/json'
429
429
  : 'application/x-www-form-urlencoded',
430
- contentLength: requestData.length,
430
+ contentLength: Buffer.byteLength(requestData, 'utf8'),
431
431
  apiVersion: apiVersion,
432
432
  clientUserAgent,
433
433
  method,
@@ -34,7 +34,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
34
34
  ];
35
35
  const defaultRequestSenderFactory = (stripe) => new RequestSender(stripe, StripeResource.MAX_BUFFERED_REQUEST_METRICS);
36
36
  export function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
37
- Stripe.PACKAGE_VERSION = '19.2.0';
37
+ Stripe.PACKAGE_VERSION = '19.2.1';
38
38
  Stripe.API_VERSION = ApiVersion;
39
39
  Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, determineProcessUserAgentProperties());
40
40
  Stripe.StripeResource = StripeResource;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stripe",
3
- "version": "19.2.0",
3
+ "version": "19.2.1",
4
4
  "description": "Stripe API wrapper",
5
5
  "keywords": [
6
6
  "stripe",
@@ -92,7 +92,7 @@ declare module 'stripe' {
92
92
  }
93
93
 
94
94
  namespace Payment {
95
- type Type = 'charge' | 'payment_intent';
95
+ type Type = 'charge' | 'payment_intent' | 'payment_record';
96
96
  }
97
97
 
98
98
  interface StatusTransitions {