We want to add webhook support for Polar in tern. Polar sends events for sponsorships, payouts, and other platform activities.
Tasks
Webhook Handler
- Implement
/src/platforms/polar.ts.
- Normalize payloads into tern’s event format.
Platform Config
- Add
platformConfigs.polar with supported events (e.g., sponsorships/created, payouts/processed).
Test Cases
- Add JSON fixtures for 3+ events (sponsorship created, payout processed, etc.).
- Write Jest tests in
/tests/polar.test.ts.
Docs
Acceptance Criteria
- Polar handler implemented
- Manual or secret-based webhook verification supported
- Tests with 3+ event types
- Docs updated
Helpful Links: Polar Webhooks Docs
We want to add webhook support for Polar in tern. Polar sends events for sponsorships, payouts, and other platform activities.
Tasks
Webhook Handler
/src/platforms/polar.ts.Platform Config
platformConfigs.polarwith supported events (e.g.,sponsorships/created,payouts/processed).Test Cases
/tests/polar.test.ts.Docs
/docs/platforms.mdwith setup steps.Acceptance Criteria
Helpful Links: Polar Webhooks Docs