From b042587e247f1c742df070fdb62dc50778c70654 Mon Sep 17 00:00:00 2001 From: adssib <75389300+adssib@users.noreply.github.com> Date: Fri, 20 Nov 2026 22:47:58 -0500 Subject: [PATCH 1/5] changelog: read the API version each stripe sdk release pins Co-Authored-By: Claude Opus 5.5 Signed-off-by: adssib <75389300+adssib@users.noreply.github.com> --- plugins/changelog/changelog.go | 5 +- plugins/changelog/pins.go | 92 +++++++++++++ plugins/changelog/pins_test.go | 105 +++++++++++++++ plugins/changelog/stripe.go | 18 +-- plugins/changelog/testdata/README.md | 16 ++- .../pins/stripe-dotnet-53.2.0-CHANGELOG.md | 47 +++++++ .../pins/stripe-go-87.2.0-CHANGELOG.md | 53 ++++++++ .../pins/stripe-java-34.1.0-CHANGELOG.md | 93 +++++++++++++ .../pins/stripe-node-23.2.0-CHANGELOG.md | 123 ++++++++++++++++++ .../pins/stripe-php-23.1.0-CHANGELOG.md | 70 ++++++++++ .../pins/stripe-python-17.1.0-CHANGELOG.md | 58 +++++++++ .../pins/stripe-ruby-21.1.0-CHANGELOG.md | 62 +++++++++ .../versions/stripe-go-tags-pins.json | 6 + providers/stripe-sdks.md | 5 + 14 files changed, 742 insertions(+), 11 deletions(-) create mode 100644 plugins/changelog/pins.go create mode 100644 plugins/changelog/pins_test.go create mode 100644 plugins/changelog/testdata/pins/stripe-dotnet-53.2.0-CHANGELOG.md create mode 100644 plugins/changelog/testdata/pins/stripe-go-87.2.0-CHANGELOG.md create mode 100644 plugins/changelog/testdata/pins/stripe-java-34.1.0-CHANGELOG.md create mode 100644 plugins/changelog/testdata/pins/stripe-node-23.2.0-CHANGELOG.md create mode 100644 plugins/changelog/testdata/pins/stripe-php-23.1.0-CHANGELOG.md create mode 100644 plugins/changelog/testdata/pins/stripe-python-17.1.0-CHANGELOG.md create mode 100644 plugins/changelog/testdata/pins/stripe-ruby-21.1.0-CHANGELOG.md create mode 100644 plugins/changelog/testdata/versions/stripe-go-tags-pins.json diff --git a/plugins/changelog/changelog.go b/plugins/changelog/changelog.go index ca64dc1..4fc4714 100644 --- a/plugins/changelog/changelog.go +++ b/plugins/changelog/changelog.go @@ -86,6 +86,7 @@ type File struct { TagPrefix string // a release's git tag is TagPrefix + its version: "v" for v0.86.0 Path string // the changelog's path in the repo Notes bool // the changelog is each GitHub release's notes, not a file + Pins string // the source a release's section says it pins a version of ("stripe/api"; pins.go), or "" Tag string // pinned: the release's tag: "2.0.0", "v0.86.0" Release string // pinned: the release as the changelog heads it: "2.0.0" } @@ -317,7 +318,7 @@ func (p Plugin) ListVersions(ctx context.Context, env plugin.Env) ([]plugin.Vers vs, err = versions.NPMReleases(ctx, env.Get, f.Package) default: // No registry patch-it lists from: the repo's release tags. - return versions.GitHubTags(ctx, env.Get, f.Repo, regexp.MustCompile(`^`+regexp.QuoteMeta(f.TagPrefix)+`(\d+(?:\.\d+)+)$`)) + vs, err = versions.GitHubTags(ctx, env.Get, f.Repo, regexp.MustCompile(`^`+regexp.QuoteMeta(f.TagPrefix)+`(\d+(?:\.\d+)+)$`)) } if err != nil { return nil, err @@ -325,7 +326,7 @@ func (p Plugin) ListVersions(ctx context.Context, env plugin.Env) ([]plugin.Vers for i := range vs { vs[i].Ref = f.TagPrefix + vs[i].ID } - return vs, nil + return f.pinned(ctx, env, vs), nil } // ReadAt fetches the changelog at the release's tag. diff --git a/plugins/changelog/pins.go b/plugins/changelog/pins.go new file mode 100644 index 0000000..d317633 --- /dev/null +++ b/plugins/changelog/pins.go @@ -0,0 +1,92 @@ +package changelog + +import ( + "context" + "log" + "regexp" + "strings" + + "github.com/patch-it-dev/patch-it-plugins/core/plugin" +) + +// What a release pins: a sentence in its own section of the changelog that +// names the version of another source it pins, in the words its SDK uses +// (Stripe's, checked 2026-11-20 in all seven SDKs' CHANGELOG.md): +// +// This release changes the pinned API version to `2026-11-18.endive`. +// This release **doesn't** change the pinned API version; it still uses `2026-05-27.dahlia`. +// This release **does not** change the pinned API version. It's still `2026-06-24.dahlia`. +// This release uses the same pinned API version to `2026-03-25.dahlia` as the last major release. +// +// A release that says nothing pins nothing here, even though it keeps the +// release before's: only what a release states is read. Two different +// versions in one section are none (precision over recall). Older wordings +// ("Major version release for API version 2022-08-01", "Move to API version +// …") don't say "pinned" and aren't read. +var statedPin = []*regexp.Regexp{ + regexp.MustCompile("pinned API version to `(" + apiVersion + ")`"), + regexp.MustCompile("change the pinned API version[.;] (?:[Ii]t's still|it still uses) `(" + apiVersion + ")`"), +} + +// apiVersion is a dated API version, with the release's name when it has +// one: "2026-11-18.endive", "2022-08-01". +const apiVersion = `\d{4}-\d{2}-\d{2}(?:\.[a-z]+)?` + +// pins are the versions each release of a Markdown changelog states it +// pins, by release as its heading names it. +func pins(file []byte) map[string]string { + out, conflict := map[string]string{}, map[string]bool{} + release, fenced := "", false + for _, l := range strings.Split(strings.ReplaceAll(string(file), "\r\n", "\n"), "\n") { + if strings.HasPrefix(l, "## ") || strings.HasPrefix(l, "# ") { + release = "" + if m := mdRelease.FindStringSubmatch(l); m != nil { + release = m[1] + } + continue + } + if strings.HasPrefix(strings.TrimSpace(l), "```") { + fenced = !fenced + continue + } + if release == "" || fenced { + continue + } + l = strings.ReplaceAll(l, "**", "") + for _, re := range statedPin { + for _, m := range re.FindAllStringSubmatch(l, -1) { + if have, ok := out[release]; ok && have != m[1] { + conflict[release] = true + } + out[release] = m[1] + } + } + } + for r := range conflict { + delete(out, r) + } + return out +} + +// pinned sets each version's MapsTo to what its section states it pins (f.Pins), +// read from the changelog at the newest version's tag, which has every +// earlier release's section. A changelog that can't be fetched leaves the +// versions as listed: what they pin is read on a later listing. +func (f File) pinned(ctx context.Context, env plugin.Env, vs []plugin.Version) []plugin.Version { + if f.Pins == "" || f.Notes || len(vs) == 0 { + return vs + } + newest := f.At(vs[len(vs)-1].ID) + page, err := env.Get(ctx, newest.URL()) + if err != nil { + log.Printf("%s: what its releases pin isn't read this time: %v", f.API, err) + return vs + } + stated := pins(page) + for i := range vs { + if v, ok := stated[vs[i].ID]; ok { + vs[i].MapsTo = plugin.Pin{API: f.Pins, Version: v} + } + } + return vs +} diff --git a/plugins/changelog/pins_test.go b/plugins/changelog/pins_test.go new file mode 100644 index 0000000..a6a24cd --- /dev/null +++ b/plugins/changelog/pins_test.go @@ -0,0 +1,105 @@ +package changelog + +import ( + "context" + "errors" + "maps" + "strings" + "testing" + + "github.com/patch-it-dev/patch-it-plugins/core/kit/kittest" + "github.com/patch-it-dev/patch-it-plugins/core/plugin" +) + +// Each Stripe SDK's changelog at its newest tag, trimmed to the releases +// that state their pinned API version in each wording the SDKs use, and one +// that states none (testdata/README.md): what each release pins, exactly as +// stated, and nothing for the release that doesn't say. +func TestStripeReleasesStateWhatTheyPin(t *testing.T) { + for _, c := range []struct { + file File + tag string + want map[string]string + }{ + {StripePython, "17.1.0", map[string]string{"17.1.0": "2026-11-18.endive"}}, // 17.0.0 says nothing + {StripeNode, "23.2.0", map[string]string{"23.2.0": "2026-11-18.endive", "22.0.0": "2026-03-25.dahlia"}}, + {StripeGo, "87.2.0", map[string]string{"87.2.0": "2026-11-18.endive", "86.0.0": "2026-05-27.dahlia"}}, + {StripeJava, "34.1.0", map[string]string{"34.1.0": "2026-10-28.endive", "33.0.0": "2026-05-27.dahlia"}}, + {StripeRuby, "21.1.0", map[string]string{"21.1.0": "2026-11-18.endive"}}, + {StripeDotnet, "53.2.0", map[string]string{"53.2.0": "2026-11-18.endive", "52.0.0": "2026-05-27.dahlia"}}, + {StripePHP, "23.1.0", map[string]string{"23.1.0": "2026-11-18.endive", "21.0.0": "2026-06-24.dahlia"}}, + } { + t.Run(c.file.API, func(t *testing.T) { + if c.file.Pins != "stripe/api" { + t.Errorf("Pins %q, want stripe/api", c.file.Pins) + } + got := pins(kittest.Read(t, "testdata/pins/"+strings.ReplaceAll(c.file.API, "/", "-")+"-"+c.tag+"-CHANGELOG.md")) + if !maps.Equal(got, c.want) { + t.Errorf("got %v, want %v", got, c.want) + } + }) + } +} + +// Listed, each version carries what its own section states it pins, read +// from the changelog at the newest version's tag; a version whose section +// says nothing pins nothing. +func TestListedVersionsCarryWhatTheyPin(t *testing.T) { + env := kittest.Env(t, kittest.Pages{ + "https://api.github.com/repos/stripe/stripe-go/tags?per_page=100&page=1": "testdata/versions/stripe-go-tags-pins.json", + StripeGo.At("87.2.0").URL(): "testdata/pins/stripe-go-87.2.0-CHANGELOG.md", + }) + vs, err := Plugin{File: StripeGo}.ListVersions(context.Background(), env) + if err != nil { + t.Fatal(err) + } + var got []string + for _, v := range vs { + got = append(got, v.ID+"="+v.MapsTo.API+"@"+v.MapsTo.Version) + } + want := "86.0.0=stripe/api@2026-05-27.dahlia 86.4.2=@ 87.2.0=stripe/api@2026-11-18.endive" + if strings.Join(got, " ") != want { + t.Errorf("got %s\nwant %s", strings.Join(got, " "), want) + } +} + +// A changelog that can't be fetched leaves the listing as it is, pinning +// nothing; a source without Pins never fetches it. +func TestPinsAreReadOnlyWhenTheyCanBe(t *testing.T) { + tags := kittest.Read(t, "testdata/versions/stripe-go-tags-pins.json") + var fetched []string + env := plugin.Env{Get: func(_ context.Context, url string) ([]byte, error) { + fetched = append(fetched, url) + if strings.Contains(url, "/tags?") { + return tags, nil + } + return nil, errors.New("503") + }} + vs, err := Plugin{File: StripeGo}.ListVersions(context.Background(), env) + if err != nil || len(vs) != 3 { + t.Fatalf("%v, %d versions", err, len(vs)) + } + for _, v := range vs { + if !v.MapsTo.IsZero() { + t.Errorf("%s pins %v with no changelog read", v.ID, v.MapsTo) + } + } + unpinned := StripeGo + unpinned.Pins = "" + fetched = nil + if _, err := (Plugin{File: unpinned}).ListVersions(context.Background(), env); err != nil || len(fetched) != 1 { + t.Errorf("without Pins: %v, fetched %v", err, fetched) + } +} + +// Two different versions in one release's section are none; a statement in +// a code block, or before the first release, is nobody's. +func TestAnUnsurePinIsNone(t *testing.T) { + got := pins([]byte("# Changelog\nThis release changes the pinned API version to `2020-01-01`.\n" + + "## 2.0.0 - 2026-01-02\nThis release changes the pinned API version to `2026-01-01.a`.\nThis release changes the pinned API version to `2026-01-02.b`.\n" + + "## 1.1.0 - 2026-01-01\n```\nThis release changes the pinned API version to `2025-12-01.a`.\n```\n" + + "## 1.0.0 - 2025-12-01\n* This release changes the pinned API version to `2025-11-01.a`.\n")) + if want := map[string]string{"1.0.0": "2025-11-01.a"}; !maps.Equal(got, want) { + t.Errorf("got %v, want %v", got, want) + } +} diff --git a/plugins/changelog/stripe.go b/plugins/changelog/stripe.go index d098922..5164d28 100644 --- a/plugins/changelog/stripe.go +++ b/plugins/changelog/stripe.go @@ -20,20 +20,22 @@ func init() { // Stripe's SDKs: one CHANGELOG.md each, "## X.Y.Z - date" // (older ones "## X.Y.Z - date"), every breaking bullet marked "⚠️"; each -// release tagged vX.Y.Z. +// release tagged vX.Y.Z. A release that changes the API version the SDK +// pins says so in its section, "This release changes the pinned API version +// to `2026-11-18.endive`." (pins.go): its MapsTo is that stripe/api version. var ( StripePython = File{API: "stripe/python", Package: "stripe", Ecosystem: "pypi", Module: "stripe", - Repo: "stripe/stripe-python", TagPrefix: "v", Path: "CHANGELOG.md"} + Repo: "stripe/stripe-python", TagPrefix: "v", Path: "CHANGELOG.md", Pins: "stripe/api"} StripeNode = File{API: "stripe/node", Package: "stripe", Ecosystem: "npm", - Repo: "stripe/stripe-node", TagPrefix: "v", Path: "CHANGELOG.md"} + Repo: "stripe/stripe-node", TagPrefix: "v", Path: "CHANGELOG.md", Pins: "stripe/api"} StripeGo = File{API: "stripe/go", Package: "github.com/stripe/stripe-go", Ecosystem: "go", - Repo: "stripe/stripe-go", TagPrefix: "v", Path: "CHANGELOG.md"} + Repo: "stripe/stripe-go", TagPrefix: "v", Path: "CHANGELOG.md", Pins: "stripe/api"} StripeJava = File{API: "stripe/java", Package: "com.stripe:stripe-java", Ecosystem: "maven", - Repo: "stripe/stripe-java", TagPrefix: "v", Path: "CHANGELOG.md"} + Repo: "stripe/stripe-java", TagPrefix: "v", Path: "CHANGELOG.md", Pins: "stripe/api"} StripeRuby = File{API: "stripe/ruby", Package: "stripe", Ecosystem: "rubygems", - Repo: "stripe/stripe-ruby", TagPrefix: "v", Path: "CHANGELOG.md"} + Repo: "stripe/stripe-ruby", TagPrefix: "v", Path: "CHANGELOG.md", Pins: "stripe/api"} StripeDotnet = File{API: "stripe/dotnet", Package: "Stripe.net", Ecosystem: "nuget", - Repo: "stripe/stripe-dotnet", TagPrefix: "v", Path: "CHANGELOG.md"} + Repo: "stripe/stripe-dotnet", TagPrefix: "v", Path: "CHANGELOG.md", Pins: "stripe/api"} StripePHP = File{API: "stripe/php", Package: "stripe/stripe-php", Ecosystem: "packagist", - Repo: "stripe/stripe-php", TagPrefix: "v", Path: "CHANGELOG.md"} + Repo: "stripe/stripe-php", TagPrefix: "v", Path: "CHANGELOG.md", Pins: "stripe/api"} ) diff --git a/plugins/changelog/testdata/README.md b/plugins/changelog/testdata/README.md index 48ad6f1..af05dd0 100644 --- a/plugins/changelog/testdata/README.md +++ b/plugins/changelog/testdata/README.md @@ -44,11 +44,25 @@ Read with `Plugin{File: ...}` and `Notes: true` (`sdks.go`): an SDK whose change | `github-octokit-net-0.5.2-release.json` | https://api.github.com/repos/octokit/octokit.net/releases/tags/v0.5.2 | `4b61105` | 2026-11-20 | MIT (octokit.net); trimmed to `html_url`, `tag_name`, `name`, `published_at` and `body`, re-indented, values unchanged | golden | | `github-octokit-net-0.5.1-release.json` | https://api.github.com/repos/octokit/octokit.net/releases/tags/v0.5.1 | `8a9e828` | 2026-11-20 | MIT (octokit.net); trimmed to `html_url`, `tag_name`, `name`, `published_at` and `body`, re-indented, values unchanged | drop test | +## What a release pins + +Read by `pins.go`; `pins_test.go` checks each release's stated pin. Every file is the SDK's `CHANGELOG.md` at its newest release tag, saved with `curl` on 2026-11-20, **trimmed** to the sections listed, each kept whole and unchanged. + +| File | URL | Tag commit | Sections kept | License | Quote | +|---|---|---|---|---|---| +| `pins/stripe-python-17.1.0-CHANGELOG.md` | https://raw.githubusercontent.com/stripe/stripe-python/v17.1.0/CHANGELOG.md | `2bbff43` | 17.1.0 (changes the pin), 17.0.0 (says nothing) | MIT (stripe-python) | "This release changes the pinned API version to `2026-11-18.endive`." | +| `pins/stripe-node-23.2.0-CHANGELOG.md` | https://raw.githubusercontent.com/stripe/stripe-node/v23.2.0/CHANGELOG.md | `dd92429` | 23.2.0, 23.0.1 (says nothing), 22.0.0 ("uses the same pinned API version to") | MIT (stripe-node) | "This release uses the same pinned API version to `2026-03-25.dahlia` as the last major release." | +| `pins/stripe-go-87.2.0-CHANGELOG.md` | https://raw.githubusercontent.com/stripe/stripe-go/v87.2.0/CHANGELOG.md | `c97713a` | 87.2.0, 86.4.2 (says nothing), 86.0.0 ("doesn't change") | MIT (stripe-go) | "This release **doesn't** change the pinned API version; it still uses `2026-05-27.dahlia`." | +| `pins/stripe-java-34.1.0-CHANGELOG.md` | https://raw.githubusercontent.com/stripe/stripe-java/v34.1.0/CHANGELOG.md | `d1dcf1a` | 34.1.0, 33.4.2 (says nothing), 33.0.0 ("doesn't change") | MIT (stripe-java) | "This release changes the pinned API version to `2026-10-28.endive`." | +| `pins/stripe-ruby-21.1.0-CHANGELOG.md` | https://raw.githubusercontent.com/stripe/stripe-ruby/v21.1.0/CHANGELOG.md | `6605e66` | 21.1.0, 21.0.0 (says nothing) | MIT (stripe-ruby) | "This release changes the pinned API version to `2026-11-18.endive`." | +| `pins/stripe-dotnet-53.2.0-CHANGELOG.md` | https://raw.githubusercontent.com/stripe/stripe-dotnet/v53.2.0/CHANGELOG.md | `a32d3eb` | 53.2.0, 52.4.2 (says nothing), 52.0.0 ("doesn't change") | Apache-2.0 (stripe-dotnet) | "This release changes the pinned API version to `2026-11-18.endive`." | +| `pins/stripe-php-23.1.0-CHANGELOG.md` | https://raw.githubusercontent.com/stripe/stripe-php/v23.1.0/CHANGELOG.md | `6694b4d` | 23.1.0, 23.0.0 (says nothing), 21.0.0 ("does not change") | MIT (stripe-php) | "This release **does not** change the pinned API version. It's still `2026-06-24.dahlia`." | + ## Version lists | File | URL | Saved | License | Use | |---|---|---|---|---| -| `versions/stripe-go-tags.json`, `versions/octokit-rest-releases.json` | https://api.github.com/repos/stripe/stripe-go/tags, https://api.github.com/repos/octokit/rest.js/releases (shape only) | written for the test, 2026-11-20 | not saved copies: a few real tag names and releases in the shape of GitHub's API (a pre-release, a draft and a tag of another series among them) | for the version-listing test only (tags for an ecosystem with no registry lister, releases for release notes); no golden reads them | +| `versions/stripe-go-tags.json`, `versions/stripe-go-tags-pins.json`, `versions/octokit-rest-releases.json` | https://api.github.com/repos/stripe/stripe-go/tags, https://api.github.com/repos/octokit/rest.js/releases (shape only) | written for the test, 2026-11-20 | not saved copies: a few real tag names and releases in the shape of GitHub's API (a pre-release, a draft and a tag of another series among them) | for the version-listing test only (tags for an ecosystem with no registry lister, releases for release notes); no golden reads them | | `pypi-urllib3-excerpt.json` | https://pypi.org/pypi/urllib3/json (shape only) | written for the test, 2026-11-20 | not a saved copy: four releases in the shape of PyPI's JSON API (`releases` → files with `upload_time_iso_8601`, `yanked`), dates approximate, a pre-release among them | for the version-listing test only (ListVersions, consecutive pairs); no golden reads it | ## JSON changelogs diff --git a/plugins/changelog/testdata/pins/stripe-dotnet-53.2.0-CHANGELOG.md b/plugins/changelog/testdata/pins/stripe-dotnet-53.2.0-CHANGELOG.md new file mode 100644 index 0000000..0f5fdee --- /dev/null +++ b/plugins/changelog/testdata/pins/stripe-dotnet-53.2.0-CHANGELOG.md @@ -0,0 +1,47 @@ +## 53.2.0 - 2026-11-18 +This release changes the pinned API version to `2026-11-18.endive`. + +* Improve webhook signature verification error messages + - When diagnostic metadata is present in the `Stripe-Signature` header, error messages help identify an incorrect signing secret or altered request body. +* Fix forward-compatible deserialization of unknown discriminated-union variants + + Preserve unknown string discriminators on concrete union bases with both Newtonsoft.Json and System.Text.Json, including safe serialization of fallback values. +* [#3491](https://github.com/stripe/stripe-dotnet/pull/3491) Prefix request_id (if available) in exception Message property +* [#3494](https://github.com/stripe/stripe-dotnet/pull/3494) Stop leaking a stale Stripe-Account when fetching an event's related object + + Adds `StripeClient.WithStripeContext()` to construct a `StripeClient` with the supplied `StripeContext` with `Stripe-Account` cleared. Adds calls to `WithStripeClient` from `EventNotification.FromJson` and when processing a `V2.Core.Event` API response. +* Keep `StripeContext` segments when serializing it with Newtonsoft.Json or System.Text.Json + + `StripeContext` now serializes as its `Stripe-Context` string (e.g. `"acct_123/acct_456"`), matching the API's wire format, instead of `{"Segments": [...]}`, which didn't deserialize correctly. Payloads previously serialized as `{"Segments": [...]}` still deserialize correctly. +* [#3493](https://github.com/stripe/stripe-dotnet/pull/3493) Update generated code + * Add support for new resource `V2.Core.ClaimableSandbox` + * Add support for `Create`, `Get`, and `RenewOnboardingLink` methods on resource `V2.Core.ClaimableSandbox` + * Add support for `FundingSources` on `Charge.PaymentMethodDetails.Card.Wallet.Link` and `Charge.PaymentMethodDetails.Link` + * Add support for `Fingerprint` on `Charge.PaymentMethodDetails.Paypay`, `PaymentAttemptRecord.PaymentMethodDetails.Paypay`, and `PaymentRecord.PaymentMethodDetails.Paypay` + * Add support for `AddressCollectionPrecision` on `Checkout.Session.AutomaticTax` and `CheckoutSessionAutomaticTaxOptions` + * Add support for `CarRentalData` and `LodgingData` on `PaymentIntent.PaymentDetails` and `PaymentIntentPaymentDetailsOptions` + * Change type of `PaymentLinkPaymentIntentDataOptions.CaptureMethod` from `enum('automatic'|'automatic_async'|'manual')` to `emptyable(enum('automatic'|'automatic_async'|'manual'))` + * Add support for `CaptureMethod` on `PaymentLinkPaymentIntentDataOptions` + * Add support for `LossMessage` on `Product.MarketingFeature`, `ProductMarketingFeatureOptions`, and `ProductMarketingFeaturesOptions` + * Add support for `Application` on `Refund` + * Add support for `Bizum` and `Upi` on `Refund.DestinationDetails` + * Add support for `TaxInvoiceMonth` on `Reporting.ReportRun.Parameters` and `ReportingReportRunParametersOptions` + * Add support for `Igic` on `Tax.Registration.CountryOptions.Es` and `TaxRegistrationCountryOptionsEsOptions` + * Add support for `NetworkDetails` on `Treasury.InboundTransfer.FailureDetails`, `Treasury.OutboundPayment.ReturnedDetails`, `Treasury.OutboundTransfer.ReturnedDetails`, and `TreasuryInboundTransferFailureDetailsOptions` + * Add support for `FailureDetails` on `Treasury.TestHelpersInboundTransferReturnInboundTransferOptions` + * Add support for `AccountDashboard` on `V2.Core.AccountLink.UseCase` and `V2CoreAccountLinkUseCaseOptions` + * Add support for `PaypayPayments` on `V2.Core.Account.Configuration.Merchant.Capabilities`, `V2.Core.Account.Configuration.Merchant`, `V2CoreAccountConfigurationMerchantCapabilitiesOptions`, and `V2CoreAccountConfigurationMerchantOptions` + * Add support for `BilliePayments`, `MbWayPayments`, `NzBankAccountBecsDebitPayments`, and `PixPayments` on `V2.Core.Account.Configuration.Merchant.Capabilities` and `V2CoreAccountConfigurationMerchantCapabilitiesOptions` + * Add support for `AdditionalMaterial` on `V2.Core.Account.Configuration.Merchant.KonbiniPayments` and `V2CoreAccountConfigurationMerchantKonbiniPaymentsOptions` + * Add support for event notifications `V2CoreClaimableSandboxClaimedEvent`, `V2CoreClaimableSandboxCreatedEvent`, `V2CoreClaimableSandboxExpiredEvent`, `V2CoreClaimableSandboxExpiringEvent`, and `V2CoreClaimableSandboxUpdatedEvent` with related object `V2.Core.ClaimableSandbox` + +## 52.4.2 - 2026-09-09 +* [#3445](https://github.com/stripe/stripe-dotnet/pull/3445) Validate that webhook secrets are non-empty + +## 52.0.0 - 2026-06-05 +This release **doesn't** change the pinned API version; it still uses `2026-05-27.dahlia`. + +We're doing an out-of-band-major to update a field type that changed. If you're not using `tax_details`, this is a no-op release when compared with the last one. If you _are_ using `tax_details` its type has changed slightly and you'll have to update your code when upgrading. + +* [#3394](https://github.com/stripe/stripe-dotnet/pull/3394) Add "source" field to user-agent header +* ⚠️ [#3396](https://github.com/stripe/stripe-dotnet/pull/3396) Make `tax_rate.tax_details` expandable diff --git a/plugins/changelog/testdata/pins/stripe-go-87.2.0-CHANGELOG.md b/plugins/changelog/testdata/pins/stripe-go-87.2.0-CHANGELOG.md new file mode 100644 index 0000000..0893adf --- /dev/null +++ b/plugins/changelog/testdata/pins/stripe-go-87.2.0-CHANGELOG.md @@ -0,0 +1,53 @@ +## 87.2.0 - 2026-11-18 +This release changes the pinned API version to `2026-11-18.endive`. + +* Improve webhook signature verification error messages + - When diagnostic metadata is present in the `Stripe-Signature` header, error messages help identify an incorrect signing secret or altered request body. +* Upgrade decimal dependency to v1.5.0 + - Decimal values with excessively large positive or negative exponents now return decoding errors. +* Honor each client's `EnableTelemetry` setting + - Separate the `X-Stripe-Client-User-Agent` cache so that clients with different telemetry settings coexist in the same process. +* Send an `Idempotency-Key` on write requests made without params + - `RawRequest` and the deprecated resource packages (e.g. `account.New(nil)`) now generate an `Idempotency-Key` for `POST`, `PUT`, `PATCH`, and `DELETE` requests when params is `nil`, and reuse it on retries. Previously these requests were sent and retried without a key. +* [#2496](https://github.com/stripe/stripe-go/pull/2496) Update generated code + * Add support for new resource `V2CoreClaimableSandbox` + * Add support for `Get`, `New`, and `RenewOnboardingLink` methods on resource `V2CoreClaimableSandbox` + * Add support for `FundingSources` on `ChargePaymentMethodDetailsCardWalletLink` and `ChargePaymentMethodDetailsLink` + * Add support for new value `tron` on enums `ChargePaymentMethodDetailsCrypto.Network`, `PaymentAttemptRecordPaymentMethodDetailsCrypto.Network`, and `PaymentRecordPaymentMethodDetailsCrypto.Network` + * Add support for `Fingerprint` on `ChargePaymentMethodDetailsPaypay`, `PaymentAttemptRecordPaymentMethodDetailsPaypay`, and `PaymentRecordPaymentMethodDetailsPaypay` + * Add support for `AddressCollectionPrecision` on `CheckoutSessionAutomaticTaxParams` and `CheckoutSessionAutomaticTax` + * Add support for `CarRentalData` and `LodgingData` on `PaymentIntentCapturePaymentDetailsParams`, `PaymentIntentConfirmPaymentDetailsParams`, `PaymentIntentPaymentDetailsParams`, and `PaymentIntentPaymentDetails` + * Change type of `PaymentLinkPaymentIntentDataParams.CaptureMethod` from `enum('automatic'|'automatic_async'|'manual')` to `emptyable(enum('automatic'|'automatic_async'|'manual'))` + * Add support for `CaptureMethod` on `PaymentLinkPaymentIntentDataParams` + * Add support for `LossMessage` on `ProductMarketingFeatureParams`, `ProductMarketingFeature`, and `ProductMarketingFeaturesParams` + * Add support for `Application` on `Refund` + * Add support for `Bizum` and `Upi` on `RefundDestinationDetails` + * Add support for `TaxInvoiceMonth` on `ReportingReportRunParametersParams` and `ReportingReportRunParameters` + * Add support for `Igic` on `TaxRegistrationCountryOptionsEsParams` and `TaxRegistrationCountryOptionsEs` + * Add support for new value `igic` on enum `TaxRegistrationCountryOptionsEs.Type` + * Add support for new values `stripe_s700_devkit`, `stripe_s710_devkit`, `stripe_t600_devkit`, `verifone_ux700_devkit`, and `verifone_v660p_devkit` on enum `TerminalReader.DeviceType` + * Add support for `NetworkDetails` on `TestHelpersTreasuryInboundTransferFailFailureDetailsParams`, `TreasuryInboundTransferFailureDetails`, `TreasuryOutboundPaymentReturnedDetails`, and `TreasuryOutboundTransferReturnedDetails` + * Add support for `FailureDetails` on `TestHelpersTreasuryInboundTransferReturnInboundTransferParams` + * Add support for `AccountDashboard` on `V2CoreAccountLinkUseCaseParams` and `V2CoreAccountLinkUseCase` + * Add support for new value `account_dashboard` on enum `V2CoreAccountLinkUseCase.Type` + * Add support for `PaypayPayments` on `V2CoreAccountConfigurationMerchantCapabilitiesParams`, `V2CoreAccountConfigurationMerchantCapabilities`, `V2CoreAccountConfigurationMerchantParams`, and `V2CoreAccountConfigurationMerchant` + * Add support for `BilliePayments`, `MbWayPayments`, `NzBankAccountBECSDebitPayments`, and `PixPayments` on `V2CoreAccountConfigurationMerchantCapabilitiesParams` and `V2CoreAccountConfigurationMerchantCapabilities` + * Add support for `AdditionalMaterial` on `V2CoreAccountConfigurationMerchantKonbiniPaymentsParams` and `V2CoreAccountConfigurationMerchantKonbiniPayments` + * Add support for new values `billie_payments`, `mb_way_payments`, `nz_bank_account_becs_debit_payments`, `paypay_payments`, and `pix_payments` on enums `V2CoreAccountFutureRequirementsEntryImpactRestrictsCapability.Capability` and `V2CoreAccountRequirementsEntryImpactRestrictsCapability.Capability` + * Add support for new values `billie_payments`, `mb_way_payments`, `nz_bank_account_becs_debit_payments`, `paypay_payments`, and `pix_payments` on enum `EventsV2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.UpdatedCapability` + * Add support for event notifications `V2CoreClaimableSandboxClaimedEvent`, `V2CoreClaimableSandboxCreatedEvent`, `V2CoreClaimableSandboxExpiredEvent`, `V2CoreClaimableSandboxExpiringEvent`, and `V2CoreClaimableSandboxUpdatedEvent` with related object `V2CoreClaimableSandbox` + * Add support for error code `inactive_api_operation_confirmation_required` on `Error`, `InvoiceLastFinalizationError`, `PaymentIntentLastPaymentError`, `SetupAttemptSetupError`, `SetupIntentLastSetupError`, `StripeError`, and `TerminalReaderActionApiError` + * Add support for error codes `claimable_sandbox_creation_rate_limit_exceeded` and `claimable_sandbox_testing_creation_rate_limit_exceeded` on `RateLimitError` + +## 86.4.2 - 2026-09-09 +* [#2429](https://github.com/stripe/stripe-go/pull/2429) Validate that webhook secrets are non-empty + +## 86.0.0 - 2026-06-05 +This release **doesn't** change the pinned API version; it still uses `2026-05-27.dahlia`. + +We're doing an out-of-band-major to update a field type that changed. If you're not using `tax_details`, this is a no-op release when compared with the last one. If you _are_ using `tax_details` its type has changed slightly and you'll have to update your code when upgrading. + +* [#2367](https://github.com/stripe/stripe-go/pull/2367) Remove `Limit`, `StartingAfter`, and `EndingBefore` fields for `List` methods that do not accept those fields + - Fixes a bug where `Limit`, `StartingAfter`, and `EndingBefore` were embedded in `CapabilityListParams` and `ReportingReportTypeListParams` even though they are not valid parameters and would have always resulted in a 400 from the Stripe API if set. If you were including them before in either of those 2 structs, you can safely remove them. +* [#2370](https://github.com/stripe/stripe-go/pull/2370) Add "source" field to user-agent header +* ⚠️ [#2375](https://github.com/stripe/stripe-go/pull/2375) Make `tax_rate.tax_details` expandable diff --git a/plugins/changelog/testdata/pins/stripe-java-34.1.0-CHANGELOG.md b/plugins/changelog/testdata/pins/stripe-java-34.1.0-CHANGELOG.md new file mode 100644 index 0000000..d66b2b1 --- /dev/null +++ b/plugins/changelog/testdata/pins/stripe-java-34.1.0-CHANGELOG.md @@ -0,0 +1,93 @@ +## 34.1.0 - 2026-10-29 +This release changes the pinned API version to `2026-10-28.endive`. + +* [#2313](https://github.com/stripe/stripe-java/pull/2313) Reject ASCII-whitespace-only webhook secrets + - Reject webhook signing secrets made entirely of ASCII whitespace instead of using them as HMAC keys. +* [#2312](https://github.com/stripe/stripe-java/pull/2312) Add API v2 Search support + + Adds `com.stripe.model.v2.StripeSearchResult` and support for auto pagination of search results. +* [#2316](https://github.com/stripe/stripe-java/pull/2316) Fix API v2 list auto-pagination across empty pages +* Preserve event context on fetched related objects +* [#2321](https://github.com/stripe/stripe-java/pull/2321) Update generated code + * Add support for new resources `v2.core.vault.GbBankAccount`, `v2.core.vault.UsBankAccount`, `v2.moneymanagement.Adjustment`, `v2.moneymanagement.FinancialAccount`, `v2.moneymanagement.FinancialAddressCreditSimulation`, `v2.moneymanagement.FinancialAddress`, `v2.moneymanagement.InboundTransfer`, `v2.moneymanagement.OutboundPayment`, `v2.moneymanagement.OutboundSetupIntent`, `v2.moneymanagement.PayoutIntent`, `v2.moneymanagement.PayoutMethod`, `v2.moneymanagement.PayoutMethodsBankAccountSpec`, `v2.moneymanagement.ReceivedCredit`, `v2.moneymanagement.RecipientVerification`, `v2.moneymanagement.TransactionEntry`, and `v2.moneymanagement.Transaction` + * Add support for `acknowledge`, `create`, `recipient_verifications`, and `retrieve` methods on resource `v2.moneymanagement.RecipientVerification` + * Add support for `list` and `retrieve` methods on resources `v2.moneymanagement.Adjustment`, `v2.moneymanagement.ReceivedCredit`, and `v2.moneymanagement.TransactionEntry` + * Add support for `list`, `refresh_regulatory_receipt`, `retrieve`, and `update` methods on resource `v2.moneymanagement.Transaction` + * Add support for `credit` method on resource `v2.moneymanagement.FinancialAddressCreditSimulation` + * Add support for `retrieve` method on resource `v2.moneymanagement.PayoutMethodsBankAccountSpec` + * Add support for `archive`, `list`, `retrieve`, and `unarchive` methods on resource `v2.moneymanagement.PayoutMethod` + * Add support for `cancel`, `confirm`, `create`, `list`, `refresh_fx_quote`, `refresh_recipient_verification`, `retrieve`, and `update` methods on resource `v2.moneymanagement.PayoutIntent` + * Add support for `cancel`, `create`, `list`, `retrieve`, and `update` methods on resource `v2.moneymanagement.OutboundSetupIntent` + * Add support for `cancel`, `create`, `list`, and `retrieve` methods on resource `v2.moneymanagement.OutboundPayment` + * Add support for `create`, `list`, and `retrieve` methods on resources `v2.moneymanagement.FinancialAddress` and `v2.moneymanagement.InboundTransfer` + * Add support for `list`, `retrieve`, and `update` methods on resource `v2.moneymanagement.FinancialAccount` + * Add support for `archive`, `confirm_microdeposits`, `create`, `list`, `retrieve`, `send_microdeposits`, `unarchive`, and `update` methods on resource `v2.core.vault.UsBankAccount` + * Add support for `archive`, `create`, `list`, `retrieve`, and `unarchive` methods on resource `v2.core.vault.GbBankAccount` + * Add support for `reportingChart`, `terminalHardwareOrders`, and `terminalHardwareShop` on `AccountSession.components` and `AccountSessionCreateParams.components` + * Add support for `weroPayments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities` + * Add support for `physicalAddress` on `Account.company`, `AccountCreateParams.company`, `AccountUpdateParams.company`, and `TokenCreateParams.account.company` + * Add support for `proofOfBusinessPresence` on `AccountCreateParams.documents` and `AccountUpdateParams.documents` + * Add support for `subscriptionPause` on `billingportal.Configuration.features`, `billingportal.ConfigurationCreateParams.features`, `billingportal.ConfigurationUpdateParams.features`, `billingportal.Session.flow`, and `billingportal.SessionCreateParams.flow_data` + * Add support for `afterExpiration` on `billingportal.SessionCreateParams` and `billingportal.Session` + * Add support for new value `subscription_pause` on enum `billingportal.SessionCreateParams.flow_data.type` + * Add support for `setupCredentialUsage` on `Charge.payment_method_details.card`, `PaymentIntent.payment_method_options.card`, `PaymentIntentConfirmParams.payment_method_options.card`, `PaymentIntentCreateParams.payment_method_options.card`, `PaymentIntentUpdateParams.payment_method_options.card`, `SetupIntent.payment_method_options.card`, `SetupIntentConfirmParams.payment_method_options.card`, `SetupIntentCreateParams.payment_method_options.card`, and `SetupIntentUpdateParams.payment_method_options.card` + * Add support for `storedCredentialUsage` on `Charge.payment_method_details.card`, `PaymentAttemptRecord.payment_method_details.card`, `PaymentIntent.payment_method_options.card`, `PaymentIntentConfirmParams.payment_method_options.card`, `PaymentIntentCreateParams.payment_method_options.card`, `PaymentIntentUpdateParams.payment_method_options.card`, and `PaymentRecord.payment_method_details.card` + * Add support for new value `hi-IN` on enum `checkout.SessionCreateParams.locale` + * Add support for `accountTaxIds`, `customFields`, `description`, and `footer` on `PaymentLink.subscription_data.invoice_settings`, `PaymentLinkCreateParams.subscription_data.invoice_settings`, `PaymentLinkUpdateParams.subscription_data.invoice_settings`, and `checkout.SessionCreateParams.subscription_data.invoice_settings` + * Add support for `paymentIntentData` on `checkout.SessionUpdateParams` + * Add support for new values `au_acn`, `au_wpn`, `bw_vat`, `ci_vat`, `cz_dic`, `fr_siren`, `fr_siret`, `fr_spi`, `gh_tin`, `is_kt`, `md_cf`, `mu_vat`, `mz_nuit`, `nz_bn`, `pt_nif`, `sm_coe`, `tt_bir`, and `tt_vat` on enums `CustomerCreateParams.tax_id_data[].type`, `InvoiceCreatePreviewParams.customer_details.tax_ids[].type`, `TaxIdCreateParams.type`, and `tax.CalculationCreateParams.customer_details.tax_ids[].type` + * Add support for `intendedSubmissionMethod` on `DisputeUpdateParams` and `Dispute` + * Add support for `appeal` on `Dispute.evidence` and `DisputeUpdateParams.evidence` + * Add support for `submissionMethod` on `Dispute.evidence_details` + * Add support for new value `sequra` on enums `InvoiceCreateParams.payment_settings.paymentMethodTypes`, `InvoiceUpdateParams.payment_settings.paymentMethodTypes`, `SubscriptionCreateParams.payment_settings.paymentMethodTypes`, and `SubscriptionUpdateParams.payment_settings.paymentMethodTypes` + * Add support for new values `admissions_tax`, `attendance_tax`, `entertainment_tax`, `get_fund`, `gross_receipts_tax`, `hospitality_tax`, `luxury_tax`, `nhil`, `resort_tax`, and `tourism_tax` on enums `InvoiceAddLinesParams.lines[].tax_amounts[].tax_rate_data.taxType`, `InvoiceLineItemUpdateParams.tax_amounts[].tax_rate_data.taxType`, `InvoiceUpdateLinesParams.lines[].tax_amounts[].tax_rate_data.taxType`, `TaxRateCreateParams.taxType`, and `TaxRateUpdateParams.taxType` + * Add support for `pauseSchedules` on `InvoiceCreatePreviewParams.schedule_details` + * Add support for `financialAccount` on `issuing.CardUpdateParams` + * Add support for `deliveredAt` and `shippedAt` on `issuing.Card.shipping` + * Add support for new value `scalapay` on enums `PaymentLinkCreateParams.paymentMethodTypes` and `PaymentLinkUpdateParams.paymentMethodTypes` + * Add support for `referenceStatus` and `reference` on `Refund.destination_details.afterpay_clearpay`, `Refund.destination_details.klarna`, and `Refund.destination_details.paypal` + * Add support for `bw`, `ci`, `gh`, and `mu` on `tax.Registration.country_options` and `tax.RegistrationCreateParams.country_options` + * Add support for `utilityUsersTax` on `tax.Registration.country_options.us` and `tax.RegistrationCreateParams.country_options.us` + * Add support for new values `digital_excise_tax` and `utility_users_tax` on enum `tax.RegistrationCreateParams.country_options.us.type` + * Add support for `readerSecurity` and `stripeT600` on `terminal.ConfigurationCreateParams`, `terminal.ConfigurationUpdateParams`, and `terminal.Configuration` + * Add support for new values `simulated_stripe_t600` and `stripe_t600` on enum `terminal.ReaderListParams.deviceType` + * Add support for new values `three_d_secure.authentication.canceled`, `three_d_secure.authentication.challenge_started`, `three_d_secure.authentication.errored`, `three_d_secure.authentication.failed`, `three_d_secure.authentication.requires_challenge`, `three_d_secure.authentication.requires_submission`, and `three_d_secure.authentication.succeeded` on enums `WebhookEndpointCreateParams.enabledEvents` and `WebhookEndpointUpdateParams.enabledEvents` + * Add support for new value `2026-10-28.endive` on enum `WebhookEndpointCreateParams.apiVersion` + * Add support for `bankAccounts` and `cards` on `v2.core.Account.configuration.recipient.capabilities`, `v2.core.AccountCreateParams.configuration.recipient.capabilities`, and `v2.core.AccountUpdateParams.configuration.recipient.capabilities` + * Add support for `payoutMethods` on `v2.core.Account.defaults` and `v2.core.AccountUpdateParams.defaults` + * Add support for `alternatives` on `v2.core.Account.future_requirements` and `v2.core.Account.requirements` + * Add support for `customer` and `subscription` on `EventsV1InvoiceUpcomingEvent` + * Add support for new values `bank_accounts.ach`, `bank_accounts.fedwire`, `bank_accounts.fps`, `bank_accounts.rtp`, `bank_accounts.sepa`, and `bank_accounts.swift` on enum `EventsV2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.updatedCapability` + * Add support for snapshot events `three_d_secure.authentication.canceled`, `three_d_secure.authentication.challenge_started`, `three_d_secure.authentication.errored`, `three_d_secure.authentication.failed`, `three_d_secure.authentication.requires_challenge`, `three_d_secure.authentication.requires_submission`, and `three_d_secure.authentication.succeeded` with resource `threedsecure.Authentication` + * Add support for event notifications `V1CustomerDiscountSourceChangedEvent`, `V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent`, and `V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent` + * Add support for event notifications `V1CustomerSubscriptionActiveEvent`, `V1CustomerSubscriptionCancelAtChangedEvent`, `V1CustomerSubscriptionDefaultPaymentMethodChangedEvent`, `V1CustomerSubscriptionIncompleteEvent`, `V1CustomerSubscriptionIncompleteExpiredEvent`, `V1CustomerSubscriptionItemAddedEvent`, `V1CustomerSubscriptionItemPriceChangedEvent`, `V1CustomerSubscriptionItemQuantityChangedEvent`, `V1CustomerSubscriptionItemRemovedEvent`, `V1CustomerSubscriptionItemTaxRatesChangedEvent`, `V1CustomerSubscriptionPastDueEvent`, `V1CustomerSubscriptionTrialingEvent`, and `V1CustomerSubscriptionUnpaidEvent` with related object `Subscription` + * Add support for event notifications `V1FinancialConnectionsAccountBalanceRefreshFailedEvent`, `V1FinancialConnectionsAccountBalanceRefreshSucceededEvent`, `V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent`, `V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent`, `V1FinancialConnectionsAccountOwnershipRefreshFailedEvent`, `V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent`, `V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent`, `V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent`, `V1FinancialConnectionsAccountTransactionsRefreshFailedEvent`, and `V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent` with related object `financialconnections.Account` + * Add support for event notifications `V1InvoiceDiscountAddedEvent`, `V1InvoiceDiscountRemovedEvent`, `V1InvoiceLineItemAddedEvent`, `V1InvoiceLineItemPricingChangedEvent`, `V1InvoiceLineItemQuantityChangedEvent`, and `V1InvoiceLineItemRemovedEvent` with related object `Invoice` + * Add support for event notifications `V1InvoicePaymentCanceledEvent` and `V1InvoicePaymentOpenEvent` with related object `InvoicePayment` + * Add support for event notifications `V1InvoiceitemAmountChangedEvent`, `V1InvoiceitemDiscountAddedEvent`, and `V1InvoiceitemDiscountRemovedEvent` with related object `InvoiceItem` + * Add support for event notifications `V1PriceActivatedEvent`, `V1PriceDeactivatedEvent`, `V1PriceLookupKeyChangedEvent`, and `V1PriceTaxBehaviorChangedEvent` with related object `Price` + * Add support for event notifications `V1ProductActivatedEvent`, `V1ProductDeactivatedEvent`, `V1ProductDefaultPriceChangedEvent`, and `V1ProductTaxCodeChangedEvent` with related object `Product` + * Add support for event notification `V1PromotionCodeFullyRedeemedEvent` with related object `PromotionCode` + * Add support for event notifications `V1SubscriptionSchedulePhaseAddedEvent`, `V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent`, `V1SubscriptionSchedulePhaseEndDateChangedEvent`, `V1SubscriptionSchedulePhaseRemovedEvent`, and `V1SubscriptionSchedulePhaseTrialEndChangedEvent` with related object `SubscriptionSchedule` + * Add support for event notification `V2MoneyManagementAdjustmentCreatedEvent` with related object `v2.moneymanagement.Adjustment` + * Add support for event notifications `V2MoneyManagementFinancialAccountCreatedEvent` and `V2MoneyManagementFinancialAccountUpdatedEvent` with related object `v2.moneymanagement.FinancialAccount` + * Add support for event notifications `V2MoneyManagementFinancialAddressActivatedEvent` and `V2MoneyManagementFinancialAddressFailedEvent` with related object `v2.moneymanagement.FinancialAddress` + * Add support for event notifications `V2MoneyManagementInboundTransferAvailableEvent`, `V2MoneyManagementInboundTransferBankDebitFailedEvent`, `V2MoneyManagementInboundTransferBankDebitProcessingEvent`, `V2MoneyManagementInboundTransferBankDebitQueuedEvent`, `V2MoneyManagementInboundTransferBankDebitReturnedEvent`, and `V2MoneyManagementInboundTransferBankDebitSucceededEvent` with related object `v2.moneymanagement.InboundTransfer` + * Add support for event notifications `V2MoneyManagementOutboundPaymentCanceledEvent`, `V2MoneyManagementOutboundPaymentCreatedEvent`, `V2MoneyManagementOutboundPaymentFailedEvent`, `V2MoneyManagementOutboundPaymentPostedEvent`, `V2MoneyManagementOutboundPaymentReturnedEvent`, `V2MoneyManagementOutboundPaymentUnderReviewEvent`, and `V2MoneyManagementOutboundPaymentUpdatedEvent` with related object `v2.moneymanagement.OutboundPayment` + * Add support for event notifications `V2MoneyManagementPayoutIntentCanceledEvent`, `V2MoneyManagementPayoutIntentCreatedEvent`, `V2MoneyManagementPayoutIntentPendingEvent`, `V2MoneyManagementPayoutIntentPostedEvent`, `V2MoneyManagementPayoutIntentProcessingEvent`, `V2MoneyManagementPayoutIntentRequiresActionEvent`, and `V2MoneyManagementPayoutIntentUpdatedEvent` with related object `v2.moneymanagement.PayoutIntent` + * Add support for event notifications `V2MoneyManagementPayoutMethodCreatedEvent` and `V2MoneyManagementPayoutMethodUpdatedEvent` with related object `v2.moneymanagement.PayoutMethod` + * Add support for event notifications `V2MoneyManagementReceivedCreditAvailableEvent`, `V2MoneyManagementReceivedCreditFailedEvent`, `V2MoneyManagementReceivedCreditReturnedEvent`, and `V2MoneyManagementReceivedCreditSucceededEvent` with related object `v2.moneymanagement.ReceivedCredit` + * Add support for event notifications `V2MoneyManagementRecipientVerificationCreatedEvent` and `V2MoneyManagementRecipientVerificationUpdatedEvent` with related object `v2.moneymanagement.RecipientVerification` + * Add support for event notifications `V2MoneyManagementTransactionCreatedEvent` and `V2MoneyManagementTransactionUpdatedEvent` with related object `v2.moneymanagement.Transaction` + * Add support for error types `AlreadyCanceledException`, `BlockedByStripeException`, `CannotProceedException`, `CapabilityNotEnabledException`, `ControlledByAlternateResourceException`, `FeatureNotEnabledException`, `FinancialAccountNotOpenException`, `FxQuoteNeedsRefreshException`, `InsufficientFundsException`, `InvalidPaymentMethodException`, `InvalidPayoutMethodException`, `InvalidVaultedCredentialException`, `NotCancelableException`, `QuotaExceededException`, `RecipientNotNotifiableException`, `VerificationAttemptFailedException`, `VerificationExpiredException`, and `VerificationNotInitiatedException` + +## 33.4.2 - 2026-09-09 +* [#2286](https://github.com/stripe/stripe-java/pull/2286) Validate that webhook secrets are non-empty + +## 33.0.0 - 2026-06-05 +This release **doesn't** change the pinned API version; it still uses `2026-05-27.dahlia`. + +We're doing an out-of-band-major to update a field type that changed. If you're not using `tax_details`, this is a no-op release when compared with the last one. If you _are_ using `tax_details` its type has changed slightly and you'll have to update your code when upgrading. + +* [#2230](https://github.com/stripe/stripe-java/pull/2230) Add "source" field to user-agent header +* ⚠️ [#2234](https://github.com/stripe/stripe-java/pull/2234) Make `tax_rate.tax_details` expandable diff --git a/plugins/changelog/testdata/pins/stripe-node-23.2.0-CHANGELOG.md b/plugins/changelog/testdata/pins/stripe-node-23.2.0-CHANGELOG.md new file mode 100644 index 0000000..b95a8c8 --- /dev/null +++ b/plugins/changelog/testdata/pins/stripe-node-23.2.0-CHANGELOG.md @@ -0,0 +1,123 @@ +## 23.2.0 - 2026-11-18 +This release changes the pinned API version to `2026-11-18.endive`. + +* Improve webhook signature verification error messages + - When diagnostic metadata is present in the `Stripe-Signature` header, error messages help identify an incorrect signing secret or altered request body. +* Accept RFC 3339 strings for V2 date-time range filters + + V2 date-time range filters now accept RFC 3339 strings. Numeric bounds remain in place to avoid breaking the interface, although the API does not accept them. +* [#2924](https://github.com/stripe/stripe-node/pull/2924) Fix Stripe-Context and Stripe-Account for event notification fetch helpers + - Updates `fetchEvent` to call `withStripeContext` before issuing API call to fetch the event. + - Updates `addFetchRelatedObjectIfNeeded` (used by `events.retrieve()`/`list()`) the same way. +* [#2927](https://github.com/stripe/stripe-node/pull/2927) Prefix requestId to error message field if a requestId exists +* Fix multipart encoding of `undefined`, `null`, and `Date` params in `files.create` + - Multipart requests now follow the same rules as other requests: `undefined` params are omitted, `null` is sent as an empty string, and `Date` values are sent as Unix timestamps. Previously `undefined` and `null` were sent as the strings `"undefined"` and `"null"`, and `Date` params were dropped. +* [#2919](https://github.com/stripe/stripe-node/pull/2919) Update generated code + * Add support for new resource `V2.Core.ClaimableSandbox` + * Add support for `create`, `renew_onboarding_link`, and `retrieve` methods on resource `V2.Core.ClaimableSandbox` + * Add support for `funding_sources` on `Charge.payment_method_details.card.wallet.link` and `Charge.payment_method_details.link` + * Add support for new value `tron` on enums `Charge.payment_method_details.crypto.network`, `PaymentAttemptRecord.payment_method_details.crypto.network`, and `PaymentRecord.payment_method_details.crypto.network` + * Add support for `fingerprint` on `Charge.payment_method_details.paypay`, `PaymentAttemptRecord.payment_method_details.paypay`, and `PaymentRecord.payment_method_details.paypay` + * Add support for `address_collection_precision` on `Checkout.Session.automatic_tax` and `Checkout.SessionCreateParams.automatic_tax` + * Change `Dispute.evidence.appeal` to be required + * Change `Issuing.Card.shipping.delivered_at` to be required + * Change `Issuing.Card.shipping.shipped_at` to be required + * Change `PaymentAttemptRecord.payment_method_details.card.stored_credential_usage` and `PaymentRecord.payment_method_details.card.stored_credential_usage` to be required + * Add support for `car_rental_data` and `lodging_data` on `PaymentIntent.payment_details`, `PaymentIntentCaptureParams.payment_details`, `PaymentIntentConfirmParams.payment_details`, `PaymentIntentCreateParams.payment_details`, and `PaymentIntentUpdateParams.payment_details` + * Change type of `PaymentLinkCreateParams.payment_intent_data.capture_method` from `enum('automatic'|'automatic_async'|'manual')` to `emptyable(enum('automatic'|'automatic_async'|'manual'))` + * Add support for `capture_method` on `PaymentLinkUpdateParams.payment_intent_data` + * Add support for `loss_message` on `Product.marketing_features[]`, `ProductCreateParams.marketing_features[]`, and `ProductUpdateParams.marketing_features[]` + * Add support for `application` on `Refund` + * Add support for `bizum` and `upi` on `Refund.destination_details` + * Add support for `tax_invoice_month` on `Reporting.ReportRun.parameters` and `Reporting.ReportRunCreateParams.parameters` + * Add support for `igic` on `Tax.Registration.country_options.es` and `Tax.RegistrationCreateParams.country_options.es` + * Add support for new value `igic` on enums `Tax.Registration.country_options.es.type` and `Tax.RegistrationCreateParams.country_options.es.type` + * Add support for new values `stripe_s700_devkit`, `stripe_s710_devkit`, `stripe_t600_devkit`, `verifone_ux700_devkit`, and `verifone_v660p_devkit` on enums `Terminal.Reader.device_type` and `Terminal.ReaderListParams.device_type` + * Add support for `network_details` on `Treasury.InboundTransfer.failure_details`, `Treasury.InboundTransferFailParams.testHelpers.failure_details`, `Treasury.OutboundPayment.returned_details`, and `Treasury.OutboundTransfer.returned_details` + * Add support for `failure_details` on `Treasury.InboundTransferReturnInboundTransferParams.testHelpers` + * Add support for new value `2026-11-18.endive` on enum `WebhookEndpointCreateParams.api_version` + * Add support for `account_dashboard` on `V2.Core.AccountLink.use_case` and `V2.Core.AccountLinkCreateParams.use_case` + * Add support for new value `account_dashboard` on enums `V2.Core.AccountLink.use_case.type` and `V2.Core.AccountLinkCreateParams.use_case.type` + * Add support for `paypay_payments` on `V2.Core.Account.configuration.merchant.capabilities`, `V2.Core.Account.configuration.merchant`, `V2.Core.AccountCreateParams.configuration.merchant.capabilities`, `V2.Core.AccountCreateParams.configuration.merchant`, `V2.Core.AccountUpdateParams.configuration.merchant.capabilities`, and `V2.Core.AccountUpdateParams.configuration.merchant` + * Add support for `billie_payments`, `mb_way_payments`, `nz_bank_account_becs_debit_payments`, and `pix_payments` on `V2.Core.Account.configuration.merchant.capabilities`, `V2.Core.AccountCreateParams.configuration.merchant.capabilities`, and `V2.Core.AccountUpdateParams.configuration.merchant.capabilities` + * Add support for `additional_material` on `V2.Core.Account.configuration.merchant.konbini_payments`, `V2.Core.AccountCreateParams.configuration.merchant.konbini_payments`, and `V2.Core.AccountUpdateParams.configuration.merchant.konbini_payments` + * Add support for new values `billie_payments`, `mb_way_payments`, `nz_bank_account_becs_debit_payments`, `paypay_payments`, and `pix_payments` on enums `V2.Core.Account.future_requirements.entries[].impact.restricts_capabilities[].capability` and `V2.Core.Account.requirements.entries[].impact.restricts_capabilities[].capability` + * Add support for new values `billie_payments`, `mb_way_payments`, `nz_bank_account_becs_debit_payments`, `paypay_payments`, and `pix_payments` on enum `EventsV2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.updated_capability` + * Add support for event notifications `V2CoreClaimableSandboxClaimedEvent`, `V2CoreClaimableSandboxCreatedEvent`, `V2CoreClaimableSandboxExpiredEvent`, `V2CoreClaimableSandboxExpiringEvent`, and `V2CoreClaimableSandboxUpdatedEvent` with related object `V2.Core.ClaimableSandbox` + * Add support for error code `inactive_api_operation_confirmation_required` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, `StripeError`, and `Terminal.Reader.action.api_error` + * Add support for error codes `claimable_sandbox_creation_rate_limit_exceeded` and `claimable_sandbox_testing_creation_rate_limit_exceeded` on `RateLimitError` + +## 23.0.1 - 2026-10-22 +* [#2885](https://github.com/stripe/stripe-node/pull/2885) Reject ASCII-whitespace-only webhook secrets + - Reject webhook signing secrets made entirely of ASCII whitespace instead of using them as HMAC keys. +* [#2884](https://github.com/stripe/stripe-node/pull/2884) Add API v2 Search support + + Adds `V2SearchResult` and support for auto pagination of search results. +* [#2895](https://github.com/stripe/stripe-node/pull/2895) Fix notification handling and discarded fetch retries + - Fix `EventNotificationHandler.handle()` to verify signatures asynchronously, so it works with async crypto providers (e.g. the web platform). + - Fall back to the full `EventNotification` union type for `on()` callbacks when a specific notification type can't be narrowed, instead of resolving to `never`. + - Dispose discarded `fetch` responses before retrying a request, aborting the fetch and closing the unread body. +* Fix lastResponse.statusCode for fetch responses + - Populate `lastResponse.statusCode` with the HTTP status for successful JSON responses when using the fetch HTTP client. + +## 22.0.0 - 2026-04-02 +This release uses the same pinned API version to `2026-03-25.dahlia` as the last major release. The breaking changes in this release are prefixed with ⚠️ below. There's also a [detailed migration guide](https://github.com/stripe/stripe-node/wiki/Migration-guide-for-v22) to simplify your upgrade process. + +* ⚠️ [#2619](https://github.com/stripe/stripe-node/pull/2619) Improved TypeScript support in the Node SDK + * Moved the types from the partially manually maintained and partially generated types folder to be inline with the implementation in TypeScript files. + * Removed top-level “stripe” ambient module. This allows import aliasing for the stripe package. + * ⚠️ `Stripe.StripeContext` is no longer exported as a type. Use `Stripe.StripeContextType` instead. + * ⚠️ `Stripe.errors.StripeError` is no longer a type. Use `typeof Stripe.errors.StripeError` or `Stripe.ErrorType` instead. + * ⚠️ CJS entry point no longer exports .default or .Stripe as separate properties. + * ⚠️ Stripe import is now a true ES6 class. Use `new Stripe()` to create a StripeClient instead of calling it: + ```javascript + // Before + const stripeClient = Stripe("sk_test_..."); + + // After + const stripeClient = new Stripe("sk_test_..."); + ``` +* [#2619](https://github.com/stripe/stripe-node/pull/2619) Improved TypeScript support in the Node SDK +* [#2635](https://github.com/stripe/stripe-node/pull/2635) Updated stripe.spec.ts test and constructEvent.tolerance type +* [#2638](https://github.com/stripe/stripe-node/pull/2638) Converted V2/Amount.ts to V2/V2Amount.ts +* ⚠️ [#2643](https://github.com/stripe/stripe-node/pull/2643) Removed per-request host override. To use a custom host, set it in the client configuration. All requests from that client will use that host. + + Before: + ```ts + import Stripe from 'stripe'; + const stripe = new Stripe('sk_test_...'); + + const customer = await stripe.customers.create({ + email: 'customer@example.com', + }, {host: 'example.com'}); + ``` + + After: + ```ts + import Stripe from 'stripe'; + const stripe = new Stripe('sk_test_...', {host: 'example.com'}); + + // goes to example.com + const customer = await stripe.customers.create({ + email: 'customer@example.com', + }); + ``` +* ⚠️ [#2645](https://github.com/stripe/stripe-node/pull/2645) Remove `stripeMethod` and standardize how function args are handled (including removing callback support) + - ⚠️ Refactor how incoming method arguments are parsed. Type signatures for API methods should be _much_ more accurate and reliable now + - ⚠️ Remove support for providing callbacks to API methods. Use `async / await` instead + - ⚠️ Remove support for passing a plain API key as a function arg. If supplied on a per-request basis, it should be in the `RequestOptions` under the `apiKey` property + - ⚠️ Keys from `params` and `options` objects are no longer mixed. If present on a method, `RequestParams` must always come first and `RequestOptions` must always come second. To supply options without params, pass `undefined` as the first argument explicitly + - ⚠️ Removed methods from `StripeResource`: `createFullPath`, `createResourcePathWithSymbols`, `extend`, `method` and `_joinUrlParts`. These were mostly intended for internal use and we no longer need them + + As a result, the following call patterns are no longer supported: + + ```ts + stripe.customers.retrieve('cus_123', 'sk_test_123') + stripe.customers.create({name: 'david', host: 'example.com'}, 'sk_test_123') + stripe.customers.create({apiKey: 'sk_test_123'}) + stripe.customers.list(customers => { + // do something with customers + }) + ``` + + If those look familiar, head over to the [migration guide](https://github.com/stripe/stripe-node/wiki/Migration-guide-for-v22) to update your code. diff --git a/plugins/changelog/testdata/pins/stripe-php-23.1.0-CHANGELOG.md b/plugins/changelog/testdata/pins/stripe-php-23.1.0-CHANGELOG.md new file mode 100644 index 0000000..444178f --- /dev/null +++ b/plugins/changelog/testdata/pins/stripe-php-23.1.0-CHANGELOG.md @@ -0,0 +1,70 @@ +## 23.1.0 - 2026-11-18 +This release changes the pinned API version to `2026-11-18.endive`. + +* Preserve custom `api_base` configuration across paginated requests + + Ensure `nextPage()`, `previousPage()`, and `autoPagingIterator()` continue using the `api_base` configured on `StripeClient`. +* Keep API keys out of serialized and dumped clients and event notifications + + `serialize()`, `print_r()`, and `var_dump()` of an `EventNotification` or `StripeClient` no longer include the API key. `print_r()` and `var_dump()` show the client's key redacted. An unserialized notification keeps its fields but has no client, so `fetchEvent()` and `fetchRelatedObject()` throw `\Stripe\Exception\AuthenticationException`. Parse the original payload with `StripeClient::parseEventNotification()` to make requests. An unserialized client has no API key, including clients serialized by earlier SDK versions. +* [#2204](https://github.com/stripe/stripe-php/pull/2204) Update generated code + * Add support for new resource `V2.Core.ClaimableSandbox` + * Add support for `create`, `renew_onboarding_link`, and `retrieve` methods on resource `V2.Core.ClaimableSandbox` + * Add support for `funding_sources` on `Charge.payment_method_details.card.wallet.link` and `Charge.payment_method_details.link` + * Add support for new value `tron` on enums `Charge.payment_method_details.crypto.network`, `PaymentAttemptRecord.payment_method_details.crypto.network`, and `PaymentRecord.payment_method_details.crypto.network` + * Add support for `fingerprint` on `Charge.payment_method_details.paypay`, `PaymentAttemptRecord.payment_method_details.paypay`, and `PaymentRecord.payment_method_details.paypay` + * Add support for `address_collection_precision` on `Checkout.Session.automatic_tax` and `Checkout\Session.create().$params.automatic_tax` + * Change `Dispute.evidence.appeal` to be required + * Change `Issuing.Card.shipping.delivered_at` to be required + * Change `Issuing.Card.shipping.shipped_at` to be required + * Change `PaymentAttemptRecord.payment_method_details.card.stored_credential_usage` and `PaymentRecord.payment_method_details.card.stored_credential_usage` to be required + * Add support for `car_rental_data` and `lodging_data` on `PaymentIntent.capture().$params.payment_detail`, `PaymentIntent.confirm().$params.payment_detail`, `PaymentIntent.create().$params.payment_detail`, `PaymentIntent.payment_details`, and `PaymentIntent.update().$params.payment_detail` + * Change type of `PaymentLink.create().$params.payment_intent_datum.capture_method` from `enum('automatic'|'automatic_async'|'manual')` to `emptyable(enum('automatic'|'automatic_async'|'manual'))` + * Add support for `capture_method` on `PaymentLink.update().$params.payment_intent_datum` + * Add support for `loss_message` on `Product.create().$params.marketing_feature`, `Product.marketing_features[]`, and `Product.update().$params.marketing_feature` + * Add support for `application` on `Refund` + * Add support for `bizum` and `upi` on `Refund.destination_details` + * Add support for `tax_invoice_month` on `Reporting.ReportRun.parameters` and `Reporting\ReportRun.create().$params.parameter` + * Add support for `igic` on `Tax.Registration.country_options.es` and `Tax\Registration.create().$params.country_option.e` + * Add support for new value `igic` on enum `Tax.Registration.country_options.es.type` + * Add support for new values `stripe_s700_devkit`, `stripe_s710_devkit`, `stripe_t600_devkit`, `verifone_ux700_devkit`, and `verifone_v660p_devkit` on enum `Terminal.Reader.device_type` + * Add support for `network_details` on `Treasury.InboundTransfer.failure_details`, `Treasury.OutboundPayment.returned_details`, `Treasury.OutboundTransfer.returned_details`, and `Treasury\InboundTransfer.fail().$params.failure_detail` + * Add support for `failure_details` on `Treasury\InboundTransfer.return_inbound_transfer().$params` + * Add support for `account_dashboard` on `V2.Core.AccountLink.use_case` and `V2\Core\AccountLink.create().$params.use_case` + * Add support for new value `account_dashboard` on enum `V2.Core.AccountLink.use_case.type` + * Add support for `paypay_payments` on `V2.Core.Account.configuration.merchant.capabilities`, `V2.Core.Account.configuration.merchant`, `V2\Core\Account.create().$params.configuration.merchant.capability`, `V2\Core\Account.create().$params.configuration.merchant`, `V2\Core\Account.update().$params.configuration.merchant.capability`, and `V2\Core\Account.update().$params.configuration.merchant` + * Add support for `billie_payments`, `mb_way_payments`, `nz_bank_account_becs_debit_payments`, and `pix_payments` on `V2.Core.Account.configuration.merchant.capabilities`, `V2\Core\Account.create().$params.configuration.merchant.capability`, and `V2\Core\Account.update().$params.configuration.merchant.capability` + * Add support for `additional_material` on `V2.Core.Account.configuration.merchant.konbini_payments`, `V2\Core\Account.create().$params.configuration.merchant.konbini_payment`, and `V2\Core\Account.update().$params.configuration.merchant.konbini_payment` + * Add support for new values `billie_payments`, `mb_way_payments`, `nz_bank_account_becs_debit_payments`, `paypay_payments`, and `pix_payments` on enums `V2.Core.Account.future_requirements.entries[].impact.restricts_capabilities[].capability` and `V2.Core.Account.requirements.entries[].impact.restricts_capabilities[].capability` + * Add support for new values `billie_payments`, `mb_way_payments`, `nz_bank_account_becs_debit_payments`, `paypay_payments`, and `pix_payments` on enum `EventsV2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.updated_capability` + * Add support for event notifications `V2CoreClaimableSandboxClaimedEvent`, `V2CoreClaimableSandboxCreatedEvent`, `V2CoreClaimableSandboxExpiredEvent`, `V2CoreClaimableSandboxExpiringEvent`, and `V2CoreClaimableSandboxUpdatedEvent` with related object `V2.Core.ClaimableSandbox` + * Add support for error code `inactive_api_operation_confirmation_required` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, `StripeError`, and `Terminal.Reader.action.api_error` + +## 23.0.0 - 2026-11-11 +* Improve webhook signature verification error messages + - When diagnostic metadata is present in the `Stripe-Signature` header, error messages help identify an incorrect signing secret or altered request body. +* ⚠️ Omit API keys from native PHP serialization + + Native PHP serialization of SDK resources no longer preserves API keys. Deserialization also discards keys embedded by earlier SDK versions. Before making requests through a restored resource, call `reattachApiKey($apiKey)`. This also reattaches API keys to nested objects. + + See the [v23 migration guide](https://github.com/stripe/stripe-php/wiki/Migration-guide-for-v23#api-keys-no-longer-survive-native-php-serialization) for details. +* [#2187](https://github.com/stripe/stripe-php/pull/2187) Fix issue where v2 search requests can send multiple API requests +* Preserve event context when fetching related objects from a directly retrieved Event +* ⚠️ StripeClient no longer inherits the legacy global Stripe::$accountId + + ⚠️ `StripeClient` no longer inherits the global account set by `Stripe::setAccountId()`. Previously, a client without a configured `stripe_account` could send requests under an unrelated account set elsewhere in the process. + + If you relied on this behavior, pass `['stripe_account' => $accountId]` when constructing the client or making a request. + + An explicit `['stripe_account' => null]` now clears the account for a request, overriding both the client's configured account and the global account. Legacy static API calls still inherit the global account when `stripe_account` is omitted. + +## 21.0.0 - 2026-07-15 +This release **does not** change the pinned API version. It's still `2026-06-24.dahlia`. + +We're releasing it as a major out of an abundance of caution, but it should be functionally a patch release for most users. See below. + +* [#2095](https://github.com/stripe/stripe-php/pull/2095) Remove unused Retry-After header support +* ⚠️ [#2097](https://github.com/stripe/stripe-php/pull/2097) Correctly type properties on `ErrorObject` + * the properties of `ErrorObject` were typed as `string` when many of them should have been `null|string`. If you (or your typechecker) were treating these as plain strings, you'll need to be more defensive in your code. + * to be clear: no runtime code has changed, we've just made the types more accurate. We didn't want to break any builds in a patch version, so this is released as a major +* [#2098](https://github.com/stripe/stripe-php/pull/2098) Replace source hash with Telemetry UUID diff --git a/plugins/changelog/testdata/pins/stripe-python-17.1.0-CHANGELOG.md b/plugins/changelog/testdata/pins/stripe-python-17.1.0-CHANGELOG.md new file mode 100644 index 0000000..00ec041 --- /dev/null +++ b/plugins/changelog/testdata/pins/stripe-python-17.1.0-CHANGELOG.md @@ -0,0 +1,58 @@ +## 17.1.0 - 2026-11-18 +This release changes the pinned API version to `2026-11-18.endive`. + +* Add configurable `timeout` and `connect_timeout` to `PycurlClient` + + `PycurlClient` now accepts keyword-only `timeout` (total request time, curl's `TIMEOUT`) and `connect_timeout` (curl's `CONNECTTIMEOUT`) arguments, in whole seconds. They default to the previous hardcoded values of 80 and 30 seconds. +* Use a separate Curl handle per thread in PycurlClient so concurrent requests can't overwrite each other's URL, body, or headers +* [#1997](https://github.com/stripe/stripe-python/pull/1997) Support httpx2 for async requests, falling back to httpx when httpx2 isn't installed + + `HTTPXClient` and the default async client now use `httpx2` when it's installed and fall back to `httpx` otherwise. `httpx` support is deprecated and will be removed in the next major version; we recommend installing `httpx2` for async use. +* [#1997](https://github.com/stripe/stripe-python/pull/1997) Fix `HTTPXClient` raising a network error when a proxy is configured + + `HTTPXClient` passed `proxies` on each request, which httpx doesn't accept. Proxies are now configured on the client instead. Request bodies are also now sent as `content=`, which avoids httpx's deprecation warning for `data=`. +* [#1998](https://github.com/stripe/stripe-python/pull/1998) Update generated code + * Add support for new resource `v2.core.ClaimableSandbox` + * Add support for `create`, `renew_onboarding_link`, and `retrieve` methods on resource `v2.core.ClaimableSandbox` + * Add support for `funding_sources` on `Charge.PaymentMethodDetail.Card.Wallet.Link` and `Charge.PaymentMethodDetail.Link` + * Add support for new value `tron` on enums `Charge.PaymentMethodDetail.Crypto.network`, `PaymentAttemptRecord.PaymentMethodDetail.Crypto.network`, and `PaymentRecord.PaymentMethodDetail.Crypto.network` + * Add support for `fingerprint` on `Charge.PaymentMethodDetail.Paypay`, `PaymentAttemptRecord.PaymentMethodDetail.Paypay`, and `PaymentRecord.PaymentMethodDetail.Paypay` + * Add support for `address_collection_precision` on `Checkout.Session.AutomaticTax` and `checkout.SessionCreateParamsAutomaticTax` + * Change `Dispute.Evidence.appeal` to be required + * Change `Issuing.Card.Shipping.delivered_at` to be required + * Change `Issuing.Card.Shipping.shipped_at` to be required + * Change `PaymentAttemptRecord.PaymentMethodDetail.Card.stored_credential_usage` and `PaymentRecord.PaymentMethodDetail.Card.stored_credential_usage` to be required + * Add support for `car_rental_data` and `lodging_data` on `PaymentIntent.PaymentDetail`, `PaymentIntentCaptureParamsPaymentDetail`, `PaymentIntentConfirmParamsPaymentDetail`, `PaymentIntentCreateParamsPaymentDetail`, and `PaymentIntentModifyParamsPaymentDetail` + * Change type of `PaymentLinkCreateParamsPaymentIntentDatum.capture_method` from `enum('automatic'|'automatic_async'|'manual')` to `emptyable(enum('automatic'|'automatic_async'|'manual'))` + * Add support for `capture_method` on `PaymentLinkModifyParamsPaymentIntentDatum` + * Add support for `loss_message` on `Product.MarketingFeature`, `ProductCreateParamsMarketingFeature`, and `ProductModifyParamsMarketingFeature` + * Add support for `application` on `Refund` + * Add support for `bizum` and `upi` on `Refund.DestinationDetail` + * Add support for `tax_invoice_month` on `Reporting.ReportRun.Parameter` and `reporting.ReportRunCreateParamsParameter` + * Add support for `igic` on `Tax.Registration.CountryOption.E` and `tax.RegistrationCreateParamsCountryOptionE` + * Add support for new value `igic` on enums `Tax.Registration.CountryOption.E.type` and `tax.RegistrationCreateParamsCountryOptionE.type` + * Add support for new values `stripe_s700_devkit`, `stripe_s710_devkit`, `stripe_t600_devkit`, `verifone_ux700_devkit`, and `verifone_v660p_devkit` on enums `Terminal.Reader.device_type` and `terminal.ReaderListParams.device_type` + * Add support for `network_details` on `Treasury.InboundTransfer.FailureDetail`, `Treasury.OutboundPayment.ReturnedDetail`, `Treasury.OutboundTransfer.ReturnedDetail`, and `treasury.InboundTransferFailParamsFailureDetail` + * Add support for `failure_details` on `treasury.InboundTransferReturnInboundTransferParams` + * Add support for new value `2026-11-18.endive` on enum `WebhookEndpointCreateParams.api_version` + * Add support for `account_dashboard` on `V2.Core.AccountLink.UseCase` and `v2.core.AccountLinkCreateParamsUseCase` + * Add support for new value `account_dashboard` on enums `V2.Core.AccountLink.UseCase.type` and `v2.core.AccountLinkCreateParamsUseCase.type` + * Add support for `paypay_payments` on `V2.Core.Account.Configuration.Merchant.Capability`, `V2.Core.Account.Configuration.Merchant`, `v2.core.AccountCreateParamsConfigurationMerchantCapability`, `v2.core.AccountCreateParamsConfigurationMerchant`, `v2.core.AccountModifyParamsConfigurationMerchantCapability`, and `v2.core.AccountModifyParamsConfigurationMerchant` + * Add support for `billie_payments`, `mb_way_payments`, `nz_bank_account_becs_debit_payments`, and `pix_payments` on `V2.Core.Account.Configuration.Merchant.Capability`, `v2.core.AccountCreateParamsConfigurationMerchantCapability`, and `v2.core.AccountModifyParamsConfigurationMerchantCapability` + * Add support for `additional_material` on `V2.Core.Account.Configuration.Merchant.KonbiniPayment`, `v2.core.AccountCreateParamsConfigurationMerchantKonbiniPayment`, and `v2.core.AccountModifyParamsConfigurationMerchantKonbiniPayment` + * Add support for new values `billie_payments`, `mb_way_payments`, `nz_bank_account_becs_debit_payments`, `paypay_payments`, and `pix_payments` on enums `V2.Core.Account.FutureRequirement.Entry.Impact.RestrictsCapability.capability` and `V2.Core.Account.Requirement.Entry.Impact.RestrictsCapability.capability` + * Add support for new values `billie_payments`, `mb_way_payments`, `nz_bank_account_becs_debit_payments`, `paypay_payments`, and `pix_payments` on enum `EventsV2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.updated_capability` + * Add support for event notifications `V2CoreClaimableSandboxClaimedEvent`, `V2CoreClaimableSandboxCreatedEvent`, `V2CoreClaimableSandboxExpiredEvent`, `V2CoreClaimableSandboxExpiringEvent`, and `V2CoreClaimableSandboxUpdatedEvent` with related object `v2.core.ClaimableSandbox` + * Add support for error code `inactive_api_operation_confirmation_required` on `Invoice.LastFinalizationError`, `PaymentIntent.LastPaymentError`, `SetupAttempt.SetupError`, `SetupIntent.LastSetupError`, `StripeError`, and `Terminal.Reader.Action.ApiError` + * Add support for error codes `claimable_sandbox_creation_rate_limit_exceeded` and `claimable_sandbox_testing_creation_rate_limit_exceeded` on `RateLimitError` + +## 17.0.0 - 2026-11-11 +* Improve webhook signature verification error messages + - When diagnostic metadata is present in the `Stripe-Signature` header, error messages help identify an incorrect signing secret or altered request body. +* ⚠️ Omit API keys from pickled StripeObjects + + StripeObject pickles no longer preserve API keys. Before making requests through an unpickled object, call `reattach_api_key(api_key)`. This also reattaches API keys to nested objects. + + See the [v17 migration guide](https://github.com/stripe/stripe-python/wiki/Migration-guide-for-v17#api-keys-are-no-longer-preserved-in-pickled-stripeobjects) for details. +* Fix stale Stripe-Account header when fetching an object related to a directly-retrieved Event +* Reject header values containing CR, LF or NUL in the pycurl HTTP client diff --git a/plugins/changelog/testdata/pins/stripe-ruby-21.1.0-CHANGELOG.md b/plugins/changelog/testdata/pins/stripe-ruby-21.1.0-CHANGELOG.md new file mode 100644 index 0000000..ae2c564 --- /dev/null +++ b/plugins/changelog/testdata/pins/stripe-ruby-21.1.0-CHANGELOG.md @@ -0,0 +1,62 @@ +## 21.1.0 - 2026-11-18 +This release changes the pinned API version to `2026-11-18.endive`. + +* Fixes ListObject#next_page/#previous_page and SearchResultObject#next_search_result_page using the global requestor instead of the client that retrieved the page +* Preserve resource authorization scope across Marshal round-trips and event-related requests + + Resources retain their account and context when restored from a new `Marshal.dump`, including resources fetched from thin event notifications. Restoring an unscoped resource clears the loading process's account and context defaults. Full events bind to their payload's context when constructed, so related-object requests and subsequent mutations use that scope. + + Resources copy account and context selectors so mutating caller-provided strings cannot change their retained scope. + + Existing Marshal cache entries continue to load using the legacy behavior. Their original scope may already be missing, so clear cached SDK objects and re-fetch them after upgrading to benefit from this fix. Caching resource IDs together with their explicit context and reconstructing them through a scoped client is also supported. +* Keep API keys out of the inspect output of clients and event notifications + + `inspect` on `StripeClient`, `StripeConfiguration`, `APIRequestor`, event notification handlers, and `EventNotification` no longer includes API keys, webhook secrets, or proxy credentials, so passing these objects to `Logger`, `p`, or `pp` doesn't write credentials to logs. +* [#2026](https://github.com/stripe/stripe-ruby/pull/2026) Reuse connections across account and context scopes + + Account and context selectors no longer create separate connection pools when other configuration matches. Requests retain their own authorization headers, while proxy, TLS, certificate, and timeout differences still select separate pools. +* [#2026](https://github.com/stripe/stripe-ruby/pull/2026) Support nested request blocks and track responses across requestors + + Request blocks return the last response produced in that block, including requests through another client or a resource bound to a different requestor. Nested blocks track their own responses, including when they use the same requestor. Request routing continues to use each resource or client’s configured credentials and scope. +* Keep API keys out of YAML dumps of clients and event notifications + + `YAML.dump` of an `EventNotification`, `StripeClient`, or `APIRequestor` no longer includes API keys or proxy credentials. A notification restored from YAML keeps its fields but has no client, so `fetch_event` and `fetch_related_object` raise `Stripe::AuthenticationError`. Parse the original payload with `StripeClient#parse_event_notification` to make requests. +* [#2024](https://github.com/stripe/stripe-ruby/pull/2024) Update generated code + * Add support for new resource `V2::Core::ClaimableSandbox` + * Add support for `create`, `renew_onboarding_link`, and `retrieve` methods on resource `V2::Core::ClaimableSandbox` + * Add support for `funding_sources` on `Charge::PaymentMethodDetail::Card::Wallet::Link` and `Charge::PaymentMethodDetail::Link` + * Add support for `fingerprint` on `Charge::PaymentMethodDetail::Paypay`, `PaymentAttemptRecord::PaymentMethodDetail::Paypay`, and `PaymentRecord::PaymentMethodDetail::Paypay` + * Add support for `address_collection_precision` on `Checkout::Session::AutomaticTax` and `Checkout::SessionCreateParams::AutomaticTax` + * Change `Dispute::Evidence.appeal` to be required + * Change `Issuing::Card::Shipping.delivered_at` to be required + * Change `Issuing::Card::Shipping.shipped_at` to be required + * Change `PaymentAttemptRecord::PaymentMethodDetail::Card.stored_credential_usage` and `PaymentRecord::PaymentMethodDetail::Card.stored_credential_usage` to be required + * Add support for `car_rental_data` and `lodging_data` on `PaymentIntent::PaymentDetail`, `PaymentIntentCaptureParams::PaymentDetail`, `PaymentIntentConfirmParams::PaymentDetail`, `PaymentIntentCreateParams::PaymentDetail`, and `PaymentIntentUpdateParams::PaymentDetail` + * Change type of `PaymentLinkCreateParams::PaymentIntentDatum.capture_method` from `enum('automatic'|'automatic_async'|'manual')` to `emptyable(enum('automatic'|'automatic_async'|'manual'))` + * Add support for `capture_method` on `PaymentLinkUpdateParams::PaymentIntentDatum` + * Add support for `loss_message` on `Product::MarketingFeature`, `ProductCreateParams::MarketingFeature`, and `ProductUpdateParams::MarketingFeature` + * Add support for `application` on `Refund` + * Add support for `bizum` and `upi` on `Refund::DestinationDetail` + * Add support for `tax_invoice_month` on `Reporting::ReportRun::Parameter` and `Reporting::ReportRunCreateParams::Parameter` + * Add support for `igic` on `Tax::Registration::CountryOption::E` and `Tax::RegistrationCreateParams::CountryOption::E` + * Add support for `network_details` on `Treasury::InboundTransfer::FailureDetail`, `Treasury::InboundTransferFailParams::FailureDetail`, `Treasury::OutboundPayment::ReturnedDetail`, and `Treasury::OutboundTransfer::ReturnedDetail` + * Add support for `failure_details` on `Treasury::InboundTransferReturnInboundTransferParams` + * Add support for `account_dashboard` on `V2::Core::AccountLink::UseCase` and `V2::Core::AccountLinkCreateParams::UseCase` + * Add support for `paypay_payments` on `V2::Core::Account::Configuration::Merchant::Capability`, `V2::Core::Account::Configuration::Merchant`, `V2::Core::AccountCreateParams::Configuration::Merchant::Capability`, `V2::Core::AccountCreateParams::Configuration::Merchant`, `V2::Core::AccountUpdateParams::Configuration::Merchant::Capability`, and `V2::Core::AccountUpdateParams::Configuration::Merchant` + * Add support for `billie_payments`, `mb_way_payments`, `nz_bank_account_becs_debit_payments`, and `pix_payments` on `V2::Core::Account::Configuration::Merchant::Capability`, `V2::Core::AccountCreateParams::Configuration::Merchant::Capability`, and `V2::Core::AccountUpdateParams::Configuration::Merchant::Capability` + * Add support for `additional_material` on `V2::Core::Account::Configuration::Merchant::KonbiniPayment`, `V2::Core::AccountCreateParams::Configuration::Merchant::KonbiniPayment`, and `V2::Core::AccountUpdateParams::Configuration::Merchant::KonbiniPayment` + * Add support for event notifications `V2CoreClaimableSandboxClaimedEvent`, `V2CoreClaimableSandboxCreatedEvent`, `V2CoreClaimableSandboxExpiredEvent`, `V2CoreClaimableSandboxExpiringEvent`, and `V2CoreClaimableSandboxUpdatedEvent` with related object `V2::Core::ClaimableSandbox` + +## 21.0.0 - 2026-11-11 +* Improve webhook signature verification error messages + - When diagnostic metadata is present in the `Stripe-Signature` header, errors help identify an incorrect signing secret or altered request body. +* [#2011](https://github.com/stripe/stripe-ruby/pull/2011) Accept binary webhook payloads with non-ASCII characters + - Parse UTF-8 webhook payloads tagged as binary in `construct_event_without_verification` and `parse_event_notification_without_verification`. +* ⚠️ Omit API keys from Marshal and YAML dumps of StripeObjects + + Marshal and YAML dumps of StripeObjects no longer preserve API keys. Before making requests through a restored object, call `reattach_api_key(api_key)`. This also reattaches API keys to nested objects. + + See the [v21 migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v21#api-keys-are-no-longer-preserved-in-marshal-and-yaml-dumps-of-stripeobjects) for details. +* [#2022](https://github.com/stripe/stripe-ruby/pull/2022) Fix stripe_account and stripe_context scoping on Event#fetch_related_object + + When fetching a related object, directly-retrieved `Event` objects used the retaining client's own `stripe_context` rather than the event's `stripe_context`. `fetch_related_object` now routes through a requestor scoped to the event's context. This mirrors how `EventNotification` scopes its client. diff --git a/plugins/changelog/testdata/versions/stripe-go-tags-pins.json b/plugins/changelog/testdata/versions/stripe-go-tags-pins.json new file mode 100644 index 0000000..e5d94e3 --- /dev/null +++ b/plugins/changelog/testdata/versions/stripe-go-tags-pins.json @@ -0,0 +1,6 @@ +[ + {"name": "v87.2.0"}, + {"name": "v87.1.0-beta.1"}, + {"name": "v86.4.2"}, + {"name": "v86.0.0"} +] diff --git a/providers/stripe-sdks.md b/providers/stripe-sdks.md index 8d90d2a..70f6885 100644 --- a/providers/stripe-sdks.md +++ b/providers/stripe-sdks.md @@ -27,12 +27,17 @@ Kind: `changelog` (`plugins/changelog`, `sdks.go`). Stripe ships a new major of every SDK when it pins a new API version (twice a year or so), and marks each breaking bullet `⚠️`. Older changelogs head releases `## X.Y.Z - date`, newer ones `## X.Y.Z - date`; both are read. +A release that changes the API version the SDK pins says so in its section, in the same words in all seven SDKs (checked 2026-11-20): "This release changes the pinned API version to `2026-11-18.endive`." A few say they keep it: "This release **doesn't** change the pinned API version; it still uses `2026-05-27.dahlia`." (Go, Java, .NET), "…**does not** change the pinned API version. It's still `2026-06-24.dahlia`." (PHP), "This release uses the same pinned API version to `2026-03-25.dahlia` as the last major release." (Node). + ## What the plugin reads and ignores - Reads the release's section only. A bullet counts when it's marked `⚠️` or sits under a breaking or deprecation heading, and its first sentence is a plain template over code spans: `Remove X`, `Remove X from Y`, `Rename X to Y`, `X has been removed`, `Deprecated X in favor of Y`. The pull-request link it starts with is read past. - Drops (and logs) everything else: type changes ("Change type of …"), nullable fields, pinned API versions, dropped language versions, bullets that list names inside prose or parentheses, and "Generated changes from …" roll-ups. +- **What a release pins** (`MapsTo`, `pins.go`): while listing the releases, it reads the changelog at the newest release's tag and sets each release's `MapsTo` to `stripe/api` at the API version its own section states, in one of the sentences above, exactly as written (`2026-11-18.endive`). A release whose section doesn't say pins nothing here, even though it keeps the release before's; two different versions in one section are none. Older wordings without "pinned" ("Major version release for API version 2022-08-01", "Move to API version …") aren't read. ## Known gaps - Stripe's big generated roll-ups ("⚠️ Generated changes from #…") list their removals in nested bullets the reader doesn't open: those releases give no event. - A release whose tag or section is missing is skipped as nothing to read, never guessed. +- `MapsTo` names the API version as Stripe does (`2026-11-18.endive`), which is the `version` the `stripe/api` events carry (the spec's `info.version`). The `stripe/api` source lists its versions by the `stripe/openapi` release tag (`v2602`), so the pin matches its events, not its listed version ids. +- Only releases that state their pin have one: most minors and patches don't say, so a release between two pin changes has none. From 2fd00ee7b0541a639410d0461716911565d32301 Mon Sep 17 00:00:00 2001 From: adssib <75389300+adssib@users.noreply.github.com> Date: Fri, 20 Nov 2026 22:53:24 -0500 Subject: [PATCH 2/5] pins: skip code blocks before headings; fall back to the tag before Co-Authored-By: Claude Opus 5.5 Signed-off-by: adssib <75389300+adssib@users.noreply.github.com> --- plugins/changelog/pins.go | 34 +++++++++++++++++++++++++--------- plugins/changelog/pins_test.go | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 55 insertions(+), 11 deletions(-) diff --git a/plugins/changelog/pins.go b/plugins/changelog/pins.go index d317633..157b620 100644 --- a/plugins/changelog/pins.go +++ b/plugins/changelog/pins.go @@ -38,6 +38,19 @@ func pins(file []byte) map[string]string { out, conflict := map[string]string{}, map[string]bool{} release, fenced := "", false for _, l := range strings.Split(strings.ReplaceAll(string(file), "\r\n", "\n"), "\n") { + // A code block first: a "# comment" in an example isn't a heading. + // A release's heading closes a block its section left open. + if m := mdRelease.FindStringSubmatch(l); m != nil && strings.HasPrefix(l, "## ") { + release, fenced = m[1], false + continue + } + if strings.HasPrefix(strings.TrimSpace(l), "```") { + fenced = !fenced + continue + } + if fenced { + continue + } if strings.HasPrefix(l, "## ") || strings.HasPrefix(l, "# ") { release = "" if m := mdRelease.FindStringSubmatch(l); m != nil { @@ -45,11 +58,7 @@ func pins(file []byte) map[string]string { } continue } - if strings.HasPrefix(strings.TrimSpace(l), "```") { - fenced = !fenced - continue - } - if release == "" || fenced { + if release == "" { continue } l = strings.ReplaceAll(l, "**", "") @@ -70,14 +79,21 @@ func pins(file []byte) map[string]string { // pinned sets each version's MapsTo to what its section states it pins (f.Pins), // read from the changelog at the newest version's tag, which has every -// earlier release's section. A changelog that can't be fetched leaves the -// versions as listed: what they pin is read on a later listing. +// earlier release's section, or at the one before when that tag can't be read +// (a release on the registry before its tag is pushed). A changelog that +// can't be fetched leaves the versions as listed: what they pin is read on a +// later listing. func (f File) pinned(ctx context.Context, env plugin.Env, vs []plugin.Version) []plugin.Version { if f.Pins == "" || f.Notes || len(vs) == 0 { return vs } - newest := f.At(vs[len(vs)-1].ID) - page, err := env.Get(ctx, newest.URL()) + var page []byte + var err error + for i := len(vs) - 1; i >= 0 && i >= len(vs)-2; i-- { + if page, err = env.Get(ctx, f.At(vs[i].ID).URL()); err == nil { + break + } + } if err != nil { log.Printf("%s: what its releases pin isn't read this time: %v", f.API, err) return vs diff --git a/plugins/changelog/pins_test.go b/plugins/changelog/pins_test.go index a6a24cd..4977086 100644 --- a/plugins/changelog/pins_test.go +++ b/plugins/changelog/pins_test.go @@ -63,8 +63,8 @@ func TestListedVersionsCarryWhatTheyPin(t *testing.T) { } } -// A changelog that can't be fetched leaves the listing as it is, pinning -// nothing; a source without Pins never fetches it. +// A changelog that can't be fetched at the newest two tags leaves the listing +// as it is, pinning nothing; a source without Pins never fetches it. func TestPinsAreReadOnlyWhenTheyCanBe(t *testing.T) { tags := kittest.Read(t, "testdata/versions/stripe-go-tags-pins.json") var fetched []string @@ -79,6 +79,9 @@ func TestPinsAreReadOnlyWhenTheyCanBe(t *testing.T) { if err != nil || len(vs) != 3 { t.Fatalf("%v, %d versions", err, len(vs)) } + if len(fetched) != 3 { // the tags, then the newest two releases' changelogs + t.Errorf("fetched %v", fetched) + } for _, v := range vs { if !v.MapsTo.IsZero() { t.Errorf("%s pins %v with no changelog read", v.ID, v.MapsTo) @@ -102,4 +105,29 @@ func TestAnUnsurePinIsNone(t *testing.T) { if want := map[string]string{"1.0.0": "2025-11-01.a"}; !maps.Equal(got, want) { t.Errorf("got %v, want %v", got, want) } + // A "# comment" in a code example doesn't end the release's section. + got = pins([]byte("## 3.0.0 - 2026-02-01\n```sh\n# upgrade\n```\nThis release changes the pinned API version to `2026-02-01.c`.\n")) + if want := map[string]string{"3.0.0": "2026-02-01.c"}; !maps.Equal(got, want) { + t.Errorf("after a code block: got %v, want %v", got, want) + } +} + +// When the newest release's tag can't be read yet, the one before's +// changelog says what the earlier releases pin. +func TestPinsFallBackToTheTagBefore(t *testing.T) { + tags := kittest.Read(t, "testdata/versions/stripe-go-tags-pins.json") + file := kittest.Read(t, "testdata/pins/stripe-go-87.2.0-CHANGELOG.md") + env := plugin.Env{Get: func(_ context.Context, url string) ([]byte, error) { + switch { + case strings.Contains(url, "/tags?"): + return tags, nil + case url == StripeGo.At("86.4.2").URL(): + return file, nil + } + return nil, errors.New("404") + }} + vs, err := Plugin{File: StripeGo}.ListVersions(context.Background(), env) + if err != nil || len(vs) != 3 || vs[0].MapsTo.Version != "2026-05-27.dahlia" { + t.Errorf("%v %+v", err, vs) + } } From 54acfb4129623d0fd01380d1341f842d1f358eb9 Mon Sep 17 00:00:00 2001 From: adssib <75389300+adssib@users.noreply.github.com> Date: Fri, 20 Nov 2026 22:55:12 -0500 Subject: [PATCH 3/5] stripe-sdks: say the changelog may be read at the tag before Co-Authored-By: Claude Opus 5.5 Signed-off-by: adssib <75389300+adssib@users.noreply.github.com> --- providers/stripe-sdks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/stripe-sdks.md b/providers/stripe-sdks.md index 70f6885..4909ba5 100644 --- a/providers/stripe-sdks.md +++ b/providers/stripe-sdks.md @@ -33,7 +33,7 @@ A release that changes the API version the SDK pins says so in its section, in t - Reads the release's section only. A bullet counts when it's marked `⚠️` or sits under a breaking or deprecation heading, and its first sentence is a plain template over code spans: `Remove X`, `Remove X from Y`, `Rename X to Y`, `X has been removed`, `Deprecated X in favor of Y`. The pull-request link it starts with is read past. - Drops (and logs) everything else: type changes ("Change type of …"), nullable fields, pinned API versions, dropped language versions, bullets that list names inside prose or parentheses, and "Generated changes from …" roll-ups. -- **What a release pins** (`MapsTo`, `pins.go`): while listing the releases, it reads the changelog at the newest release's tag and sets each release's `MapsTo` to `stripe/api` at the API version its own section states, in one of the sentences above, exactly as written (`2026-11-18.endive`). A release whose section doesn't say pins nothing here, even though it keeps the release before's; two different versions in one section are none. Older wordings without "pinned" ("Major version release for API version 2022-08-01", "Move to API version …") aren't read. +- **What a release pins** (`MapsTo`, `pins.go`): while listing the releases, it reads the changelog at the newest release's tag (or the one before, when that tag isn't pushed yet) and sets each release's `MapsTo` to `stripe/api` at the API version its own section states, in one of the sentences above, exactly as written (`2026-11-18.endive`). A release whose section doesn't say pins nothing here, even though it keeps the release before's; two different versions in one section are none. Older wordings without "pinned" ("Major version release for API version 2022-08-01", "Move to API version …") aren't read. ## Known gaps From 843a2b510866d239ab2bd10ddd9d3476eb98fa4b Mon Sep 17 00:00:00 2001 From: adssib <75389300+adssib@users.noreply.github.com> Date: Fri, 20 Nov 2026 23:59:38 -0500 Subject: [PATCH 4/5] openapi: list stripe/api by api version, as its releases' notes name them Co-Authored-By: Claude Opus 5.5 Signed-off-by: adssib <75389300+adssib@users.noreply.github.com> --- plugins/changelog/pins_stripe_test.go | 70 +++++++ plugins/openapi/adapter/adapter.go | 8 + plugins/openapi/adapter/stripe.go | 16 +- plugins/openapi/adapter/stripe_test.go | 27 +-- plugins/openapi/adapter/testdata/README.md | 1 + .../versions/stripe-openapi-releases.json | 191 ++++++++++++++++++ plugins/openapi/adapter/versions.go | 69 ++++++- plugins/openapi/adapter/versions_test.go | 25 +++ plugins/openapi/openapi.go | 7 +- plugins/openapi/versions_test.go | 27 ++- providers/stripe-sdks.md | 3 +- providers/stripe.md | 18 +- 12 files changed, 399 insertions(+), 63 deletions(-) create mode 100644 plugins/changelog/pins_stripe_test.go create mode 100644 plugins/openapi/adapter/testdata/versions/stripe-openapi-releases.json diff --git a/plugins/changelog/pins_stripe_test.go b/plugins/changelog/pins_stripe_test.go new file mode 100644 index 0000000..8a38ff9 --- /dev/null +++ b/plugins/changelog/pins_stripe_test.go @@ -0,0 +1,70 @@ +package changelog + +import ( + "context" + "net/http" + "net/http/httptest" + "os" + "strings" + "testing" + + "github.com/patch-it-dev/patch-it-plugins/core/kit/kittest" + "github.com/patch-it-dev/patch-it-plugins/core/plugin" + "github.com/patch-it-dev/patch-it-plugins/core/versions" + _ "github.com/patch-it-dev/patch-it-plugins/plugins/openapi" // registers stripe/api +) + +// Every pin the seven Stripe SDK sources read from their saved changelogs is +// a version stripe/api lists, from its saved release listing +// (../openapi/adapter/testdata/versions/): the pin and the listing name an API +// version the same way, so a feed query on an SDK's versions finds the API's. +func TestStripePinsAreVersionsStripeAPILists(t *testing.T) { + listing, err := os.ReadFile("../openapi/adapter/testdata/versions/stripe-openapi-releases.json") + if err != nil { + t.Fatal(err) + } + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.URL.Path != "/repos/stripe/openapi/releases" || r.URL.Query().Get("page") != "1" { + t.Errorf("unexpected request %s", r.URL) + http.NotFound(w, r) + return + } + w.Write(listing) + })) + defer srv.Close() + old := versions.GitHubAPI + versions.GitHubAPI = srv.URL + defer func() { versions.GitHubAPI = old }() + + api, ok := plugin.Lookup("stripe/api") + if !ok { + t.Fatal("stripe/api isn't registered") + } + vs, err := api.(plugin.Versioned).ListVersions(context.Background(), plugin.Env{}) + if err != nil { + t.Fatal(err) + } + listed := map[string]bool{} + for _, v := range vs { + listed[v.ID] = true + } + + n := 0 + for _, c := range []struct { + file File + tag string + }{ + {StripePython, "17.1.0"}, {StripeNode, "23.2.0"}, {StripeGo, "87.2.0"}, {StripeJava, "34.1.0"}, + {StripeRuby, "21.1.0"}, {StripeDotnet, "53.2.0"}, {StripePHP, "23.1.0"}, + } { + for release, pin := range pins(kittest.Read(t, "testdata/pins/"+strings.ReplaceAll(c.file.API, "/", "-")+"-"+c.tag+"-CHANGELOG.md")) { + n++ + if c.file.Pins != "stripe/api" || !listed[pin] { + t.Errorf("%s %s pins %s %s, which stripe/api doesn't list", c.file.API, release, c.file.Pins, pin) + } + } + } + if n == 0 { + t.Fatal("no pins read") + } +} diff --git a/plugins/openapi/adapter/adapter.go b/plugins/openapi/adapter/adapter.go index ea200c6..cdea119 100644 --- a/plugins/openapi/adapter/adapter.go +++ b/plugins/openapi/adapter/adapter.go @@ -44,3 +44,11 @@ type Reshaper interface { type Lister interface { Versions(ctx context.Context) ([]plugin.Version, error) } + +// SpecVersioned is a Lister whose version ids are the specs' own +// info.version (Stripe's API versions): a spec read at a listed version must +// declare that version, or it's an error, never another version's content. +type SpecVersioned interface { + Lister + ListsSpecVersions() +} diff --git a/plugins/openapi/adapter/stripe.go b/plugins/openapi/adapter/stripe.go index 4c94628..40cd89c 100644 --- a/plugins/openapi/adapter/stripe.go +++ b/plugins/openapi/adapter/stripe.go @@ -3,9 +3,7 @@ package adapter import ( "context" "encoding/json" - "errors" "fmt" - "net/http" "github.com/patch-it-dev/patch-it-plugins/core/fetch" "github.com/patch-it-dev/patch-it-plugins/core/github" @@ -15,11 +13,8 @@ import ( var ( stripeReleasesURL = "https://api.github.com/repos/stripe/openapi/releases/latest" // stripeSpecURLTemplate is Stripe's recommended file: v1 + v2 endpoints. + // Every release that names its API version (Versions) has it. stripeSpecURLTemplate = "https://raw.githubusercontent.com/stripe/openapi/%s/latest/openapi.spec3.json" - // stripeLegacySpecURLTemplate is v1 only, but it's the only file that - // exists on tags from before Stripe added the latest/ directory (e.g. - // v207, from 2022) — still updated on every release since. - stripeLegacySpecURLTemplate = "https://raw.githubusercontent.com/stripe/openapi/%s/openapi/spec3.json" ) // Stripe is the reference adapter: the pattern every future adapter follows. @@ -41,17 +36,10 @@ func (Stripe) LatestTag(ctx context.Context) (string, error) { } // Fetch downloads the spec pinned to tag and reads its declared API version -// out of info.version — the only version field the spec has. Tags old enough -// to predate the latest/ directory fall back to the legacy, v1-only file. +// out of info.version — the only version field the spec has. func (Stripe) Fetch(ctx context.Context, tag string) (Spec, error) { url := fmt.Sprintf(stripeSpecURLTemplate, tag) body, err := fetch.Get(ctx, url, nil) // raw.githubusercontent.com needs no auth - - var statusErr *fetch.StatusError - if errors.As(err, &statusErr) && statusErr.StatusCode == http.StatusNotFound { - url = fmt.Sprintf(stripeLegacySpecURLTemplate, tag) - body, err = fetch.Get(ctx, url, nil) - } if err != nil { return Spec{}, fmt.Errorf("fetching stripe spec %s: %w", tag, err) } diff --git a/plugins/openapi/adapter/stripe_test.go b/plugins/openapi/adapter/stripe_test.go index d10e366..80e73f2 100644 --- a/plugins/openapi/adapter/stripe_test.go +++ b/plugins/openapi/adapter/stripe_test.go @@ -26,13 +26,10 @@ func fakeGitHub(t *testing.T, releaseJSON string, specs map[string]string) *http })) t.Cleanup(srv.Close) - oldRel, oldSpec, oldLegacy := stripeReleasesURL, stripeSpecURLTemplate, stripeLegacySpecURLTemplate + oldRel, oldSpec := stripeReleasesURL, stripeSpecURLTemplate stripeReleasesURL = srv.URL + "/releases/latest" stripeSpecURLTemplate = srv.URL + "/%s/latest/openapi.spec3.json" - stripeLegacySpecURLTemplate = srv.URL + "/%s/openapi/spec3.json" - t.Cleanup(func() { - stripeReleasesURL, stripeSpecURLTemplate, stripeLegacySpecURLTemplate = oldRel, oldSpec, oldLegacy - }) + t.Cleanup(func() { stripeReleasesURL, stripeSpecURLTemplate = oldRel, oldSpec }) return srv } @@ -54,7 +51,6 @@ func TestLatestTagRejectsAReleaseWithoutATag(t *testing.T) { func TestFetchUsesTheRecommendedSpec(t *testing.T) { srv := fakeGitHub(t, "", map[string]string{ "/v2468/latest/openapi.spec3.json": `{"info":{"version":"2026-08-26.dahlia"}}`, - "/v2468/openapi/spec3.json": `{"info":{"version":"legacy-should-not-be-used"}}`, }) spec, err := Stripe{}.Fetch(context.Background(), "v2468") if err != nil { @@ -65,25 +61,6 @@ func TestFetchUsesTheRecommendedSpec(t *testing.T) { } } -// The demo change lives on tag v207, which predates Stripe's latest/ directory. -// Without this fallback the demo couldn't be fetched at all, and the event's -// provenance must name the file that was actually used. -func TestFetchFallsBackToTheLegacySpecForOldTags(t *testing.T) { - srv := fakeGitHub(t, "", map[string]string{ - "/v207/openapi/spec3.json": `{"info":{"version":"2022-08-01"}}`, - }) - spec, err := Stripe{}.Fetch(context.Background(), "v207") - if err != nil { - t.Fatalf("old tag: %v", err) - } - if spec.Version != "2022-08-01" { - t.Errorf("version %q, want 2022-08-01", spec.Version) - } - if spec.SourceURL != srv.URL+"/v207/openapi/spec3.json" { - t.Errorf("source_url %s, want the legacy file that was actually fetched", spec.SourceURL) - } -} - func TestFetchRejectsASpecWithoutAVersion(t *testing.T) { fakeGitHub(t, "", map[string]string{"/v1/latest/openapi.spec3.json": `{"info":{}}`}) _, err := Stripe{}.Fetch(context.Background(), "v1") diff --git a/plugins/openapi/adapter/testdata/README.md b/plugins/openapi/adapter/testdata/README.md index d24b82e..ae38714 100644 --- a/plugins/openapi/adapter/testdata/README.md +++ b/plugins/openapi/adapter/testdata/README.md @@ -13,6 +13,7 @@ The version-listing tests (`versions_test.go`) read these instead of the network | `versions/sentry-schema-releases.json` | `https://api.github.com/repos/getsentry/sentry-api-schema/releases` (pages 1-4) | 2.3.2 and 2.4.0; same fields | | `versions/algolia-refs.json` | `https://api.github.com/repos/algolia/api-clients-automation/git/matching-refs/tags/released-` | 9 of 186 tags, five of them on two days with several releases | | `versions/algolia-commit-*.json` | `https://api.github.com/repos/algolia/api-clients-automation/commits/` | `sha` and the committer date | +| `versions/stripe-openapi-releases.json` | `https://api.github.com/repos/stripe/openapi/releases/tags/`, one per release, in the order `releases?per_page=100` lists them | 21 of 2,591: the first and the last release of each of the 10 API versions their notes name (v2191 to v2602), and v2190, the newest whose notes name none; `tag_name`, `name`, `draft`, `prerelease`, `published_at`, `html_url`, `body` | | `versions/appwrite-commits.json` | `https://api.github.com/repos/appwrite/specs/commits?path=specs&per_page=100&page=1` | the 40 newest commits; `sha`, `html_url`, the committer date | Licenses: these are API metadata (tag names, dates, SHAs), not the projects' content. diff --git a/plugins/openapi/adapter/testdata/versions/stripe-openapi-releases.json b/plugins/openapi/adapter/testdata/versions/stripe-openapi-releases.json new file mode 100644 index 0000000..c56013b --- /dev/null +++ b/plugins/openapi/adapter/testdata/versions/stripe-openapi-releases.json @@ -0,0 +1,191 @@ +[ + { + "body": "[unified]\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-11-18.endive |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-11-18.preview |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-11-18.preview |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2602", + "name": "v2602", + "prerelease": false, + "published_at": "2026-11-18T19:25:13Z", + "tag_name": "v2602" + }, + { + "body": "[unified]\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-11-18.endive |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-11-18.preview |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-10-28.preview |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2601", + "name": "v2601", + "prerelease": false, + "published_at": "2026-11-17T22:34:17Z", + "tag_name": "v2601" + }, + { + "body": "[unified]\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-10-28.endive |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-10-28.preview |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-10-28.preview |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2600", + "name": "v2600", + "prerelease": false, + "published_at": "2026-11-10T19:28:37Z", + "tag_name": "v2600" + }, + { + "body": "[unified]\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-10-28.endive |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-10-28.preview |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-10-28.preview |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2593", + "name": "v2593", + "prerelease": false, + "published_at": "2026-10-26T23:07:02Z", + "tag_name": "v2593" + }, + { + "body": "\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-09-30.endive |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-09-30.preview |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-10-28.preview |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2592", + "name": "v2592", + "prerelease": false, + "published_at": "2026-10-26T22:06:59Z", + "tag_name": "v2592" + }, + { + "body": "* Add support for new resources `Apps.Install`, `ProductCatalog.TrialOffer`, `Tax.Location`, and `ThreeDSecure.Authentication`\n* Add support for `create`, `list`, `retrieve`, `uninstall`, and `update` methods on resource `Apps.Install`\n* Add support for `create`, `list`, `retrieve`, and `update` methods on resource `ProductCatalog.TrialOffer`\n* Add support for `create`, `list`, and `retrieve` methods on resource `Tax.Location`\n* Add support for `cancel`, `create`, `list`, `retrieve`, and `submit` methods on resource `ThreeDSecure.Authentication`\n* Add support for `pause` method on resource `Subscription`\n* \u26a0\ufe0f Add support for new values `invalid_address_cmra_address` and `invalid_address_registered_agent_address` on enums `Account.future_requirements.errors[].code`, `Account.requirements.errors[].code`, `BankAccount.future_requirements.errors[].code`, `BankAccount.requirements.errors[].code`, `Capability.future_requirements.errors[].code`, `Capability.requirements.errors[].code`, `Person.future_requirements.errors[].code`, and `Person.requirements.errors[].code`\n* Add support for `performance_location` on `Tax.Calculation#create.line_items[]` and `Tax.CalculationLineItem`\n* Add support for new value `performance` on enums `Tax.Calculation.shipping_cost.tax_breakdown[].sourcing`, `Tax.CalculationLineItem.tax_breakdown[].sourcing`, and `Tax.Transaction.shipping_cost.tax_breakdown[].sourcing`\n* Add support for new values `admissions_tax`, `attendance_tax`, `digital_excise_tax`, `entertainment_tax`, `gross_receipts_tax`, `hospitality_tax`, `luxury_tax`, `recycling_fee`, `resort_tax`, `tourism_tax`, and `utility_users_tax` on enums `Tax.Calculation.shipping_cost.tax_breakdown[].tax_rate_details.tax_type`, `Tax.Calculation.tax_breakdown[].tax_rate_details.tax_type`, `Tax.CalculationLineItem.tax_breakdown[].tax_rate_details.tax_type`, and `Tax.Transaction.shipping_cost.tax_breakdown[].tax_rate_details.tax_type`\n* Add support for `destination` on `Reserve.Hold`, `Reserve.Plan`, and `Reserve.Release`\n* Add support for `manual_release` on `Reserve.Plan`\n* \u26a0\ufe0f Add support for new value `other` on enum `Reserve.Plan.status`\n* \u26a0\ufe0f Add support for new values `manual_release` and `other` on enum `Reserve.Plan.type`\n* \u26a0\ufe0f Add support for new value `hold_expired` on enum `Reserve.Release.reason`\n* \u26a0\ufe0f Remove support for value `bulk_hold_expiry` from enum `Reserve.Release.reason`\n* Add support for `specified_commercial_transactions_act_url` on `Account#create.business_profile`, `Account#update.business_profile`, and `Account.business_profile`\n* Add support for `blik_recurring_payments` and `sequra_payments` on `Account#create.capabilities`, `Account#update.capabilities`, and `Account.capabilities`\n* Add support for `paypay_payments` on `Account#create.capabilities`, `Account#create.settings`, `Account#update.capabilities`, `Account#update.settings`, `Account.capabilities`, and `Account.settings`\n* Add support for `sepa_debit_payments` on `Account#create.settings`\n* \u26a0\ufe0f Change type of `Account#reject.reason` from `string` to `enum`\n* Add support for new values `issuing_dispute_provisional_credit_reversal` and `issuing_dispute_provisional_credit` on enum `BalanceTransaction.type`\n* Add support for `paypay` on `Charge.payment_method_details`, `ConfirmationToken.payment_method_preview`, `ConfirmationToken.testHelpers#create.payment_method_data`, `PaymentAttemptRecord.payment_method_details`, `PaymentIntent#confirm.payment_method_data`, `PaymentIntent#confirm.payment_method_options`, `PaymentIntent#create.payment_method_data`, `PaymentIntent#create.payment_method_options`, `PaymentIntent#update.payment_method_data`, `PaymentIntent#update.payment_method_options`, `PaymentIntent.payment_method_options`, `PaymentMethod#create`, `PaymentMethodConfiguration#create`, `PaymentMethodConfiguration#update`, `PaymentMethodConfiguration`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `SetupIntent#confirm.payment_method_data`, `SetupIntent#create.payment_method_data`, and `SetupIntent#update.payment_method_data`\n* Add support for `sequra` on `Charge.payment_method_details`, `Checkout.Session#create.payment_method_options`, `Checkout.Session.payment_method_options`, `ConfirmationToken.payment_method_preview`, `ConfirmationToken.testHelpers#create.payment_method_data`, `PaymentAttemptRecord.payment_method_details`, `PaymentIntent#confirm.payment_method_data`, `PaymentIntent#confirm.payment_method_options`, `PaymentIntent#create.payment_method_data`, `PaymentIntent#create.payment_method_options`, `PaymentIntent#update.payment_method_data`, `PaymentIntent#update.payment_method_options`, `PaymentIntent.payment_method_options`, `PaymentMethod#create`, `PaymentMethodConfiguration#create`, `PaymentMethodConfiguration#update`, `PaymentMethodConfiguration`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `SetupIntent#confirm.payment_method_data`, `SetupIntent#create.payment_method_data`, and `SetupIntent#update.payment_method_data`\n* Add support for `electronic_commerce_indicator` on `Charge.payment_method_details.card`\n* \u26a0\ufe0f Change type of `Charge.payment_method_details.card.mandate` from `string` to `expandable($Mandate)`\n* Add support for `allowed_payment_method_types` on `Checkout.Session#create` and `Checkout.Session`\n* \u26a0\ufe0f Remove support for `payment_method_types` on `Checkout.Session#create`, `PaymentIntent#confirm`, `PaymentIntent#create`, `PaymentIntent#update`, `SetupIntent#create`, and `SetupIntent#update`\n* Add support for new values `paypay` and `sequra` on enums `Checkout.Session#create.excluded_payment_method_types`, `PaymentIntent#confirm.excluded_payment_method_types`, `PaymentIntent#create.excluded_payment_method_types`, `PaymentIntent#update.excluded_payment_method_types`, `PaymentIntent.excluded_payment_method_types`, `SetupIntent#create.excluded_payment_method_types`, `SetupIntent#update.excluded_payment_method_types`, and `SetupIntent.excluded_payment_method_types`\n* Add support for `tax_details` on `Checkout.Session#create.line_items[].price_data.product_data`, `Checkout.Session#update.line_items[].price_data.product_data`, `Invoice#add_lines.lines[].price_data.product_data`, `Invoice#update_lines.lines[].price_data.product_data`, `InvoiceLineItem#update.price_data.product_data`, `PaymentLink#create.line_items[].price_data.product_data`, `Plan#create.product[0]`, `Price#create.product_data`, `Product#create`, `Product#update`, and `Product`\n* Add support for `blik` on `Checkout.Session#create.payment_method_options`, `Invoice#create.payment_settings.payment_method_options`, `Invoice#update.payment_settings.payment_method_options`, `Invoice.payment_settings.payment_method_options`, `Mandate.payment_method_details`, `SetupAttempt.payment_method_details`, `SetupIntent#confirm.payment_method_options`, `SetupIntent#create.payment_method_options`, `SetupIntent#update.payment_method_options`, `SetupIntent.payment_method_options`, `Subscription#create.payment_settings.payment_method_options`, `Subscription#update.payment_settings.payment_method_options`, and `Subscription.payment_settings.payment_method_options`\n* Change type of `Checkout.Session#create.payment_method_options.bancontact.setup_future_usage`, `PaymentIntent#confirm.payment_method_options.blik.setup_future_usage`, `PaymentIntent#create.payment_method_options.blik.setup_future_usage`, and `PaymentIntent#update.payment_method_options.blik.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')`\n* \u26a0\ufe0f Change type of `Checkout.Session.payment_method_options.bancontact.setup_future_usage` and `PaymentIntent.payment_method_options.blik.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')`\n* Add support for new values `paypay` and `sequra` on enums `ConfirmationToken.testHelpers#create.payment_method_data.type`, `PaymentIntent#confirm.payment_method_data.type`, `PaymentIntent#create.payment_method_data.type`, `PaymentIntent#update.payment_method_data.type`, `SetupIntent#confirm.payment_method_data.type`, `SetupIntent#create.payment_method_data.type`, and `SetupIntent#update.payment_method_data.type`\n* Add support for new values `paypay` and `sequra` on enums `ConfirmationToken.payment_method_preview.type` and `PaymentMethod.type`\n* Add support for new values `paypay` and `sequra` on enums `Customer#list_payment_methods.type`, `PaymentMethod#create.type`, and `PaymentMethod#list.type`\n* Add support for new values `apps.install.created`, `apps.install.deleted`, and `apps.install.updated` on enum `Event.type`\n* Add support for new values `expired` and `pending` on enum `FinancialConnections.Account.account_numbers[].status`\n* Add support for `country` on `FinancialConnections.Session#create.filters`\n* \u26a0\ufe0f Remove support for `countries` on `FinancialConnections.Session#create.filters` and `FinancialConnections.Session.filters`\n* Add support for `invoicing_rules` on `InvoiceItem#update` and `InvoiceItem`\n* Add support for `company_details` on `Invoice#create.payment_settings.payment_method_options.billie`, `Invoice#update.payment_settings.payment_method_options.billie`, `Invoice.payment_settings.payment_method_options.billie`, `PaymentIntent#confirm.payment_method_options.billie`, `PaymentIntent#create.payment_method_options.billie`, `PaymentIntent#update.payment_method_options.billie`, `PaymentIntent.payment_method_options.billie`, `Subscription#create.payment_settings.payment_method_options.billie`, `Subscription#update.payment_settings.payment_method_options.billie`, and `Subscription.payment_settings.payment_method_options.billie`\n* Add support for `reference` on `Invoice#create.payment_settings.payment_method_options.billie`, `Invoice#update.payment_settings.payment_method_options.billie`, `Invoice.payment_settings.payment_method_options.billie`, `PaymentIntent#confirm.payment_method_options.billie`, `PaymentIntent#create.payment_method_options.billie`, `PaymentIntent#update.payment_method_options.billie`, and `PaymentIntent.payment_method_options.billie`\n* Add support for new value `blik` on enums `Invoice#create.payment_settings.payment_method_types`, `Invoice#update.payment_settings.payment_method_types`, `Invoice.payment_settings.payment_method_types`, `Subscription#create.payment_settings.payment_method_types`, `Subscription#update.payment_settings.payment_method_types`, and `Subscription.payment_settings.payment_method_types`\n* Add support for new values `digital_excise_tax` and `utility_users_tax` on enums `Invoice#add_lines.lines[].tax_amounts[].tax_rate_data.tax_type`, `Invoice#update_lines.lines[].tax_amounts[].tax_rate_data.tax_type`, `InvoiceLineItem#update.tax_amounts[].tax_rate_data.tax_type`, `TaxRate#create.tax_type`, `TaxRate#update.tax_type`, and `TaxRate.tax_type`\n* Add support for `pause` on `Invoice#create_preview.subscription_details`\n* \u26a0\ufe0f Change type of `Invoice#create_preview.subscription_details.billing_cycle_anchor` from `enum('now'|'unchanged') | DateTime` to `billing_cycle_anchor_param`\n* Add support for `current_trial` on `Invoice#create_preview.subscription_details.items[]`, `Subscription#create.items[]`, `Subscription#update.items[]`, `SubscriptionItem#create`, `SubscriptionItem#update`, and `SubscriptionItem`\n* Add support for `status_details` on `Invoice` and `Subscription`\n* Add support for `momo` on `PaymentAttemptRecord.payment_method_details` and `PaymentRecord.payment_method_details`\n* Add support for new values `2.3.0` and `2.3.1` on enums `PaymentAttemptRecord.payment_method_details.card.three_d_secure.version` and `PaymentRecord.payment_method_details.card.three_d_secure.version`\n* Add support for `link` on `PaymentAttemptRecord.payment_method_details.card.wallet` and `PaymentRecord.payment_method_details.card.wallet`\n* Add support for `funding_source_group` on `PaymentAttemptRecord.payment_method_details.link` and `PaymentRecord.payment_method_details.link`\n* Add support for new values `card_present` and `interac_present` on enums `PaymentIntent#confirm.allowed_payment_method_types`, `PaymentIntent#create.allowed_payment_method_types`, `PaymentIntent#update.allowed_payment_method_types`, `PaymentIntent.allowed_payment_method_types`, `SetupIntent#confirm.allowed_payment_method_types`, `SetupIntent#create.allowed_payment_method_types`, `SetupIntent#update.allowed_payment_method_types`, and `SetupIntent.allowed_payment_method_types`\n* Add support for `mandate_options` on `PaymentIntent#confirm.payment_method_options.blik`, `PaymentIntent#create.payment_method_options.blik`, `PaymentIntent#update.payment_method_options.blik`, and `PaymentIntent.payment_method_options.blik`\n* Add support for `payment_record` on `PaymentIntent`\n* Add support for `expires_at` on `PaymentIntent.next_action.swish_handle_redirect_or_display_qr_code.qr_code`\n* Add support for new values `paypay` and `sequra` on enums `PaymentLink#create.payment_method_types`, `PaymentLink#update.payment_method_types`, and `PaymentLink.payment_method_types`\n* \u26a0\ufe0f Remove support for `payto` on `PaymentMethod#update`\n* Add support for `canceled` on `PaymentRecord#report_payment_attempt` and `PaymentRecord#report_payment`\n* Add support for new value `canceled` on enums `PaymentRecord#report_payment.outcome` and `PaymentRecord#report_payment_attempt.outcome`\n* Add support for new value `rerouted` on enum `Radar.PaymentEvaluation.outcome.type`\n* Add support for `early_fraud_warning` and `fraudulent_dispute` on `Radar.PaymentEvaluation.signals`\n* \u26a0\ufe0f Change type of `Radar.PaymentEvaluation.signals.fraudulent_payment.score` from `number` to `nullable(number)`\n* Add support for `pause_schedules` on `SubscriptionSchedule#create`, `SubscriptionSchedule#update`, and `SubscriptionSchedule`\n* \u26a0\ufe0f Change type of `Subscription#resume.billing_cycle_anchor` and `Subscription#update.billing_cycle_anchor` from `enum('now'|'unchanged')` to `billing_cycle_anchor_param`\n* Add support for `billing_cycle_anchor` on `Subscription#create.trial_settings.end_behavior`, `Subscription#update.trial_settings.end_behavior`, and `Subscription.trial_settings.end_behavior`\n* Change `Subscription#create.trial_settings.end_behavior.missing_payment_method` and `Subscription#update.trial_settings.end_behavior.missing_payment_method` to be optional\n* Add support for `payment_behavior` on `Subscription#resume`\n* Add support for `cancel_at_period_end` on `Subscription.pending_update`\n* \u26a0\ufe0f Remove support for `igic` on `Tax.Registration#create.country_options.at`, `Tax.Registration#create.country_options.be`, `Tax.Registration#create.country_options.bg`, `Tax.Registration#create.country_options.cy`, `Tax.Registration#create.country_options.cz`, `Tax.Registration#create.country_options.de`, `Tax.Registration#create.country_options.dk`, `Tax.Registration#create.country_options.ee`, `Tax.Registration#create.country_options.es`, `Tax.Registration#create.country_options.fi`, `Tax.Registration#create.country_options.fr`, `Tax.Registration#create.country_options.gr`, `Tax.Registration#create.country_options.hr`, `Tax.Registration#create.country_options.hu`, `Tax.Registration#create.country_options.ie`, `Tax.Registration#create.country_options.it`, `Tax.Registration#create.country_options.lt`, `Tax.Registration#create.country_options.lu`, `Tax.Registration#create.country_options.lv`, `Tax.Registration#create.country_options.mt`, `Tax.Registration#create.country_options.nl`, `Tax.Registration#create.country_options.pl`, `Tax.Registration#create.country_options.pt`, `Tax.Registration#create.country_options.ro`, `Tax.Registration#create.country_options.se`, `Tax.Registration#create.country_options.si`, `Tax.Registration#create.country_options.sk`, `Tax.Registration.country_options.at`, `Tax.Registration.country_options.be`, `Tax.Registration.country_options.bg`, `Tax.Registration.country_options.cy`, `Tax.Registration.country_options.cz`, `Tax.Registration.country_options.de`, `Tax.Registration.country_options.dk`, `Tax.Registration.country_options.ee`, `Tax.Registration.country_options.es`, `Tax.Registration.country_options.fi`, `Tax.Registration.country_options.fr`, `Tax.Registration.country_options.gr`, `Tax.Registration.country_options.hr`, `Tax.Registration.country_options.hu`, `Tax.Registration.country_options.ie`, `Tax.Registration.country_options.it`, `Tax.Registration.country_options.lt`, `Tax.Registration.country_options.lu`, `Tax.Registration.country_options.lv`, `Tax.Registration.country_options.mt`, `Tax.Registration.country_options.nl`, `Tax.Registration.country_options.pl`, `Tax.Registration.country_options.pt`, `Tax.Registration.country_options.ro`, `Tax.Registration.country_options.se`, `Tax.Registration.country_options.si`, and `Tax.Registration.country_options.sk`\n* Add support for `admissions_tax`, `attendance_tax`, `entertainment_tax`, `gross_receipts_tax`, `hospitality_tax`, `luxury_tax`, `resort_tax`, and `tourism_tax` on `Tax.Registration#create.country_options.us` and `Tax.Registration.country_options.us`\n* Add support for new values `admissions_tax`, `attendance_tax`, `entertainment_tax`, `gross_receipts_tax`, `hospitality_tax`, `luxury_tax`, `resort_tax`, and `tourism_tax` on enums `Tax.Registration#create.country_options.us.type` and `Tax.Registration.country_options.us.type`\n* Add support for `requirements` on `TaxCode`\n* Add support for new value `rtp` on enum `Treasury.FinancialAccount.financial_addresses[].supported_networks`\n* Add support for new value `rtp` on enum `Treasury.ReceivedCredit.testHelpers#create.network`\n* Add support for new value `rtp` on enum `Treasury.ReceivedCredit.network`\n* Add support for new values `apps.install.created`, `apps.install.deleted`, and `apps.install.updated` on enums `WebhookEndpoint#create.enabled_events` and `WebhookEndpoint#update.enabled_events`\n* Add support for new value `2026-09-30.endive` on enum `WebhookEndpoint#create.api_version`\n* Add support for snapshot events `apps.install.created`, `apps.install.deleted`, and `apps.install.updated` with resource `Apps.Install`\n* Add support for error codes `dispute_evidence_page_limit_exceeded`, `financial_connections_consent_locale_invalid`, `financial_connections_consent_locale_unsupported`, and `payment_evaluation_on_api_version_not_supported` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, `StripeError`, and `Terminal.Reader.action.api_error`\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-09-30.endive |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-09-30.preview |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-09-23.preview |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2517", + "name": "v2517", + "prerelease": false, + "published_at": "2026-09-23T23:07:32Z", + "tag_name": "v2517" + }, + { + "body": "\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-08-26.dahlia |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-08-26.preview |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-09-23.preview |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2516", + "name": "v2516", + "prerelease": false, + "published_at": "2026-09-22T23:40:19Z", + "tag_name": "v2516" + }, + { + "body": "* Add support for new resource `Billing.FeedbackOption`\r\n* Add support for `create`, `deactivate`, `list`, `retrieve`, and `update` methods on resource `Billing.FeedbackOption`\r\n* Add support for `payment_method_settings` on `AccountSession#create.components` and `AccountSession.components`\r\n* Add support for `feedback_options` on `BillingPortal.Configuration#create.features.subscription_cancel.cancellation_reason`, `BillingPortal.Configuration#update.features.subscription_cancel.cancellation_reason`, and `BillingPortal.Configuration.features.subscription_cancel.cancellation_reason`\r\n* Add support for new value `customer_update` on enum `BillingPortal.Session#create.flow_data.type`\r\n* Add support for `customer_update` on `BillingPortal.Session.flow`\r\n* \u26a0\ufe0f Add support for new value `customer_update` on enum `BillingPortal.Session.flow.type`\r\n* Add support for `funding_source_group` on `Charge.payment_method_details.card.wallet.link` and `Charge.payment_method_details.link`\r\n* Add support for `funding_types_blocked` on `Checkout.Session#create.payment_method_options.card.restrictions` and `Checkout.Session.payment_method_options.card.restrictions`\r\n* Add support for `metadata` on `ConfirmationToken`\r\n* Add support for `active_entitlements` and `customer_portal` on `CustomerSession#create.components` and `CustomerSession.components`\r\n* Add support for `country` on `FinancialConnections.Session.filters`\r\n* Add support for `frozen_fields` on `InvoiceItem`\r\n* Add support for `billie` on `Invoice#create.payment_settings.payment_method_options`, `Invoice#update.payment_settings.payment_method_options`, `Invoice.payment_settings.payment_method_options`, `Subscription#create.payment_settings.payment_method_options`, `Subscription#update.payment_settings.payment_method_options`, and `Subscription.payment_settings.payment_method_options`\r\n* Add support for new value `billie` on enums `Invoice#create.payment_settings.payment_method_types`, `Invoice#update.payment_settings.payment_method_types`, `Subscription#create.payment_settings.payment_method_types`, and `Subscription#update.payment_settings.payment_method_types`\r\n* \u26a0\ufe0f Add support for new value `billie` on enums `Invoice.payment_settings.payment_method_types` and `Subscription.payment_settings.payment_method_types`\r\n* \u26a0\ufe0f Remove support for `cryptogram` on `PaymentAttemptRecord.payment_method_details.card.three_d_secure` and `PaymentRecord.payment_method_details.card.three_d_secure`\r\n* Add support for new value `touch_n_go` on enums `PaymentIntent#confirm.allowed_payment_method_types`, `PaymentIntent#create.allowed_payment_method_types`, `PaymentIntent#update.allowed_payment_method_types`, `SetupIntent#confirm.allowed_payment_method_types`, `SetupIntent#create.allowed_payment_method_types`, and `SetupIntent#update.allowed_payment_method_types`\r\n* \u26a0\ufe0f Add support for new value `touch_n_go` on enums `PaymentIntent.allowed_payment_method_types` and `SetupIntent.allowed_payment_method_types`\r\n* Change `PaymentIntent.allowed_payment_method_types` and `SetupIntent.allowed_payment_method_types` to be required\r\n* Add support for `application_fee_amount`, `application_fee_percent`, `on_behalf_of`, and `transfer_data` on `PaymentLink#update`\r\n* Add support for `feedback_option` on `Subscription#cancel.cancellation_details`, `Subscription#update.cancellation_details`, and `Subscription.cancellation_details`\r\n* Add support for `igic` on `Tax.Registration#create.country_options.at`, `Tax.Registration#create.country_options.be`, `Tax.Registration#create.country_options.bg`, `Tax.Registration#create.country_options.cy`, `Tax.Registration#create.country_options.cz`, `Tax.Registration#create.country_options.de`, `Tax.Registration#create.country_options.dk`, `Tax.Registration#create.country_options.ee`, `Tax.Registration#create.country_options.es`, `Tax.Registration#create.country_options.fi`, `Tax.Registration#create.country_options.fr`, `Tax.Registration#create.country_options.gr`, `Tax.Registration#create.country_options.hr`, `Tax.Registration#create.country_options.hu`, `Tax.Registration#create.country_options.ie`, `Tax.Registration#create.country_options.it`, `Tax.Registration#create.country_options.lt`, `Tax.Registration#create.country_options.lu`, `Tax.Registration#create.country_options.lv`, `Tax.Registration#create.country_options.mt`, `Tax.Registration#create.country_options.nl`, `Tax.Registration#create.country_options.pl`, `Tax.Registration#create.country_options.pt`, `Tax.Registration#create.country_options.ro`, `Tax.Registration#create.country_options.se`, `Tax.Registration#create.country_options.si`, `Tax.Registration#create.country_options.sk`, `Tax.Registration.country_options.at`, `Tax.Registration.country_options.be`, `Tax.Registration.country_options.bg`, `Tax.Registration.country_options.cy`, `Tax.Registration.country_options.cz`, `Tax.Registration.country_options.de`, `Tax.Registration.country_options.dk`, `Tax.Registration.country_options.ee`, `Tax.Registration.country_options.es`, `Tax.Registration.country_options.fi`, `Tax.Registration.country_options.fr`, `Tax.Registration.country_options.gr`, `Tax.Registration.country_options.hr`, `Tax.Registration.country_options.hu`, `Tax.Registration.country_options.ie`, `Tax.Registration.country_options.it`, `Tax.Registration.country_options.lt`, `Tax.Registration.country_options.lu`, `Tax.Registration.country_options.lv`, `Tax.Registration.country_options.mt`, `Tax.Registration.country_options.nl`, `Tax.Registration.country_options.pl`, `Tax.Registration.country_options.pt`, `Tax.Registration.country_options.ro`, `Tax.Registration.country_options.se`, `Tax.Registration.country_options.si`, and `Tax.Registration.country_options.sk`\r\n* Add support for new value `2026-08-26.dahlia` on enum `WebhookEndpoint#create.api_version`\r\n* Add support for error codes `authentication_failure`, `capability_not_active`, `expired_payment_method`, `incorrect_postal_code`, `invalid_canceled_subscription_fields`, and `payment_method_restricted` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, `StripeError`, and `Terminal.Reader.action.api_error`\r\n\r\n## OpenAPI spec versions\r\n\r\n| Spec | info.version |\r\n|------|--------------|\r\n| openapi/spec3.sdk.{json,yaml} | 2026-08-26.dahlia |\r\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-08-26.preview |\r\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-08-26.preview |\r\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2442", + "name": "v2442", + "prerelease": false, + "published_at": "2026-08-26T18:07:31Z", + "tag_name": "v2442" + }, + { + "body": "\r\n## OpenAPI spec versions\r\n\r\n| Spec | info.version |\r\n|------|--------------|\r\n| openapi/spec3.sdk.{json,yaml} | 2026-07-29.dahlia |\r\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-07-29.preview |\r\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-08-26.preview |\r\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2441", + "name": "v2441", + "prerelease": false, + "published_at": "2026-08-26T17:30:37Z", + "tag_name": "v2441" + }, + { + "body": "* Add support for new resource `FinancialConnections.Authorization`\n* Add support for `unreject` method on resource `Account`\n* Add support for `list` method on resource `PaymentRecord`\n* \u26a0\ufe0f Add support for new values `mass_transit_parking_tax` and `parking_tax` on enums `Tax.Calculation.shipping_cost.tax_breakdown[].tax_rate_details.tax_type`, `Tax.Calculation.tax_breakdown[].tax_rate_details.tax_type`, `Tax.CalculationLineItem.tax_breakdown[].tax_rate_details.tax_type`, and `Tax.Transaction.shipping_cost.tax_breakdown[].tax_rate_details.tax_type`\n* Add support for new value `chaps` on enums `FundingInstructions.bank_transfer.financial_addresses[].supported_networks` and `PaymentIntent.next_action.display_bank_transfer_instructions.financial_addresses[].supported_networks`\n* Add support for `smart_disputes_management` on `AccountSession#create.components.disputes_list.features`, `AccountSession#create.components.payment_details.features`, `AccountSession#create.components.payment_disputes.features`, `AccountSession#create.components.payments.features`, `AccountSession.components.disputes_list.features`, `AccountSession.components.payment_details.features`, `AccountSession.components.payment_disputes.features`, and `AccountSession.components.payments.features`\n* Add support for `administrative_address` and `principal_place_of_business` on `Account#create.company`, `Account#update.company`, `Account.company`, and `Token#create.account.company`\n* Add support for `sepa_debit_payments` on `Account#update.settings`\n* \u26a0\ufe0f Remove support for `proof_of_registration` on `Account#create.documents`\n* Add support for `payouts_action` on `Account#reject`\n* Add support for new value `data_share_only` on enums `Charge.payment_method_details.card.three_d_secure.result`, `PaymentAttemptRecord.payment_method_details.card.three_d_secure.result`, `PaymentRecord.payment_method_details.card.three_d_secure.result`, and `SetupAttempt.payment_method_details.card.three_d_secure.result`\n* \u26a0\ufe0f Add support for new values `bnp_paribas`, `citibank`, and `mbsb_bank` on enums `Charge.payment_method_details.fpx.bank`, `ConfirmationToken.payment_method_preview.fpx.bank`, `PaymentAttemptRecord.payment_method_details.fpx.bank`, `PaymentMethod.fpx.bank`, and `PaymentRecord.payment_method_details.fpx.bank`\n* \u26a0\ufe0f Remove support for `dynamic_tax_rates` on `Checkout.Session#create.line_items[]`\n* Add support for `setup_future_usage` on `Checkout.Session#create.payment_method_options.payco`, `Checkout.Session#create.payment_method_options.samsung_pay`, `Checkout.Session.payment_method_options.payco`, `Checkout.Session.payment_method_options.samsung_pay`, `PaymentIntent#confirm.payment_method_options.payco`, `PaymentIntent#confirm.payment_method_options.samsung_pay`, `PaymentIntent#create.payment_method_options.payco`, `PaymentIntent#create.payment_method_options.samsung_pay`, `PaymentIntent#update.payment_method_options.payco`, `PaymentIntent#update.payment_method_options.samsung_pay`, `PaymentIntent.payment_method_options.payco`, `PaymentIntent.payment_method_options.samsung_pay`, and `PaymentLink#update.payment_intent_data`\n* \u26a0\ufe0f Add support for new value `ic_nif` on enums `Checkout.Session.customer_details.tax_ids[].type`, `Invoice.customer_tax_ids[].type`, `Tax.Calculation.customer_details.tax_ids[].type`, `Tax.Transaction.customer_details.tax_ids[].type`, and `TaxId.type`\n* Add support for new values `bnp_paribas`, `citibank`, and `mbsb_bank` on enums `ConfirmationToken.testHelpers#create.payment_method_data.fpx.bank`, `PaymentIntent#confirm.payment_method_data.fpx.bank`, `PaymentIntent#create.payment_method_data.fpx.bank`, `PaymentIntent#update.payment_method_data.fpx.bank`, `PaymentMethod#create.fpx.bank`, `SetupIntent#confirm.payment_method_data.fpx.bank`, `SetupIntent#create.payment_method_data.fpx.bank`, and `SetupIntent#update.payment_method_data.fpx.bank`\n* Add support for new value `ic_nif` on enums `Customer#create.tax_id_data[].type`, `Invoice#create_preview.customer_details.tax_ids[].type`, `Tax.Calculation#create.customer_details.tax_ids[].type`, and `TaxId#create.type`\n* Add support for `network` on `Dispute.payment_method_details.card`\n* Add support for new values `financial_connections.account.expected_deactivation_date_updated`, `financial_connections.account.supported_payment_method_types_updated`, `financial_connections.account.upcoming_deactivation`, `financial_connections.authorization.expected_deactivation_date_updated`, and `financial_connections.authorization.upcoming_deactivation` on enum `Event.type`\n* Add support for `limits` and `manual_entry` on `FinancialConnections.Session#create` and `FinancialConnections.Session`\n* Add support for `require_payment_method_support` on `FinancialConnections.Session#create.filters` and `FinancialConnections.Session.filters`\n* Add support for `bank_account_token` on `FinancialConnections.Session`\n* Add support for new values `alipay` and `mb_way` on enums `Invoice#create.payment_settings.payment_method_types`, `Invoice#update.payment_settings.payment_method_types`, `Invoice.payment_settings.payment_method_types`, `Subscription#create.payment_settings.payment_method_types`, `Subscription#update.payment_settings.payment_method_types`, and `Subscription.payment_settings.payment_method_types`\n* Add support for new values `mass_transit_parking_tax` and `parking_tax` on enums `Invoice#add_lines.lines[].tax_amounts[].tax_rate_data.tax_type`, `Invoice#update_lines.lines[].tax_amounts[].tax_rate_data.tax_type`, `InvoiceLineItem#update.tax_amounts[].tax_rate_data.tax_type`, `TaxRate#create.tax_type`, `TaxRate#update.tax_type`, and `TaxRate.tax_type`\n* Add support for `metadata` on `Invoice#create_preview.subscription_details`\n* Add support for new value `stripe_internal_error` on enum `Issuing.Authorization.request_history[].reason`\n* Add support for `business_name` on `Issuing.Card#create.shipping`, `Issuing.Card#update.shipping`, and `Issuing.Card.shipping`\n* Add support for new value `correos` on enum `Issuing.Card.shipping.carrier`\n* Add support for `allowed_payment_method_types` on `PaymentIntent#confirm`, `PaymentIntent#create`, `PaymentIntent#update`, `PaymentIntent`, `SetupIntent#confirm`, `SetupIntent#create`, `SetupIntent#update`, and `SetupIntent`\n* Add support for `referrer` on `PaymentIntent#confirm.radar_options` and `PaymentIntent#create.radar_options`\n* Add support for `consent_collection` and `shipping_options` on `PaymentLink#update`\n* Add support for `custom_fields`, `description`, and `footer` on `Quote#create.invoice_settings`, `Quote#update.invoice_settings`, `Quote.invoice_settings`, `SubscriptionSchedule#create.default_settings.invoice_settings`, `SubscriptionSchedule#create.phases[].invoice_settings`, `SubscriptionSchedule#update.default_settings.invoice_settings`, `SubscriptionSchedule#update.phases[].invoice_settings`, `SubscriptionSchedule.default_settings.invoice_settings`, and `SubscriptionSchedule.phases[].invoice_settings`\n* Add support for `customer_account` and `customer` on `Refund`\n* Add support for `payment_method` on `Refund` and `Topup`\n* Add support for `trial` on `SubscriptionSchedule.phases[]`\n* Add support for `mass_transit_parking_tax` and `parking_tax` on `Tax.Registration#create.country_options.us` and `Tax.Registration.country_options.us`\n* Add support for new values `mass_transit_parking_tax` and `parking_tax` on enum `Tax.Registration#create.country_options.us.type`\n* \u26a0\ufe0f Add support for new values `mass_transit_parking_tax` and `parking_tax` on enum `Tax.Registration.country_options.us.type`\n* Add support for `initiated_by` and `payment_method_options` on `Topup`\n* Add support for new values `financial_connections.account.expected_deactivation_date_updated`, `financial_connections.account.supported_payment_method_types_updated`, `financial_connections.account.upcoming_deactivation`, `financial_connections.authorization.expected_deactivation_date_updated`, and `financial_connections.authorization.upcoming_deactivation` on enums `WebhookEndpoint#create.enabled_events` and `WebhookEndpoint#update.enabled_events`\n* Add support for new value `2026-07-29.dahlia` on enum `WebhookEndpoint#create.api_version`\n* Add support for snapshot events `financial_connections.account.expected_deactivation_date_updated`, `financial_connections.account.supported_payment_method_types_updated`, and `financial_connections.account.upcoming_deactivation` with resource `FinancialConnections.Account`\n* Add support for snapshot events `financial_connections.authorization.expected_deactivation_date_updated` and `financial_connections.authorization.upcoming_deactivation` with resource `FinancialConnections.Authorization`\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-07-29.dahlia |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-07-29.preview |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-07-29.preview |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2349", + "name": "v2349", + "prerelease": false, + "published_at": "2026-07-29T18:43:54Z", + "tag_name": "v2349" + }, + { + "body": "\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-06-24.dahlia |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-06-24.preview |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-07-29.preview |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2348", + "name": "v2348", + "prerelease": false, + "published_at": "2026-07-29T17:15:51Z", + "tag_name": "v2348" + }, + { + "body": "* Add support for `release_details` on `Reserve.Hold`\n* \u26a0\ufe0f Add support for new value `tax_fund` on enum `BalanceTransaction.type`\n* Change `Billing.CreditGrant.priority` to be required\n* Add support for `buyer_id` on `Charge.payment_method_details.bizum`, `ConfirmationToken.payment_method_preview.bizum`, `ConfirmationToken.payment_method_preview.blik`, `PaymentAttemptRecord.payment_method_details.bizum`, `PaymentMethod.bizum`, `PaymentMethod.blik`, and `PaymentRecord.payment_method_details.bizum`\n* Add support for `transaction_link_id` on `Charge.payment_method_details.card`\n* \u26a0\ufe0f Add support for new value `sui` on enums `Charge.payment_method_details.crypto.network`, `PaymentAttemptRecord.payment_method_details.crypto.network`, and `PaymentRecord.payment_method_details.crypto.network`\n* \u26a0\ufe0f Add support for new value `usdsui` on enums `Charge.payment_method_details.crypto.token_currency`, `PaymentAttemptRecord.payment_method_details.crypto.token_currency`, and `PaymentRecord.payment_method_details.crypto.token_currency`\n* Add support for `fingerprint` on `Charge.payment_method_details.pix`, `ConfirmationToken.payment_method_preview.pix`, `PaymentMethod.pix`, and `SetupAttempt.payment_method_details.pix`\n* Add support for `sunbit` on `Checkout.Session#create.payment_method_options`, `Checkout.Session.payment_method_options`, `PaymentIntent#confirm.payment_method_options`, `PaymentIntent#create.payment_method_options`, `PaymentIntent#update.payment_method_options`, and `PaymentIntent.payment_method_options`\n* Add support for `billing_cycle_anchor_config` on `Checkout.Session#create.subscription_data`\n* Add support for `wechat_pay` on `Checkout.Session.payment_method_options`\n* Add support for `mastercard_compliance` on `Dispute#update.evidence.enhanced_evidence`, `Dispute.evidence.enhanced_evidence`, and `Dispute.evidence_details.enhanced_eligibility`\n* \u26a0\ufe0f Add support for new value `mastercard_compliance` on enum `Dispute.enhanced_eligibility_types`\n* Add support for new values `billing.credit_balance_transaction.created`, `billing.credit_grant.updated`, `billing.meter.created`, `billing.meter.deactivated`, `billing.meter.reactivated`, and `billing.meter.updated` on enum `Event.type`\n* Add support for `status_details` on `FinancialConnections.Account`\n* \u26a0\ufe0f Add support for new value `validated` on enum `Identity.VerificationSession.redaction.status`\n* Add support for new value `satispay` on enums `Invoice#create.payment_settings.payment_method_types`, `Invoice#update.payment_settings.payment_method_types`, `Subscription#create.payment_settings.payment_method_types`, and `Subscription#update.payment_settings.payment_method_types`\n* \u26a0\ufe0f Add support for new value `satispay` on enums `Invoice.payment_settings.payment_method_types` and `Subscription.payment_settings.payment_method_types`\n* \u26a0\ufe0f Remove support for `stored_credential_usage` on `PaymentAttemptRecord.payment_method_details.card` and `PaymentRecord.payment_method_details.card`\n* \u26a0\ufe0f Change `PaymentAttemptRecord.payment_method_details.card.description` and `PaymentRecord.payment_method_details.card.description` to be optional\n* \u26a0\ufe0f Change `PaymentAttemptRecord.payment_method_details.card.iin` and `PaymentRecord.payment_method_details.card.iin` to be optional\n* \u26a0\ufe0f Change `PaymentAttemptRecord.payment_method_details.card.issuer` and `PaymentRecord.payment_method_details.card.issuer` to be optional\n* Add support for `setup_future_usage` on `PaymentIntent#confirm.payment_method_options.satispay`, `PaymentIntent#create.payment_method_options.satispay`, `PaymentIntent#update.payment_method_options.satispay`, and `PaymentIntent.payment_method_options.satispay`\n* Change `PaymentRecord#report_refund.refunded` to be optional\n* Add support for `satispay` on `SetupAttempt.payment_method_details`\n* Add support for `custom_fields`, `description`, and `footer` on `Subscription#create.invoice_settings`, `Subscription#update.invoice_settings`, and `Subscription.invoice_settings`\n* Add support for `payment_method_options` and `payment_method` on `Topup#create`\n* Add support for new values `billing.credit_balance_transaction.created`, `billing.credit_grant.updated`, `billing.meter.created`, `billing.meter.deactivated`, `billing.meter.reactivated`, and `billing.meter.updated` on enums `WebhookEndpoint#create.enabled_events` and `WebhookEndpoint#update.enabled_events`\n* Add support for new value `2026-06-24.dahlia` on enum `WebhookEndpoint#create.api_version`\n* Add support for error codes `anomalous_money_movement_request`, `failed_tax_calculation`, `financial_account_balance_does_not_support_currency`, `financial_account_capability_not_enabled`, and `financial_account_capability_restricted` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, `StripeError`, and `Terminal.Reader.action.api_error`\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-06-24.dahlia |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-06-24.preview |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-06-24.preview |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2324", + "name": "v2324", + "prerelease": false, + "published_at": "2026-06-23T22:42:44Z", + "tag_name": "v2324" + }, + { + "body": "\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-05-27.dahlia |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-05-27.preview |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-06-24.preview |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2323", + "name": "v2323", + "prerelease": false, + "published_at": "2026-06-22T19:24:39Z", + "tag_name": "v2323" + }, + { + "body": "* Change type of `SubscriptionItem.billed_until` from `nullable(DateTime)` to `DateTime`\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-05-27.dahlia |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-05-27.preview |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-04-22.preview |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2276", + "name": "v2276", + "prerelease": false, + "published_at": "2026-05-23T12:43:49Z", + "tag_name": "v2276" + }, + { + "body": "* Add support for `bizum_payments` and `scalapay_payments` on `Account#create.capabilities`, `Account#update.capabilities`, and `Account.capabilities`\n* Add support for `automatic_transfer_rules_by_currency` on `BalanceSettings#update.payments.payouts` and `BalanceSettings.payments.payouts`\n* Add support for `start_of_day` on `BalanceSettings#update.payments.settlement_timing` and `BalanceSettings.payments.settlement_timing`\n* Add support for `description` on `Charge#create.transfer_data`, `PaymentIntent#create.transfer_data`, `PaymentIntent#update.transfer_data`, and `PaymentIntent.transfer_data`\n* Add support for `bizum` on `Charge.payment_method_details`, `ConfirmationToken.payment_method_preview`, `ConfirmationToken.testHelpers#create.payment_method_data`, `PaymentAttemptRecord.payment_method_details`, `PaymentIntent#confirm.payment_method_data`, `PaymentIntent#confirm.payment_method_options`, `PaymentIntent#create.payment_method_data`, `PaymentIntent#create.payment_method_options`, `PaymentIntent#update.payment_method_data`, `PaymentIntent#update.payment_method_options`, `PaymentIntent.payment_method_options`, `PaymentMethod#create`, `PaymentMethodConfiguration#create`, `PaymentMethodConfiguration#update`, `PaymentMethodConfiguration`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `SetupIntent#confirm.payment_method_data`, `SetupIntent#confirm.payment_method_options`, `SetupIntent#create.payment_method_data`, `SetupIntent#create.payment_method_options`, `SetupIntent#update.payment_method_data`, `SetupIntent#update.payment_method_options`, and `SetupIntent.payment_method_options`\n* Add support for `scalapay` on `Charge.payment_method_details`, `Checkout.Session#create.payment_method_options`, `Checkout.Session.payment_method_options`, `ConfirmationToken.payment_method_preview`, `ConfirmationToken.testHelpers#create.payment_method_data`, `PaymentAttemptRecord.payment_method_details`, `PaymentIntent#confirm.payment_method_data`, `PaymentIntent#confirm.payment_method_options`, `PaymentIntent#create.payment_method_data`, `PaymentIntent#create.payment_method_options`, `PaymentIntent#update.payment_method_data`, `PaymentIntent#update.payment_method_options`, `PaymentIntent.payment_method_options`, `PaymentMethod#create`, `PaymentMethodConfiguration#create`, `PaymentMethodConfiguration#update`, `PaymentMethodConfiguration`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `Refund.destination_details`, `SetupIntent#confirm.payment_method_data`, `SetupIntent#create.payment_method_data`, and `SetupIntent#update.payment_method_data`\n* Add support for `mandate` on `Charge.payment_method_details.twint`, `PaymentAttemptRecord.payment_method_details.twint`, and `PaymentRecord.payment_method_details.twint`\n* Add support for new values `bizum` and `scalapay` on enums `Checkout.Session#create.excluded_payment_method_types`, `PaymentIntent#confirm.excluded_payment_method_types`, `PaymentIntent#create.excluded_payment_method_types`, `PaymentIntent#update.excluded_payment_method_types`, `SetupIntent#create.excluded_payment_method_types`, and `SetupIntent#update.excluded_payment_method_types`\n* Change type of `Checkout.Session#create.payment_method_options.twint.setup_future_usage`, `PaymentIntent#confirm.payment_method_options.twint.setup_future_usage`, `PaymentIntent#create.payment_method_options.twint.setup_future_usage`, and `PaymentIntent#update.payment_method_options.twint.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')`\n* Add support for new values `bizum` and `scalapay` on enum `Checkout.Session#create.payment_method_types`\n* \u26a0\ufe0f Change type of `Checkout.Session.payment_method_options.twint.setup_future_usage` and `PaymentIntent.payment_method_options.twint.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')`\n* Add support for new values `bizum` and `scalapay` on enums `ConfirmationToken.testHelpers#create.payment_method_data.type`, `PaymentIntent#confirm.payment_method_data.type`, `PaymentIntent#create.payment_method_data.type`, `PaymentIntent#update.payment_method_data.type`, `SetupIntent#confirm.payment_method_data.type`, `SetupIntent#create.payment_method_data.type`, and `SetupIntent#update.payment_method_data.type`\n* \u26a0\ufe0f Add support for new values `bizum` and `scalapay` on enums `ConfirmationToken.payment_method_preview.type` and `PaymentMethod.type`\n* Add support for new values `bizum` and `scalapay` on enums `Customer#list_payment_methods.type`, `PaymentMethod#create.type`, and `PaymentMethod#list.type`\n* Add support for `credited_items` on `InvoiceItem.proration_details`\n* Add support for new value `twint` on enums `Invoice#create.payment_settings.payment_method_types`, `Invoice#update.payment_settings.payment_method_types`, `Subscription#create.payment_settings.payment_method_types`, and `Subscription#update.payment_settings.payment_method_types`\n* Add support for `discountable` on `Invoice#create_preview.schedule_details.phases[].add_invoice_items[]`, `Subscription#create.add_invoice_items[]`, `Subscription#update.add_invoice_items[]`, `SubscriptionSchedule#create.phases[].add_invoice_items[]`, `SubscriptionSchedule#update.phases[].add_invoice_items[]`, and `SubscriptionSchedule.phases[].add_invoice_items[]`\n* Add support for `billing_schedules` on `Invoice#create_preview.subscription_details`, `Subscription#create`, `Subscription#update`, and `Subscription`\n* Add support for new value `max_billed_until` on enums `Invoice#create_preview.subscription_details.cancel_at`, `Subscription#create.cancel_at`, and `Subscription#update.cancel_at`\n* Add support for `amount_paid_off_stripe` on `Invoice`\n* \u26a0\ufe0f Add support for new value `twint` on enums `Invoice.payment_settings.payment_method_types` and `Subscription.payment_settings.payment_method_types`\n* Add support for `twint` on `Mandate.payment_method_details` and `SetupAttempt.payment_method_details`\n* Add support for `metadata` on `PaymentIntent#create.transfer_data`, `PaymentIntent#update.transfer_data`, `PaymentIntent.transfer_data`, and `Subscription.pending_update`\n* Add support for `payment_data` on `PaymentIntent#create.transfer_data`, `PaymentIntent#update.transfer_data`, and `PaymentIntent.transfer_data`\n* \u26a0\ufe0f Add support for new values `bizum` and `scalapay` on enums `PaymentIntent.excluded_payment_method_types` and `SetupIntent.excluded_payment_method_types`\n* Add support for `blik_authorize` on `PaymentIntent.next_action` and `SetupIntent.next_action`\n* Add support for `payment_method_options` on `PaymentLink#create`, `PaymentLink#update`, and `PaymentLink`\n* Add support for new value `bizum` on enums `PaymentLink#create.payment_method_types` and `PaymentLink#update.payment_method_types`\n* \u26a0\ufe0f Add support for new value `bizum` on enum `PaymentLink.payment_method_types`\n* Add support for `active` on `PaymentMethodConfiguration#list`\n* Add support for `billed_until` on `SubscriptionItem`\n* Add support for `discount` and `discounts` on `Subscription.pending_update`\n* Add support for `verifone_m425`, `verifone_p630`, `verifone_ux700`, and `verifone_v660p` on `Terminal.Configuration#create`, `Terminal.Configuration#update`, and `Terminal.Configuration`\n* Add support for new values `simulated_verifone_m425`, `simulated_verifone_p630`, `simulated_verifone_ux700`, `simulated_verifone_v660p`, `verifone_m425`, `verifone_p630`, `verifone_ux700`, and `verifone_v660p` on enum `Terminal.Reader#list.device_type`\n* Add support for `api_error` and `print_content` on `Terminal.Reader.action`\n* \u26a0\ufe0f Add support for new value `print_content` on enum `Terminal.Reader.action.type`\n* \u26a0\ufe0f Add support for new values `simulated_verifone_m425`, `simulated_verifone_p630`, `simulated_verifone_ux700`, `simulated_verifone_v660p`, `verifone_m425`, `verifone_p630`, `verifone_ux700`, and `verifone_v660p` on enum `Terminal.Reader.device_type`\n* Add support for `customer` on `TestHelpers.TestClock#create`\n* Add support for new value `2026-05-27.dahlia` on enum `WebhookEndpoint#create.api_version`\n* Add support for error codes `payment_method_microdeposit_processing_error` and `siret_invalid` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError`\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-04-22.dahlia |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-04-22.preview |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-04-22.preview |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2275", + "name": "v2275", + "prerelease": false, + "published_at": "2026-05-23T12:01:37Z", + "tag_name": "v2275" + }, + { + "body": "* Add support for `balance_report` and `payout_reconciliation_report` on `AccountSession#create.components` and `AccountSession.components`\n* Add support for `app_distribution` and `sunbit_payments` on `Account#create.capabilities`, `Account#update.capabilities`, and `Account.capabilities`\n* \u26a0\ufe0f Add support for new values `fee_credit_funding`, `inbound_transfer_reversal`, and `inbound_transfer` on enum `BalanceTransaction.type`\n* Add support for `sunbit` on `Charge.payment_method_details`, `ConfirmationToken.payment_method_preview`, `ConfirmationToken.testHelpers#create.payment_method_data`, `PaymentAttemptRecord.payment_method_details`, `PaymentIntent#confirm.payment_method_data`, `PaymentIntent#create.payment_method_data`, `PaymentIntent#update.payment_method_data`, `PaymentMethod#create`, `PaymentMethodConfiguration#create`, `PaymentMethodConfiguration#update`, `PaymentMethodConfiguration`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `SetupIntent#confirm.payment_method_data`, `SetupIntent#create.payment_method_data`, and `SetupIntent#update.payment_method_data`\n* \u26a0\ufe0f Add support for new values `phantom_cash` and `usdt` on enums `Charge.payment_method_details.crypto.token_currency`, `PaymentAttemptRecord.payment_method_details.crypto.token_currency`, and `PaymentRecord.payment_method_details.crypto.token_currency`\n* Add support for `location` and `reader` on `Charge.payment_method_details.klarna`, `PaymentAttemptRecord.payment_method_details.klarna`, and `PaymentRecord.payment_method_details.klarna`\n* Add support for `mandate` on `Charge.payment_method_details.pix`, `PaymentAttemptRecord.payment_method_details.pix`, and `PaymentRecord.payment_method_details.pix`\n* Add support for `managed_payments` on `Checkout.Session#create`, `Checkout.Session`, `PaymentIntent`, `PaymentLink#create`, `PaymentLink`, `SetupIntent`, and `Subscription`\n* \u26a0\ufe0f Add support for new value `sunbit` on enums `Checkout.Session#create.excluded_payment_method_types`, `PaymentIntent#confirm.excluded_payment_method_types`, `PaymentIntent#create.excluded_payment_method_types`, `PaymentIntent#update.excluded_payment_method_types`, `PaymentIntent.excluded_payment_method_types`, `SetupIntent#create.excluded_payment_method_types`, `SetupIntent#update.excluded_payment_method_types`, and `SetupIntent.excluded_payment_method_types`\n* Add support for `mandate_options` on `Checkout.Session#create.payment_method_options.pix`, `Checkout.Session.payment_method_options.pix`, `PaymentIntent#confirm.payment_method_options.pix`, `PaymentIntent#create.payment_method_options.pix`, `PaymentIntent#update.payment_method_options.pix`, and `PaymentIntent.payment_method_options.pix`\n* \u26a0\ufe0f Change type of `Checkout.Session#create.payment_method_options.pix.setup_future_usage`, `Checkout.Session.payment_method_options.pix.setup_future_usage`, `PaymentIntent#confirm.payment_method_options.pix.setup_future_usage`, `PaymentIntent#create.payment_method_options.pix.setup_future_usage`, `PaymentIntent#update.payment_method_options.pix.setup_future_usage`, and `PaymentIntent.payment_method_options.pix.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')`\n* Add support for new value `sunbit` on enum `Checkout.Session#create.payment_method_types`\n* \u26a0\ufe0f Add support for new values `fo_vat`, `gi_tin`, `it_cf`, and `py_ruc` on enums `Checkout.Session.customer_details.tax_ids[].type`, `Invoice.customer_tax_ids[].type`, `Tax.Calculation.customer_details.tax_ids[].type`, `Tax.Transaction.customer_details.tax_ids[].type`, and `TaxId.type`\n* Add support for new value `sunbit` on enums `ConfirmationToken.testHelpers#create.payment_method_data.type`, `PaymentIntent#confirm.payment_method_data.type`, `PaymentIntent#create.payment_method_data.type`, `PaymentIntent#update.payment_method_data.type`, `SetupIntent#confirm.payment_method_data.type`, `SetupIntent#create.payment_method_data.type`, and `SetupIntent#update.payment_method_data.type`\n* \u26a0\ufe0f Add support for new value `sunbit` on enums `ConfirmationToken.payment_method_preview.type` and `PaymentMethod.type`\n* \u26a0\ufe0f Change type of `CreditNote.total_taxes[].tax_rate_details.tax_rate`, `CreditNoteLineItem.taxes[].tax_rate_details.tax_rate`, `Invoice.total_taxes[].tax_rate_details.tax_rate`, and `InvoiceLineItem.taxes[].tax_rate_details.tax_rate` from `string` to `expandable($TaxRate)`\n* Add support for new values `fo_vat`, `gi_tin`, `it_cf`, and `py_ruc` on enums `Customer#create.tax_id_data[].type`, `Invoice#create_preview.customer_details.tax_ids[].type`, `Tax.Calculation#create.customer_details.tax_ids[].type`, and `TaxId#create.type`\n* Add support for new value `sunbit` on enums `Customer#list_payment_methods.type`, `PaymentMethod#create.type`, and `PaymentMethod#list.type`\n* Add support for `pix` on `Invoice#create.payment_settings.payment_method_options`, `Invoice#update.payment_settings.payment_method_options`, `Invoice.payment_settings.payment_method_options`, `Mandate.payment_method_details`, `SetupAttempt.payment_method_details`, `SetupIntent#confirm.payment_method_options`, `SetupIntent#create.payment_method_options`, `SetupIntent#update.payment_method_options`, `SetupIntent.payment_method_options`, `Subscription#create.payment_settings.payment_method_options`, `Subscription#update.payment_settings.payment_method_options`, and `Subscription.payment_settings.payment_method_options`\n* Add support for `upi` on `Invoice#create.payment_settings.payment_method_options`, `Invoice#update.payment_settings.payment_method_options`, `Invoice.payment_settings.payment_method_options`, `Subscription#create.payment_settings.payment_method_options`, `Subscription#update.payment_settings.payment_method_options`, and `Subscription.payment_settings.payment_method_options`\n* \u26a0\ufe0f Add support for new values `pix` and `upi` on enums `Invoice#create.payment_settings.payment_method_types`, `Invoice#update.payment_settings.payment_method_types`, `Invoice.payment_settings.payment_method_types`, `Subscription#create.payment_settings.payment_method_types`, `Subscription#update.payment_settings.payment_method_types`, and `Subscription.payment_settings.payment_method_types`\n* Add support for `card_presence` on `Issuing.Authorization`\n* Add support for `allowed_card_presences` and `blocked_card_presences` on `Issuing.Card#create.spending_controls`, `Issuing.Card#update.spending_controls`, `Issuing.Card.spending_controls`, `Issuing.Cardholder#create.spending_controls`, `Issuing.Cardholder#update.spending_controls`, and `Issuing.Cardholder.spending_controls`\n* \u26a0\ufe0f Add support for new value `fulfillment_error` on enum `Issuing.Card.cancellation_reason`\n* \u26a0\ufe0f Add support for new value `fulfillment_error` on enum `Issuing.Card.replacement_reason`\n* Add support for `amount` and `currency` on `Mandate.multi_use`\n* \u26a0\ufe0f Change type of `PaymentAttemptRecord.payment_method_details.alma.installments.count` and `PaymentRecord.payment_method_details.alma.installments.count` from `longInteger` to `nullable(longInteger)`\n* Add support for `amount_to_confirm` on `PaymentIntent#confirm`\n* Add support for `klarna_display_qr_code` on `PaymentIntent.next_action`\n* \u26a0\ufe0f Add support for new value `sunbit` on enums `PaymentLink#create.payment_method_types`, `PaymentLink#update.payment_method_types`, and `PaymentLink.payment_method_types`\n* \u26a0\ufe0f Add support for new values `low`, `not_assessed`, and `unknown` on enum `Radar.PaymentEvaluation.signals.fraudulent_payment.risk_level`\n* \u26a0\ufe0f Add support for new value `account` on enums `Radar.ValueList#create.item_type` and `Radar.ValueList.item_type`\n* Add support for `moto` on `SetupAttempt.payment_method_details.card`\n* Add support for `pix_display_qr_code` on `SetupIntent.next_action`\n* Add support for new value `2026-04-22.dahlia` on enum `WebhookEndpoint#create.api_version`\n* Add support for error codes `action_blocked` and `approval_required` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError`\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-04-22.dahlia |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-04-22.preview |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-04-08.preview |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2249", + "name": "v2249", + "prerelease": false, + "published_at": "2026-04-20T18:32:43Z", + "tag_name": "v2249" + }, + { + "body": "\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-03-25.dahlia |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-03-25.preview |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-04-08.preview |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2248", + "name": "v2248", + "prerelease": false, + "published_at": "2026-04-17T22:25:23Z", + "tag_name": "v2248" + }, + { + "body": "* Add support for `upi_payments` on `Account#create.capabilities`, `Account#update.capabilities`, and `Account.capabilities`\n* Add support for `upi` on `Charge.payment_method_details`, `Checkout.Session#create.payment_method_options`, `Checkout.Session.payment_method_options`, `ConfirmationToken.payment_method_preview`, `ConfirmationToken.testHelpers#create.payment_method_data`, `Mandate.payment_method_details`, `PaymentAttemptRecord.payment_method_details`, `PaymentIntent#confirm.payment_method_data`, `PaymentIntent#confirm.payment_method_options`, `PaymentIntent#create.payment_method_data`, `PaymentIntent#create.payment_method_options`, `PaymentIntent#update.payment_method_data`, `PaymentIntent#update.payment_method_options`, `PaymentIntent.payment_method_options`, `PaymentMethod#create`, `PaymentMethodConfiguration#create`, `PaymentMethodConfiguration#update`, `PaymentMethodConfiguration`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `SetupAttempt.payment_method_details`, `SetupIntent#confirm.payment_method_data`, `SetupIntent#confirm.payment_method_options`, `SetupIntent#create.payment_method_data`, `SetupIntent#create.payment_method_options`, `SetupIntent#update.payment_method_data`, `SetupIntent#update.payment_method_options`, and `SetupIntent.payment_method_options`\n* 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`\n* Add support for `integration_identifier` on `Checkout.Session#create` and `Checkout.Session`\n* Add support for new value `upi` on enums `Checkout.Session#create.excluded_payment_method_types`, `PaymentIntent#confirm.excluded_payment_method_types`, `PaymentIntent#create.excluded_payment_method_types`, `PaymentIntent#update.excluded_payment_method_types`, `PaymentIntent.excluded_payment_method_types`, `SetupIntent#create.excluded_payment_method_types`, `SetupIntent#update.excluded_payment_method_types`, and `SetupIntent.excluded_payment_method_types`\n* Add support for `crypto` on `Checkout.Session#create.payment_method_options`\n* Add support for new value `upi` on enum `Checkout.Session#create.payment_method_types`\n* Add support for `pending_invoice_item_interval` on `Checkout.Session#create.subscription_data`\n* Add support for new values `elements`, `embedded_page`, `form`, and `hosted_page` on enums `Checkout.Session#create.ui_mode` and `Checkout.Session.ui_mode`\n* Add support for new value `marine_carbon_removal` on enum `Climate.Supplier.removal_pathway`\n* Add support for new value `upi` on enums `ConfirmationToken.testHelpers#create.payment_method_data.type`, `PaymentIntent#confirm.payment_method_data.type`, `PaymentIntent#create.payment_method_data.type`, `PaymentIntent#update.payment_method_data.type`, `SetupIntent#confirm.payment_method_data.type`, `SetupIntent#create.payment_method_data.type`, and `SetupIntent#update.payment_method_data.type`\n* Add support for new value `upi` on enums `ConfirmationToken.payment_method_preview.type` and `PaymentMethod.type`\n* Add support for `metadata` on `CreditNote#create.lines[]`, `CreditNote#preview.lines[]`, `CreditNote#preview_lines.lines[]`, and `CreditNoteLineItem`\n* Add support for new value `upi` on enums `Customer#list_payment_methods.type`, `PaymentMethod#create.type`, and `PaymentMethod#list.type`\n* Add support for `quantity_decimal` on `Invoice#add_lines.lines[]`, `Invoice#create_preview.invoice_items[]`, `Invoice#update_lines.lines[]`, `InvoiceItem#create`, `InvoiceItem#update`, `InvoiceItem`, `InvoiceLineItem#update`, and `InvoiceLineItem`\n* \u26a0\ufe0f Add support for `level` on `Issuing.Authorization.testHelpers#create.risk_assessment.card_testing_risk` and `Issuing.Authorization.testHelpers#create.risk_assessment.merchant_dispute_risk`\n* \u26a0\ufe0f Remove support for `risk_level` on `Issuing.Authorization.testHelpers#create.risk_assessment.card_testing_risk` and `Issuing.Authorization.testHelpers#create.risk_assessment.merchant_dispute_risk`\n* Add support for `lifecycle_controls` on `Issuing.Card#create` and `Issuing.Card`\n* \u26a0\ufe0f Change type of `Issuing.Token.network_data.visa.card_reference_id` from `string` to `nullable(string)`\n* \u26a0\ufe0f Change type of `PaymentAttemptRecord.payment_method_details.card.brand` and `PaymentRecord.payment_method_details.card.brand` from `enum` to `nullable(enum)`\n* \u26a0\ufe0f Change type of `PaymentAttemptRecord.payment_method_details.card.exp_month` and `PaymentRecord.payment_method_details.card.exp_month` from `longInteger` to `nullable(longInteger)`\n* \u26a0\ufe0f Change type of `PaymentAttemptRecord.payment_method_details.card.exp_year` and `PaymentRecord.payment_method_details.card.exp_year` from `longInteger` to `nullable(longInteger)`\n* \u26a0\ufe0f Change type of `PaymentAttemptRecord.payment_method_details.card.funding` and `PaymentRecord.payment_method_details.card.funding` from `enum('credit'|'debit'|'prepaid'|'unknown')` to `nullable(enum('credit'|'debit'|'prepaid'|'unknown'))`\n* \u26a0\ufe0f Change type of `PaymentAttemptRecord.payment_method_details.card.last4` and `PaymentRecord.payment_method_details.card.last4` from `string` to `nullable(string)`\n* \u26a0\ufe0f Change type of `PaymentAttemptRecord.payment_method_details.card.moto` and `PaymentRecord.payment_method_details.card.moto` from `boolean` to `nullable(boolean)`\n* 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`\n* Add support for `upi_handle_redirect_or_display_qr_code` on `PaymentIntent.next_action` and `SetupIntent.next_action`\n* Add support for new value `upi` on enums `PaymentLink#create.payment_method_types`, `PaymentLink#update.payment_method_types`, and `PaymentLink.payment_method_types`\n* Add support for `recommended_action` and `signals` on `Radar.PaymentEvaluation`\n* \u26a0\ufe0f Remove support for `insights` on `Radar.PaymentEvaluation`\n* Add support for new value `crypto_fingerprint` on enums `Radar.ValueList#create.item_type` and `Radar.ValueList.item_type`\n* Add support for new value `canceled_by_retention_policy` on enum `Subscription.cancellation_details.reason`\n* Add support for new value `2026-03-25.dahlia` on enum `WebhookEndpoint#create.api_version`\n* 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`\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-03-25.dahlia |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-03-25.preview; embedded_connect_beta=v2; server_side_confirmation_beta=v1; orders_beta=v4; unified_accounts_beta=v1; terminal_collect_inputs_beta=v2; terminal_collect_confirm_beta=v1; retrieve_tax_forms_beta=v1; checkout_server_update_beta=v1; payment_records_beta=v2; financial_connections_transactions_beta=v1; invoice_partial_payments_beta=v3; invoice_payment_plans_beta=v1; payment_intent_with_tax_api_beta=v1; custom_checkout_beta=v2; id_bank_transfer_beta=v2; fx_quote_preview=v1 |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-03-04.preview; embedded_connect_beta=v2; server_side_confirmation_beta=v1; orders_beta=v4; unified_accounts_beta=v1; terminal_collect_inputs_beta=v2; terminal_collect_confirm_beta=v1; retrieve_tax_forms_beta=v1; checkout_server_update_beta=v1; payment_records_beta=v2; financial_connections_transactions_beta=v1; invoice_partial_payments_beta=v3; invoice_payment_plans_beta=v1; payment_intent_with_tax_api_beta=v1; custom_checkout_beta=v2; id_bank_transfer_beta=v2; fx_quote_preview=v1 |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2204", + "name": "v2204", + "prerelease": false, + "published_at": "2026-03-17T22:44:06Z", + "tag_name": "v2204" + }, + { + "body": "\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-02-25.clover |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-02-25.preview; embedded_connect_beta=v2; server_side_confirmation_beta=v1; orders_beta=v4; unified_accounts_beta=v1; terminal_collect_inputs_beta=v2; terminal_collect_confirm_beta=v1; retrieve_tax_forms_beta=v1; checkout_server_update_beta=v1; payment_records_beta=v2; financial_connections_transactions_beta=v1; invoice_partial_payments_beta=v3; invoice_payment_plans_beta=v1; payment_intent_with_tax_api_beta=v1; custom_checkout_beta=v2; id_bank_transfer_beta=v2; fx_quote_preview=v1 |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-03-04.preview; embedded_connect_beta=v2; server_side_confirmation_beta=v1; orders_beta=v4; unified_accounts_beta=v1; terminal_collect_inputs_beta=v2; terminal_collect_confirm_beta=v1; retrieve_tax_forms_beta=v1; checkout_server_update_beta=v1; payment_records_beta=v2; financial_connections_transactions_beta=v1; invoice_partial_payments_beta=v3; invoice_payment_plans_beta=v1; payment_intent_with_tax_api_beta=v1; custom_checkout_beta=v2; id_bank_transfer_beta=v2; fx_quote_preview=v1 |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2203", + "name": "v2203", + "prerelease": false, + "published_at": "2026-03-16T23:47:57Z", + "tag_name": "v2203" + }, + { + "body": "\n\n## OpenAPI spec versions\n\n| Spec | info.version |\n|------|--------------|\n| openapi/spec3.sdk.{json,yaml} | 2026-02-25.clover |\n| openapi/spec3.beta.sdk.{json,yaml} | 2026-02-25.preview; embedded_connect_beta=v2; server_side_confirmation_beta=v1; orders_beta=v4; unified_accounts_beta=v1; terminal_collect_inputs_beta=v2; terminal_collect_confirm_beta=v1; retrieve_tax_forms_beta=v1; checkout_server_update_beta=v1; payment_records_beta=v2; financial_connections_transactions_beta=v1; invoice_partial_payments_beta=v3; invoice_payment_plans_beta=v1; payment_intent_with_tax_api_beta=v1; custom_checkout_beta=v2; id_bank_transfer_beta=v2; fx_quote_preview=v1 |\n| openapi/spec3.private_preview.sdk.{json,yaml} | 2026-03-04.preview; embedded_connect_beta=v2; server_side_confirmation_beta=v1; orders_beta=v4; unified_accounts_beta=v1; terminal_collect_inputs_beta=v2; terminal_collect_confirm_beta=v1; retrieve_tax_forms_beta=v1; checkout_server_update_beta=v1; payment_records_beta=v2; financial_connections_transactions_beta=v1; invoice_partial_payments_beta=v3; invoice_payment_plans_beta=v1; payment_intent_with_tax_api_beta=v1; custom_checkout_beta=v2; id_bank_transfer_beta=v2; fx_quote_preview=v1 |\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2191", + "name": "v2191", + "prerelease": false, + "published_at": "2026-03-11T16:10:59Z", + "tag_name": "v2191" + }, + { + "body": "\n", + "draft": false, + "html_url": "https://github.com/stripe/openapi/releases/tag/v2190", + "name": "v2190", + "prerelease": false, + "published_at": "2026-03-10T00:11:58Z", + "tag_name": "v2190" + } +] \ No newline at end of file diff --git a/plugins/openapi/adapter/versions.go b/plugins/openapi/adapter/versions.go index 966b34e..f8f90b1 100644 --- a/plugins/openapi/adapter/versions.go +++ b/plugins/openapi/adapter/versions.go @@ -5,6 +5,7 @@ import ( "context" "encoding/json" "fmt" + "regexp" "slices" "strings" "time" @@ -36,11 +37,59 @@ func commits(ctx context.Context, repo, path string) ([]plugin.Version, error) { return Daily(vs), nil } -// Versions are stripe/openapi's releases. +// stripeSDKSpecVersion is the API version a stripe/openapi release's notes +// say its SDK spec carries, the version Stripe's SDKs pin (every release +// since v2191, 2026-03-11, checked 2026-11-20): +// +// | openapi/spec3.sdk.{json,yaml} | 2026-11-18.endive | +var stripeSDKSpecVersion = regexp.MustCompile(`(?m)^\|\s*openapi/spec3\.sdk\.\{json,yaml\}\s*\|\s*(\d{4}-\d{2}-\d{2}(?:\.[a-z]+)?)\s*\|`) + +// Versions are Stripe's API versions ("2026-11-18.endive"), oldest first, as +// stripe/openapi's releases name them in their notes: each is read at the +// newest release that carries it (Ref, URL) and dated by the first +// (Released). A release whose notes name no version (every one before v2191) +// is left out: its version would have to be guessed. func (Stripe) Versions(ctx context.Context) ([]plugin.Version, error) { - return releases(ctx, "stripe/openapi", nil) + rs, err := versions.GitHubPages[stripeRelease](ctx, github.Get, versions.GitHubAPI+"/repos/stripe/openapi/releases") + if err != nil { + return nil, fmt.Errorf("listing stripe/openapi's releases: %w", err) + } + slices.SortStableFunc(rs, func(a, b stripeRelease) int { return a.Published.Compare(b.Published) }) + byID := map[string]*plugin.Version{} + var out []*plugin.Version + for _, r := range rs { + m := stripeSDKSpecVersion.FindStringSubmatch(r.Body) + if r.Draft || r.Prerelease || r.Tag == "" || m == nil { + continue + } + v, ok := byID[m[1]] + if !ok { + v = &plugin.Version{ID: m[1], Released: r.Published} + byID[m[1]], out = v, append(out, v) + } + v.Ref, v.URL = r.Tag, r.URL + } + vs := make([]plugin.Version, len(out)) + for i, v := range out { + vs[i] = *v + } + slices.SortStableFunc(vs, func(a, b plugin.Version) int { return versions.Compare(a.ID, b.ID) }) + return vs, nil } +// stripeRelease is a stripe/openapi release as GitHub's API lists it. +type stripeRelease struct { + Tag string `json:"tag_name"` + Draft bool `json:"draft"` + Prerelease bool `json:"prerelease"` + Published time.Time `json:"published_at"` + URL string `json:"html_url"` + Body string `json:"body"` +} + +// ListsSpecVersions: Stripe's version ids are the specs' info.version. +func (Stripe) ListsSpecVersions() {} + // Versions are datadog-api-client-python's releases. func (Datadog) Versions(ctx context.Context) ([]plugin.Version, error) { return releases(ctx, "DataDog/datadog-api-client-python", nil) @@ -77,14 +126,14 @@ func (PlanetScale) Versions(ctx context.Context) ([]plugin.Version, error) { } var ( - _ Lister = Stripe{} - _ Lister = Datadog{} - _ Lister = Vercel{} - _ Lister = Flagsmith{} - _ Lister = Supabase{} - _ Lister = Neon{} - _ Lister = Convex{} - _ Lister = PlanetScale{} + _ SpecVersioned = Stripe{} + _ Lister = Datadog{} + _ Lister = Vercel{} + _ Lister = Flagsmith{} + _ Lister = Supabase{} + _ Lister = Neon{} + _ Lister = Convex{} + _ Lister = PlanetScale{} ) // Versions are every API version GitHub supports, oldest first: each is a diff --git a/plugins/openapi/adapter/versions_test.go b/plugins/openapi/adapter/versions_test.go index c6be6c3..63aa99b 100644 --- a/plugins/openapi/adapter/versions_test.go +++ b/plugins/openapi/adapter/versions_test.go @@ -8,8 +8,10 @@ import ( "slices" "strings" "testing" + "time" "github.com/patch-it-dev/patch-it-plugins/core/plugin" + "github.com/patch-it-dev/patch-it-plugins/core/versions" ) // recorded serves saved API responses (testdata/versions/, recorded @@ -180,3 +182,26 @@ func TestDailyKeepsEachDaysLastCommit(t *testing.T) { t.Errorf("got %v, want %s", got, want) } } + +// Stripe's versions are its API versions, as each release's notes name +// them: one per version, oldest first, read at the newest release carrying +// it and dated by the first; v2190, whose notes name none, is left out. +func TestStripeListsAPIVersions(t *testing.T) { + srv := recorded(t, map[string]string{"/repos/stripe/openapi/releases?per_page=100&page=1": "stripe-openapi-releases.json"}) + old := versions.GitHubAPI + versions.GitHubAPI = srv.URL + t.Cleanup(func() { versions.GitHubAPI = old }) + vs, err := Stripe{}.Versions(context.Background()) + if err != nil { + t.Fatal(err) + } + want := "2026-02-25.clover@v2203 2026-03-25.dahlia@v2248 2026-04-22.dahlia@v2275 2026-05-27.dahlia@v2323 2026-06-24.dahlia@v2348 " + + "2026-07-29.dahlia@v2441 2026-08-26.dahlia@v2516 2026-09-30.endive@v2592 2026-10-28.endive@v2600 2026-11-18.endive@v2602" + if got := ids(vs); got != want { + t.Fatalf("got %s\nwant %s", got, want) + } + last := vs[len(vs)-1] + if !last.Released.Equal(time.Date(2026, 11, 17, 22, 34, 17, 0, time.UTC)) || last.URL != "https://github.com/stripe/openapi/releases/tag/v2602" { + t.Errorf("newest: released %s (want v2601's date), url %s", last.Released, last.URL) + } +} diff --git a/plugins/openapi/openapi.go b/plugins/openapi/openapi.go index b38d25e..eed033a 100644 --- a/plugins/openapi/openapi.go +++ b/plugins/openapi/openapi.go @@ -270,12 +270,17 @@ func (p Plugin) ListVersions(ctx context.Context, _ plugin.Env) ([]plugin.Versio } // ReadAt fetches the spec at v.Ref. The snapshot's version ID is the version -// the spec itself declares (what events carry), which may differ from the tag. +// the spec itself declares (what events carry), which may differ from the tag; +// for an adapter that lists the specs' own versions (SpecVersioned) it must +// be v's. func (p Plugin) ReadAt(ctx context.Context, _ plugin.Env, v plugin.Version) (plugin.Snapshot, error) { s, err := p.Adapter.Fetch(ctx, v.Ref) if err != nil { return plugin.Snapshot{}, fmt.Errorf("fetching %s %s: %w", p.Adapter.API(), v.Ref, err) } + if _, ok := p.Adapter.(adapter.SpecVersioned); ok && s.Version != v.ID { + return plugin.Snapshot{}, fmt.Errorf("%s %s: the spec at %s declares %s: not published there yet", p.Adapter.API(), v.ID, v.Ref, s.Version) + } v.ID = s.Version return plugin.Snapshot{Version: v, Content: s.Content, SourceURL: s.SourceURL}, nil } diff --git a/plugins/openapi/versions_test.go b/plugins/openapi/versions_test.go index 390de9e..374ef03 100644 --- a/plugins/openapi/versions_test.go +++ b/plugins/openapi/versions_test.go @@ -82,13 +82,14 @@ func TestListVersionsFallsBackToTheNewest(t *testing.T) { } } -// The real adapters list GitHub releases or the commits that changed their -// spec, through core/versions. +// The real adapters list GitHub releases (Stripe: the API versions their +// notes name) or the commits that changed their spec, through core/versions. func TestAdaptersListReleasesAndCommits(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch { case r.URL.Path == "/repos/stripe/openapi/releases": - fmt.Fprint(w, `[{"tag_name":"v2","published_at":"2026-02-01T00:00:00Z"},{"tag_name":"v1","published_at":"2026-01-01T00:00:00Z"}]`) + fmt.Fprint(w, `[{"tag_name":"v2","published_at":"2026-02-01T00:00:00Z","body":"| openapi/spec3.sdk.{json,yaml} | 2026-02-01.b |"},`+ + `{"tag_name":"v1","published_at":"2026-01-01T00:00:00Z","body":"| openapi/spec3.sdk.{json,yaml} | 2026-01-01.a |"}]`) case r.URL.Path == "/repos/supabase/supabase/commits" && r.URL.Query().Get("path") == "apps/docs/spec/api_v1_openapi.json": fmt.Fprint(w, `[{"sha":"b","commit":{"committer":{"date":"2026-02-01T00:00:00Z"}}},{"sha":"a","commit":{"committer":{"date":"2026-01-01T00:00:00Z"}}}]`) default: @@ -116,3 +117,23 @@ func TestAdaptersListReleasesAndCommits(t *testing.T) { } } } + +// specVersioned lists the specs' own versions (as Stripe does). +type specVersioned struct{ fakeAdapter } + +func (specVersioned) Versions(context.Context) ([]plugin.Version, error) { return nil, nil } +func (specVersioned) ListsSpecVersions() {} + +// For an adapter that lists the specs' own versions, a spec that declares +// another version than the one listed (Stripe's GA spec not yet out at the +// newest release carrying the version) is an error, never read as it. +func TestASpecVersionedReadMustDeclareItsVersion(t *testing.T) { + p := Plugin{Adapter: specVersioned{fakeAdapter{specs: specs}}} + s, err := p.ReadAt(context.Background(), plugin.Env{}, plugin.Version{ID: "version-v2", Ref: "v2"}) + if err != nil || s.Version.ID != "version-v2" { + t.Fatalf("%v %v", s.Version, err) + } + if _, err := p.ReadAt(context.Background(), plugin.Env{}, plugin.Version{ID: "version-v3", Ref: "v2"}); err == nil || !strings.Contains(err.Error(), "declares version-v2") { + t.Errorf("err = %v, want one naming what the spec declares", err) + } +} diff --git a/providers/stripe-sdks.md b/providers/stripe-sdks.md index 4909ba5..68fb78c 100644 --- a/providers/stripe-sdks.md +++ b/providers/stripe-sdks.md @@ -33,11 +33,10 @@ A release that changes the API version the SDK pins says so in its section, in t - Reads the release's section only. A bullet counts when it's marked `⚠️` or sits under a breaking or deprecation heading, and its first sentence is a plain template over code spans: `Remove X`, `Remove X from Y`, `Rename X to Y`, `X has been removed`, `Deprecated X in favor of Y`. The pull-request link it starts with is read past. - Drops (and logs) everything else: type changes ("Change type of …"), nullable fields, pinned API versions, dropped language versions, bullets that list names inside prose or parentheses, and "Generated changes from …" roll-ups. -- **What a release pins** (`MapsTo`, `pins.go`): while listing the releases, it reads the changelog at the newest release's tag (or the one before, when that tag isn't pushed yet) and sets each release's `MapsTo` to `stripe/api` at the API version its own section states, in one of the sentences above, exactly as written (`2026-11-18.endive`). A release whose section doesn't say pins nothing here, even though it keeps the release before's; two different versions in one section are none. Older wordings without "pinned" ("Major version release for API version 2022-08-01", "Move to API version …") aren't read. +- **What a release pins** (`MapsTo`, `pins.go`): while listing the releases, it reads the changelog at the newest release's tag (or the one before, when that tag isn't pushed yet) and sets each release's `MapsTo` to `stripe/api` at the API version its own section states (the same id `stripe/api` lists its versions by, `providers/stripe.md`), in one of the sentences above, exactly as written (`2026-11-18.endive`). A release whose section doesn't say pins nothing here, even though it keeps the release before's; two different versions in one section are none. Older wordings without "pinned" ("Major version release for API version 2022-08-01", "Move to API version …") aren't read. ## Known gaps - Stripe's big generated roll-ups ("⚠️ Generated changes from #…") list their removals in nested bullets the reader doesn't open: those releases give no event. - A release whose tag or section is missing is skipped as nothing to read, never guessed. -- `MapsTo` names the API version as Stripe does (`2026-11-18.endive`), which is the `version` the `stripe/api` events carry (the spec's `info.version`). The `stripe/api` source lists its versions by the `stripe/openapi` release tag (`v2602`), so the pin matches its events, not its listed version ids. - Only releases that state their pin have one: most minors and patches don't say, so a release between two pin changes has none. diff --git a/providers/stripe.md b/providers/stripe.md index 2f385a7..97cadb2 100644 --- a/providers/stripe.md +++ b/providers/stripe.md @@ -2,33 +2,35 @@ ## What it watches -Stripe's REST API, release by release: endpoints, parameters, fields, schemas and enum values that are removed, renamed, retyped or added between two versions of Stripe's own OpenAPI spec. Breaking events carry Stripe's own explanation from its API changelog as the migration hint when the changelog has one. +Stripe's REST API, API version by API version (`2026-10-28.endive` → `2026-11-18.endive`): endpoints, parameters, fields, schemas and enum values that are removed, renamed, retyped or added between two versions of Stripe's own OpenAPI spec. Breaking events carry Stripe's own explanation from its API changelog as the migration hint when the changelog has one. Kind: `openapi` (`plugins/openapi`), with `adapter.Stripe` and the changelog hint source in `hint/`. ## Why this source -- **Source:** [github.com/stripe/openapi](https://github.com/stripe/openapi), the file `latest/openapi.spec3.json` pinned to a release tag (`https://raw.githubusercontent.com/stripe/openapi//latest/openapi.spec3.json`); the newest tag from `GET https://api.github.com/repos/stripe/openapi/releases/latest`. Migration hints from [docs.stripe.com/changelog](https://docs.stripe.com/changelog), read as markdown (each page's URL plus `.md`). Checked on 2026-10-13. +- **Source:** [github.com/stripe/openapi](https://github.com/stripe/openapi), the file `latest/openapi.spec3.json` pinned to a release tag (`https://raw.githubusercontent.com/stripe/openapi//latest/openapi.spec3.json`); the API versions from the releases' notes, `GET https://api.github.com/repos/stripe/openapi/releases` (checked 2026-11-20). Migration hints from [docs.stripe.com/changelog](https://docs.stripe.com/changelog), read as markdown (each page's URL plus `.md`). Checked on 2026-10-13. - **Why this one:** it's Stripe's own machine-readable description of the API, maintained by Stripe and published on every release. Two specs can be diffed exactly, with no guessing: a removed field is a removed field. Stripe recommends `latest/openapi.spec3.json` (v1 and v2 endpoints). -- **Alternatives considered:** the API changelog alone (human-written, one entry per change; precise about *why* but not exhaustive at the field level, so it supplies hints, not events); `openapi/spec3.json` (legacy, v1 only; used only for tags older than the `latest/` directory, such as `v207` in 2022); the `*.sdk.*` variants (include internal annotations and pre-release features); `preview/` (public-preview endpoints, not stable). +- **Alternatives considered:** the API changelog alone (human-written, one entry per change; precise about *why* but not exhaustive at the field level, so it supplies hints, not events); `openapi/spec3.json` (legacy, v1 only); the `*.sdk.*` variants (include internal annotations and pre-release features); `preview/` (public-preview endpoints, not stable). - **Quote:** "Removes the `charges` attribute from the `PaymentIntent` object" ([changelog, 2022-11-15](https://docs.stripe.com/changelog/2022-11-15), listed as Breaking). ## How the provider announces changes - Versions are named `YYYY-MM-DD.` (`2026-09-30.endive`). Major releases include backward-incompatible changes; monthly releases only backward-compatible ones. - **Breaking changes are opt-in.** An account has a default API version, and a request can override it with the `Stripe-Version` header; old versions keep working. A breaking change reaches code when someone upgrades the account version or the SDK. Modern SDKs pin the API version they were released with (stripe-node 12+, stripe-python 6+, stripe-ruby 9+, stripe-php 11+; Java, Go and .NET always did). -- The spec repo tags releases (`vNNNN`) several times a day, but most tags don't change the spec: the plugin polls by tag and compares by content hash, so most runs find nothing. -- The event's `version` is the spec's `info.version` (`2026-09-30.endive`). +- The spec repo tags releases (`vNNNN`) several times a day, many per API version. Since v2191 (2026-03-11) each release's notes name the API version its SDK spec carries, in a table: `| openapi/spec3.sdk.{json,yaml} | 2026-11-18.endive |`. That is the version Stripe's SDKs pin ("This release changes the pinned API version to `2026-11-18.endive`"). +- **Versions are API versions.** The listed versions are those named in the notes, oldest first, each read at the newest release that names it and dated by the first one. The SDK changelog sources' `MapsTo` pins (`providers/stripe-sdks.md`) name the same ids, so a feed query on an SDK's versions finds this source's changes between the two API versions. A pair is one API version to the next. The event's `version` and `previous_version` are those ids, which are also the spec's `info.version`. ## What the plugin reads and ignores -- Reads: the whole spec at the newest tag, diffed against the last one it saw (`core/diff/`, `core/normalize/`). `$ref`s are never followed: a change inside a shared schema is reported once, on that schema, not once per endpoint that uses it. +- Reads: the whole spec at each API version's newest release, diffed against the version before's (`core/diff/`, `core/normalize/`). `$ref`s are never followed: a change inside a shared schema is reported once, on that schema, not once per endpoint that uses it. - Hints: for each breaking event, the changelog entry for that version whose "REST API" table names the same parameter and operation; the entry's "What's new" text and link become `migration_hint`. An entry describing an addition never explains a removal, and the reverse. -- Reads a historical pair (a version pair, `v207` → `v208`) and recreates the 2022-11-15 change (38 events, 36 breaking). -- `latest/openapi.spec3.json` can lag a version bump by several tags; the plugin follows the file, not the release notes. +- `latest/openapi.spec3.json` can lag a version bump by several releases (at v2602 the notes name `2026-11-18.endive` while the file still declares `2026-10-28.endive`). A spec that doesn't declare the listed version is an error, never read as that version. When a later release's file catches up, it also names the version in its notes, so the version is read there on a later run. ## Known gaps +- Releases before v2191 (2026-03-11) don't name their API version, so versions older than `2026-02-25.clover` aren't listed: naming them would mean reading every old spec or guessing. +- While a version is the newest, the release it's read at moves as Stripe publishes more of it. The pair into it is compared once, at the release current then. + - Changes the spec doesn't express (behavior changes, webhook payload semantics) are only in the changelog, which isn't read for events. - Enum value removals and some tax-related changes have no parameter row in the changelog, so those events keep the normalizer's one-line hint. - Webhooks use the version set when the endpoint was created; the events don't say which webhook endpoints are affected. From b11817716536adc9ff8c7f8d2463e27c05380b62 Mon Sep 17 00:00:00 2001 From: adssib <75389300+adssib@users.noreply.github.com> Date: Sat, 21 Nov 2026 00:02:35 -0500 Subject: [PATCH 5/5] stripe.md: one known-gaps list; the ga file declares every listed version Co-Authored-By: Claude Opus 5.5 Signed-off-by: adssib <75389300+adssib@users.noreply.github.com> --- providers/stripe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/stripe.md b/providers/stripe.md index 97cadb2..6004544 100644 --- a/providers/stripe.md +++ b/providers/stripe.md @@ -30,7 +30,7 @@ Kind: `openapi` (`plugins/openapi`), with `adapter.Stripe` and the changelog hin - Releases before v2191 (2026-03-11) don't name their API version, so versions older than `2026-02-25.clover` aren't listed: naming them would mean reading every old spec or guessing. - While a version is the newest, the release it's read at moves as Stripe publishes more of it. The pair into it is compared once, at the release current then. - +- If Stripe ever moved its SDK spec on to the next version before `latest/openapi.spec3.json` had declared the current one, that version's release would stop moving and it would fail to read on every run, loudly. It hasn't happened: at each listed version's release (v2203 … v2600) the file declares that version (checked 2026-11-21); v2602 is the lag described above. - Changes the spec doesn't express (behavior changes, webhook payload semantics) are only in the changelog, which isn't read for events. - Enum value removals and some tax-related changes have no parameter row in the changelog, so those events keep the normalizer's one-line hint. - Webhooks use the version set when the endpoint was created; the events don't say which webhook endpoints are affected.