You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
landing: bump pinned Polar API version to 2027-01 before 2026-10 is removed (April 2027) #3555
The landing site's checkout route pins the Polar API version by importing the versioned SDK client (@polar-sh/sdk/2026-10) in landing/src/pages/api/checkout.ts. That import makes the SDK send Polar-Version: 2026-10 on every request. Added in #3554.
Polar supports each API version for about nine months: three as Next, three as Current, three as Deprecated. New versions ship in the first week of January, April, July and October (versioning docs).
2026-10 is Current now. It becomes Deprecated in the first week of January 2027 (when 2027-01 becomes Current).
2026-10 is removed in the first week of April 2027, and requests to a removed version return 404. That would break the pricing page's buy button.
To do (before the April 2027 release)
Read the Polar API changelog for the new version and check for anything that affects POST /v1/checkouts/ (products, success_url).
In landing/src/pages/api/checkout.ts, change the import to @polar-sh/sdk/2027-01 (or the then-current version) and update the comment if needed.
Update the Polar-Version assertion in landing/test/checkout.test.ts.
Make sure @polar-sh/sdk in landing/package.json ships that version subpath (^1.0.2 ships 2026-04, 2026-10 and 2027-01).
Verify on a Vercel preview that /api/checkout?products=<id> redirects to a Polar checkout.
The same bump is needed each quarter or two, so it is worth repeating this check whenever a new Polar API version ships.
Activity