Skip to content

docs(stripe): add local setup guide, env comments, feature breakdown,…#161

Merged
lfariabr merged 1 commit intomasterfrom
docs/stripe-setup-154
Mar 13, 2026
Merged

docs(stripe): add local setup guide, env comments, feature breakdown,…#161
lfariabr merged 1 commit intomasterfrom
docs/stripe-setup-154

Conversation

@lfariabr
Copy link
Owner

@lfariabr lfariabr commented Mar 13, 2026

… and release notes (#154)

  • backend/.env.example: annotate all Stripe vars with where to find them, test vs live key prefixes, and phase-2 webhook note
  • README.md: add Stripe Local Setup section (test keys, price IDs, FRONTEND_URL warning, phase-2 webhook deferred rationale)
  • _docs/featureBreakdown/v3.1-stripe-payments.md: add Local Development Setup walkthrough and updated Phase 2 / limitations section with reference to upcoming issue Tracking: add Stripe checkout analytics events #152
  • _docs/releaseNotes/v.3.1.0_Stripe.md: new release note covering full v3.1 scope, env var table, upcoming issues (Tracking: add Stripe checkout analytics events #152, phase 2), and complete files-changed log

Summary by CodeRabbit

  • Documentation
    • Added comprehensive local development setup guides for Stripe payments integration.
    • Included step-by-step instructions for obtaining test API keys and configuring test products.
    • Provided environment variable configuration examples and test card usage guidance.
    • Documented current limitations and upcoming Phase 2 enhancements for payment processing and analytics.

… and release notes (#154)

- backend/.env.example: annotate all Stripe vars with where to find them,
  test vs live key prefixes, and phase-2 webhook note
- README.md: add Stripe Local Setup section (test keys, price IDs,
  FRONTEND_URL warning, phase-2 webhook deferred rationale)
- _docs/featureBreakdown/v3.1-stripe-payments.md: add Local Development
  Setup walkthrough and updated Phase 2 / limitations section with
  reference to upcoming issue #152
- _docs/releaseNotes/v.3.1.0_Stripe.md: new release note covering full
  v3.1 scope, env var table, upcoming issues (#152, phase 2), and
  complete files-changed log
@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

Walkthrough

Documentation and configuration examples for Stripe local development added across README, feature breakdown docs, release notes, and environment configuration. Enables developers to set up Stripe checkout locally with test keys and products. No functional code changes.

Changes

Cohort / File(s) Summary
Documentation Setup Guides
README.md, _docs/featureBreakdown/v3.1-stripe-payments.md
Added comprehensive Stripe local setup sections with step-by-step instructions for test API keys, product creation, environment configuration, and troubleshooting guidance. Updated limitations and phase-2 work references.
Release Notes
_docs/releaseNotes/v.3.1.0_Stripe.md
New release notes document detailing Stripe checkout feature, security considerations, environment variables, implementation scope, and changelog with affected files.
Configuration Examples
backend/.env.example
Added Stripe configuration block with example test keys, explanatory comments, and guidance on required environment variables (FRONTEND_URL, STRIPE_SECRET_KEY, webhook secrets, price IDs).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🎵 Docs so clean, config so tight,
Stripe setup flowing, left to right,
No logic bombs, just guidance pure,
Developer discipline, for sure—
Foundation strong, now ship with might!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly identifies the primary change: adding documentation for Stripe setup, including local setup guides, environment variable comments, and feature breakdown documentation. The title is specific, directly related to the changeset, and accurately represents the main work.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/stripe-setup-154
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@backend/.env.example`:
- Around line 51-54: The .env.example contradicts its own docs by setting
STRIPE_WEBHOOK_SECRET to a placeholder instead of leaving it empty; update the
STRIPE_WEBHOOK_SECRET entry so its default value is blank (e.g.,
STRIPE_WEBHOOK_SECRET=) and keep the existing comment that it’s reserved for
Phase 2, ensuring the example matches the “leave blank locally” guidance for
newcomers and avoids accidental use of a fake secret.
- Line 61: The comment incorrectly suggests Stripe Price IDs use a
price_test_... prefix; update the comment text to state that Price IDs always
start with price_... in both test and live modes and that mode is controlled by
the API key (e.g., use your test secret key sk_test_... for test mode and live
secret key sk_live_... for live mode) and by the object's livemode field;
replace the existing line mentioning price_test_... with this corrected guidance
so developers know to switch API keys rather than look for a different Price ID
format.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c24faf3f-3065-495b-94e4-483b6b0fabea

📥 Commits

Reviewing files that changed from the base of the PR and between d9fd417 and c86c291.

📒 Files selected for processing (4)
  • README.md
  • _docs/featureBreakdown/v3.1-stripe-payments.md
  • _docs/releaseNotes/v.3.1.0_Stripe.md
  • backend/.env.example

Comment on lines +51 to 54
# Stripe webhook signing secret — reserved for Phase 2 (fulfillment).
# NOT required to run the checkout flow today; leave blank locally.
# When you add webhook support: https://dashboard.stripe.com/webhooks → "Add endpoint" → copy signing secret.
STRIPE_WEBHOOK_SECRET=whsec_xxxx
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Docs say “leave blank,” example says “not blank” — pick one and enforce it.

Line 52 says local webhook secret is not required, but Line 54 sets STRIPE_WEBHOOK_SECRET=whsec_xxxx. That contradiction is a setup trap for new devs. Prefer empty default in .env.example.

Suggested fix
-STRIPE_WEBHOOK_SECRET=whsec_xxxx
+STRIPE_WEBHOOK_SECRET=
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@backend/.env.example` around lines 51 - 54, The .env.example contradicts its
own docs by setting STRIPE_WEBHOOK_SECRET to a placeholder instead of leaving it
empty; update the STRIPE_WEBHOOK_SECRET entry so its default value is blank
(e.g., STRIPE_WEBHOOK_SECRET=) and keep the existing comment that it’s reserved
for Phase 2, ensuring the example matches the “leave blank locally” guidance for
newcomers and avoids accidental use of a fake secret.

# 1. Create a product (e.g. "Coffee")
# 2. Add a one-time price (e.g. AUD 5)
# 3. Copy the Price ID (starts with price_)
# Use price_test_... IDs for local/test; price_... IDs for live.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

In Stripe, do Price IDs have different prefixes in test vs live modes (for example price_test_...vsprice_...), or are they always price_...?

💡 Result:

Stripe Price IDs don’t get a special “test” prefix. In both test and live modes they look like price_...; the mode is indicated by the object’s livemode field (and by which API key you use), not by the ID format. [1], [2]

So you won’t see price_test_... (that prefix style is for API keys like sk_test_..., not Price IDs). [2]


Fix the comment: Stripe Price IDs don't have a price_test_... prefix — that's not how they work.

The current guidance is straight-up wrong and will send devs down a rabbit hole. Stripe Price IDs are always price_... in both test and live modes. The mode is determined by the API key you use and the livemode field on the object, not the ID format. The test_ prefix thing? That's only for API keys like sk_test_..., not Price IDs. Update this to something like: "Use your test API key for test mode, live API key for live mode—Price IDs stay price_... either way."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@backend/.env.example` at line 61, The comment incorrectly suggests Stripe
Price IDs use a price_test_... prefix; update the comment text to state that
Price IDs always start with price_... in both test and live modes and that mode
is controlled by the API key (e.g., use your test secret key sk_test_... for
test mode and live secret key sk_live_... for live mode) and by the object's
livemode field; replace the existing line mentioning price_test_... with this
corrected guidance so developers know to switch API keys rather than look for a
different Price ID format.

@lfariabr lfariabr merged commit 7f86a99 into master Mar 13, 2026
8 checks passed
@lfariabr lfariabr deleted the docs/stripe-setup-154 branch March 13, 2026 16:53
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.

1 participant