Skip to content

Commit cb55cc2

Browse files
committed
feat(polar): add Polar payment provider adapter
Full Polar adapter with customer CRUD (metadata-based linking, duplicate email fallback), checkout with pre-filled customer, subscription management (upgrade with invoice proration, downgrade with next_period scheduling, cancel at period end, resume with un-cancel + clear pending changes), webhook handling with Standard Webhooks signature verification and event deduplication, batch product sync with orphan archival and org settings auto-configuration, and customer portal via Polar's session API.
1 parent b949d2b commit cb55cc2

5 files changed

Lines changed: 614 additions & 0 deletions

File tree

packages/polar/package.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "@paykitjs/polar",
3+
"version": "0.0.1",
4+
"description": "Polar provider adapter for PayKit",
5+
"license": "MIT",
6+
"repository": {
7+
"type": "git",
8+
"url": "git+https://github.com/getpaykit/paykit.git"
9+
},
10+
"files": [
11+
"dist"
12+
],
13+
"type": "module",
14+
"exports": {
15+
".": "./src/index.ts"
16+
},
17+
"publishConfig": {
18+
"exports": {
19+
".": {
20+
"types": "./dist/index.d.ts",
21+
"default": "./dist/index.js"
22+
}
23+
},
24+
"main": "./dist/index.js",
25+
"types": "./dist/index.d.ts"
26+
},
27+
"scripts": {
28+
"build": "tsdown --config tsdown.config.ts",
29+
"typecheck": "tsc --build"
30+
},
31+
"dependencies": {
32+
"@polar-sh/sdk": "^0.47.0",
33+
"paykitjs": "workspace:*"
34+
},
35+
"devDependencies": {
36+
"tsdown": "^0.21.1",
37+
"typescript": "^5.9.2",
38+
"vitest": "^4.0.18"
39+
}
40+
}

packages/polar/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { polar } from "./polar-provider";
2+
export type { PolarOptions } from "./polar-provider";

0 commit comments

Comments
 (0)