Skip to content

feat: add Polar.sh emulator support#173

Open
codeboost-tr wants to merge 1 commit into
vercel-labs:mainfrom
codeboost-tr:feat/polar-emulator
Open

feat: add Polar.sh emulator support#173
codeboost-tr wants to merge 1 commit into
vercel-labs:mainfrom
codeboost-tr:feat/polar-emulator

Conversation

@codeboost-tr

Copy link
Copy Markdown

This PR adds a new emulator for Polar.sh, including support for organizations, products, prices, checkouts, and subscriptions. Fixes #46.

@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Someone is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@@ -0,0 +1,45 @@
{
"name": "@emulators/polar",
"version": "0.1.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"version": "0.1.0",
"version": "0.6.0",

The @emulators/polar package.json declares version 0.1.0 while the monorepo's canonical version is 0.6.0, causing the CI version-sync check to fail.

Fix on Vercel

Comment on lines +18 to +23
const checkout = polar.checkouts.insert({
polar_id: polarId("ch"),
status: "open",
payment_processor: "stripe",
client_secret: `secret_${polarId("cs")}`,
url: `${baseUrl}/checkout/${polarId("ch")}`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const checkout = polar.checkouts.insert({
polar_id: polarId("ch"),
status: "open",
payment_processor: "stripe",
client_secret: `secret_${polarId("cs")}`,
url: `${baseUrl}/checkout/${polarId("ch")}`,
const checkoutId = polarId("ch");
const checkout = polar.checkouts.insert({
polar_id: checkoutId,
status: "open",
payment_processor: "stripe",
client_secret: `secret_${polarId("cs")}`,
url: `${baseUrl}/checkout/${checkoutId}`,

Checkout url is built with a fresh random id from a second polarId("ch") call, so it never matches the checkout's actual polar_id.

Fix on Vercel

@codeboost-tr

Copy link
Copy Markdown
Author

@ctate — quick nudge: the Vercel deployment check is blocked because the Vercel Labs team hasn't authorized the GitHub app. Could a team member click through https://vercel.com/git/authorize?team=Vercel%20Labs&slug=vercel-labs so the deploy preview can run? The PR itself is small (13 files, polar.sh emulator support) and ready for review once CI can run. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Polar.sh Support

1 participant