Skip to content

Add an optional free trial to Pro checkout, off unless STRIPE_TRIAL_DAYS is set - #849

Open
gerardrecinto wants to merge 1 commit into
masterfrom
optional-checkout-trial
Open

gerardrecinto wants to merge 1 commit into
masterfrom
optional-checkout-trial

Conversation

@gerardrecinto

Copy link
Copy Markdown
Collaborator

Adds the trial variant from docs/PRICING_EXPERIMENT.md to checkout. Nothing changes until STRIPE_TRIAL_DAYS is set.

  • STRIPE_TRIAL_DAYS accepts 1 to 90. Unset, 0 or anything else means no trial.
  • When set, a new Pro checkout sends subscription_data[trial_period_days]. Stripe still collects the card and bills it when the trial ends. Enterprise is unchanged.
  • Tests: the request body has no trial by default and trial_period_days=14 when set, and the env parsing covers empty, valid, out of range and non-numeric values. go test ./governance ./tools/httpserver passes locally.

Not done, on purpose: no live Stripe change, no price change, no page copy about a trial. Setting the variable in production, the copy, and whether to lower the $49 price are your call. I did not run a real Stripe checkout, so the Stripe side is unverified.

Left for review, no auto-merge.

Thanks,
Gerard

@gerardrecinto gerardrecinto self-assigned this Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

Gemini PR Review

Reviewed commit: e184195638831bdef3f9e81ece480587992b60fa
Verdict: PASS

  • No actionable findings identified.

@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

Gemini PR Review

Reviewed commit: e184195638831bdef3f9e81ece480587992b60fa
Verdict: PASS

  • No actionable findings.

This branch has not been deployed

No deployments
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