docs: Polar integration guide + setup-polar reference + CLI doc-drift fixes - #68
Merged
Conversation
…2 config shape Three runtime-verified fixes: - Config sample showed cookie name "_aff"; the tracker's runtime cookie is affitor_click_id (affiliate-cms/public/js/affitor-tracker.js). - setup-stripe events table said invoice.payment_succeeded; the CLI registers invoice.paid (packages/cli/src/types.ts WEBHOOK_EVENTS). - Config sample showed the legacy v1 shape with an inline api_key; the CLI writes v2 with secrets in .affitor/.env. Also document the real webhook ingest URL (/api/webhook-distributor/stripe). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017mS1Kn4D45SX2wVaVmfwUE
- New api-reference/integrations/polar.mdx — canonical Polar sale path: one-command setup, both attribution carriers (checkout metadata and ?reference_id= checkout links), the generated webhook glue route, camelCase SDK-payload contract note, renewals via billingReason, refunds, verify + common mistakes. - commands.mdx: new `affitor setup polar` section; onboard section now reflects the Polar auto-inject path. - Nav: integrations/polar after stripe. Behavior documented from affiliate-cli feat/polar-setup (runtime-first) + polar.sh/docs verified 2026-07-05. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017mS1Kn4D45SX2wVaVmfwUE
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Docs companion to Affitor/cli#24 (
affitor setup polar+ onboard Polar auto-inject).api-reference/integrations/polar.mdx— canonical Polar sale path: one-command setup, both attribution carriers (server-side checkoutmetadataand?reference_id=checkout links), the generated webhook glue route, the camelCase SDK-payload contract note (readingtotal_amountoff the parsed payload isundefined— the Uat #1 trap), renewals viabillingReason === 'subscription_cycle', refunds, verify + common mistakes. Added to the Integrations nav after Stripe.commands.mdx: newaffitor setup polarsection; onboard section updated for the Polar auto-inject path.commands.mdx:"_aff"→affitor_click_id(the tracker's real cookie,affiliate-cms/public/js/affitor-tracker.js)invoice.payment_succeeded→invoice.paid(what the CLI actually registers,packages/cli/src/types.ts WEBHOOK_EVENTS)api_key→ v2 shape, secrets documented in.affitor/.env; documented the real webhook ingest URL (/api/webhook-distributor/stripe)Verification
npm run buildgreen;/api-reference/integrations/polarpresent in the build output (both/docsand root routes).affiliate-cli@feat/polar-setup+ polar.sh/docs (verified 2026-07-05).Notes
main:origin/uathere is 25 commits behind and recent docs PRs (blog: AI-citability batch — schema, quick answers, tables, shots, crawler tracking #64–blog: growth wave 2 — 4 posts + 90-day strategy #67) all merged tomaindirectly — following live repo convention. Happy to retarget if uat flow is being revived..worktrees/docs-polar) because another session holds the main checkout.🤖 Generated with Claude Code
https://claude.ai/code/session_017mS1Kn4D45SX2wVaVmfwUE