Skip to content

Commit 25b1b03

Browse files
committed
Bump version to 21.0.0
1 parent 8a5fce1 commit 25b1b03

File tree

4 files changed

+69
-3
lines changed

4 files changed

+69
-3
lines changed

CHANGELOG.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,70 @@
11
# Changelog
2+
3+
## 21.0.0 - 2026-03-25
4+
5+
This release changes the pinned API version to `2026-03-25.dahlia` and contains breaking changes (prefixed with ⚠️ below). There's also a [detailed migration guide](https://github.com/stripe/stripe-node/wiki/Migration-guide-for-v21) to simplify your upgrade process.
6+
7+
Please review details for the breaking changes and alternatives in the [Stripe API changelog](https://docs.stripe.com/changelog/dahlia) before upgrading.
8+
9+
> Note: we're releasing another major version very soon that overhauls and improves the package's structure and typescript types. That will also use `2026-03-25.dahlia` as an API version and will _mostly_ be a drop-in replacement.
10+
11+
* ⚠️ **Breaking change:** [#2617](https://github.com/stripe/stripe-node/pull/2617) Add decimal_string support with vendored Decimal type
12+
- All `decimal_string` fields changed type from `string` to `Stripe.Decimal` in both request params and response objects. Code that reads or writes these fields as `string` will need to use `Stripe.Decimal` instead (construct via `Decimal.from("1.23")`, serialize via `.toString()`). Affected fields across v1 and v2 APIs:
13+
- **Checkout.Session**: `currency_conversion.fx_rate`
14+
- **Climate.Order**: `metric_tons`; **Climate.Product**: `metric_tons_available`
15+
- **CreditNoteLineItem**: `unit_amount_decimal`
16+
- **InvoiceItem**: `quantity_decimal`, `unit_amount_decimal`
17+
- **InvoiceLineItem**: `quantity_decimal`, `unit_amount_decimal`
18+
- **Issuing.Authorization** / **Issuing.Transaction** (and TestHelpers): `quantity_decimal`, `unit_cost_decimal`, `gross_amount_decimal`, `local_amount_decimal`, `national_amount_decimal`
19+
- **Plan**: `amount_decimal`, `flat_amount_decimal`, `unit_amount_decimal`
20+
- **Price**: `unit_amount_decimal`, `flat_amount_decimal` (including `currency_options` and `tiers`)
21+
- **V2.Core.Account** / **V2.Core.AccountPerson**: `percent_ownership`
22+
- Request params on **Invoice**, **Product**, **Quote**, **Subscription**, **SubscriptionItem**, **SubscriptionSchedule**, **PaymentLink**: `unit_amount_decimal`, `flat_amount_decimal`, `quantity_decimal` (where applicable)
23+
* ⚠️ **Breaking change:** [#2618](https://github.com/stripe/stripe-node/pull/2618)[#2616](https://github.com/stripe/stripe-node/pull/2616) Throw an error when using the wrong webhook parsing method
24+
* ⚠️ **Breaking change:** [#2604](https://github.com/stripe/stripe-node/pull/2604) Add new OAuth Error classes
25+
* ⚠️ **Breaking change:** [#2609](https://github.com/stripe/stripe-node/pull/2609) Drop support for Node 16
26+
* [#2612](https://github.com/stripe/stripe-node/pull/2612) add manual amount type
27+
* [#2600](https://github.com/stripe/stripe-node/pull/2600) Add runtime support for V2 int64 string-encoded fields
28+
29+
### ⚠️ Breaking changes due to changes in the Stripe API
30+
31+
* Generated changes from [#2611](https://github.com/stripe/stripe-node/pull/2611), [#2620](https://github.com/stripe/stripe-node/pull/2620), [#2618](https://github.com/stripe/stripe-node/pull/2618)
32+
* Add support for `upi_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
33+
* Add support for `upi` on `Charge.payment_method_details`, `Checkout.Session.payment_method_options`, `Checkout.SessionCreateParams.payment_method_options`, `ConfirmationToken.payment_method_preview`, `ConfirmationTokenCreateParams.testHelpers.payment_method_data`, `Mandate.payment_method_details`, `PaymentAttemptRecord.payment_method_details`, `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `SetupAttempt.payment_method_details`, `SetupIntent.payment_method_options`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentConfirmParams.payment_method_options`, `SetupIntentCreateParams.payment_method_data`, `SetupIntentCreateParams.payment_method_options`, `SetupIntentUpdateParams.payment_method_data`, and `SetupIntentUpdateParams.payment_method_options`
34+
* Add support for new value `tempo` on enums `Charge.payment_method_details.crypto.network`, `PaymentAttemptRecord.payment_method_details.crypto.network`, and `PaymentRecord.payment_method_details.crypto.network`
35+
* Add support for `integration_identifier` on `Checkout.SessionCreateParams` and `Checkout.Session`
36+
* Add support for new value `upi` on enums `Checkout.SessionCreateParams.excluded_payment_method_types`, `PaymentIntent.excluded_payment_method_types`, `PaymentIntentConfirmParams.excluded_payment_method_types`, `PaymentIntentCreateParams.excluded_payment_method_types`, `PaymentIntentUpdateParams.excluded_payment_method_types`, `SetupIntent.excluded_payment_method_types`, `SetupIntentCreateParams.excluded_payment_method_types`, and `SetupIntentUpdateParams.excluded_payment_method_types`
37+
* Add support for `crypto` on `Checkout.SessionCreateParams.payment_method_options`
38+
* Add support for new value `upi` on enum `Checkout.SessionCreateParams.payment_method_types`
39+
* Add support for `pending_invoice_item_interval` on `Checkout.SessionCreateParams.subscription_data`
40+
* Add support for new values `elements`, `embedded_page`, `form`, and `hosted_page` on enums `Checkout.Session.ui_mode` and `Checkout.SessionCreateParams.ui_mode`
41+
* Add support for new value `marine_carbon_removal` on enum `Climate.Supplier.removal_pathway`
42+
* Add support for new value `upi` on enums `ConfirmationTokenCreateParams.testHelpers.payment_method_data.type`, `PaymentIntentConfirmParams.payment_method_data.type`, `PaymentIntentCreateParams.payment_method_data.type`, `PaymentIntentUpdateParams.payment_method_data.type`, `SetupIntentConfirmParams.payment_method_data.type`, `SetupIntentCreateParams.payment_method_data.type`, and `SetupIntentUpdateParams.payment_method_data.type`
43+
* Add support for new value `upi` on enums `ConfirmationToken.payment_method_preview.type` and `PaymentMethod.type`
44+
* Add support for `metadata` on `CreditNoteCreateParams.lines[]`, `CreditNoteLineItem`, `CreditNotePreviewLinesParams.lines[]`, and `CreditNotePreviewParams.lines[]`
45+
* Add support for new value `upi` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type`
46+
* Add support for `quantity_decimal` on `InvoiceAddLinesParams.lines[]`, `InvoiceCreatePreviewParams.invoice_items[]`, `InvoiceItemCreateParams`, `InvoiceItemUpdateParams`, `InvoiceItem`, `InvoiceLineItemUpdateParams`, `InvoiceLineItem`, and `InvoiceUpdateLinesParams.lines[]`
47+
* ⚠️ Add support for `level` on `Issuing.AuthorizationCreateParams.testHelpers.risk_assessment.card_testing_risk` and `Issuing.AuthorizationCreateParams.testHelpers.risk_assessment.merchant_dispute_risk`
48+
* ⚠️ Remove support for `risk_level` on `Issuing.AuthorizationCreateParams.testHelpers.risk_assessment.card_testing_risk` and `Issuing.AuthorizationCreateParams.testHelpers.risk_assessment.merchant_dispute_risk`
49+
* Add support for `lifecycle_controls` on `Issuing.CardCreateParams` and `Issuing.Card`
50+
* ⚠️ Change type of `Issuing.Token.network_data.visa.card_reference_id` from `string` to `string | null`
51+
* ⚠️ Change type of `PaymentAttemptRecord.payment_method_details.card.brand` and `PaymentRecord.payment_method_details.card.brand` from `enum` to `enum | null`
52+
* ⚠️ Change type of `PaymentAttemptRecord.payment_method_details.card.exp_month` and `PaymentRecord.payment_method_details.card.exp_month` from `longInteger` to `longInteger | null`
53+
* ⚠️ Change type of `PaymentAttemptRecord.payment_method_details.card.exp_year` and `PaymentRecord.payment_method_details.card.exp_year` from `longInteger` to `longInteger | null`
54+
* ⚠️ Change type of `PaymentAttemptRecord.payment_method_details.card.funding` and `PaymentRecord.payment_method_details.card.funding` from `enum('credit'|'debit'|'prepaid'|'unknown')` to `enum('credit'|'debit'|'prepaid'|'unknown') | null`
55+
* ⚠️ Change type of `PaymentAttemptRecord.payment_method_details.card.last4` and `PaymentRecord.payment_method_details.card.last4` from `string` to `string | null`
56+
* ⚠️ Change type of `PaymentAttemptRecord.payment_method_details.card.moto` and `PaymentRecord.payment_method_details.card.moto` from `boolean` to `boolean | null`
57+
* Add support for `cryptogram`, `electronic_commerce_indicator`, `exemption_indicator_applied`, and `exemption_indicator` on `PaymentAttemptRecord.payment_method_details.card.three_d_secure` and `PaymentRecord.payment_method_details.card.three_d_secure`
58+
* Add support for `upi_handle_redirect_or_display_qr_code` on `PaymentIntent.next_action` and `SetupIntent.next_action`
59+
* Add support for new value `upi` on enums `PaymentLink.payment_method_types`, `PaymentLinkCreateParams.payment_method_types`, and `PaymentLinkUpdateParams.payment_method_types`
60+
* Add support for `recommended_action` and `signals` on `Radar.PaymentEvaluation`
61+
* ⚠️ Remove support for `insights` on `Radar.PaymentEvaluation`
62+
* Add support for new value `crypto_fingerprint` on enums `Radar.ValueList.item_type` and `Radar.ValueListCreateParams.item_type`
63+
* Add support for new value `canceled_by_retention_policy` on enum `Subscription.cancellation_details.reason`
64+
* Add support for new value `2026-03-25.dahlia` on enum `WebhookEndpointCreateParams.api_version`
65+
* ⚠️ Change type of `V2.Core.EventDestination.events_from` and `V2.Core.EventDestinationCreateParams.events_from` from `enum('other_accounts'|'self')` to `string`
66+
* Add support for error code `service_period_coupon_with_metered_tiered_item_unsupported` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError`
67+
268
## 20.4.1 - 2026-03-06
369
* [#2590](https://github.com/stripe/stripe-node/pull/2590) Add Stripe-Request-Trigger header
470
* [#2588](https://github.com/stripe/stripe-node/pull/2588) Add agent information to UserAgent

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.4.1
1+
21.0.0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stripe",
3-
"version": "20.4.1",
3+
"version": "21.0.0",
44
"description": "Stripe API wrapper",
55
"keywords": [
66
"stripe",

src/stripe.core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function createStripe(
6161
platformFunctions: PlatformFunctions,
6262
requestSender: RequestSenderFactory = defaultRequestSenderFactory
6363
): typeof Stripe {
64-
Stripe.PACKAGE_VERSION = '20.4.1';
64+
Stripe.PACKAGE_VERSION = '21.0.0';
6565
Stripe.API_VERSION = ApiVersion;
6666
const aiAgent =
6767
typeof process !== 'undefined' && process.env

0 commit comments

Comments
 (0)