← Back to Pull requests

Sell Uncloud through Stripe Checkout, email the Mac download, and say Mac-only (Windows soon) #151

Closed
unknown closed this pull request without merging on Nov 25, 2026 02:16 UTC
View on GitHub
unknown unknown commented on Nov 25, 2026 00:08 UTC
Author

What changes

Checkout

  • /buy is rewritten in vercel.json to api/checkout.js. It creates a Stripe Checkout Session for STRIPE_PRICE_ID and redirects there with a 303.

  • - Promotion codes are allowed.
    - The session is marked metadata.product = uncloud-home.
    - If settings are missing or Stripe fails, the buyer sees a plain "Checkout isn't available, nothing was charged" page.
  • api/stripe-webhook.js verifies the Stripe-Signature header (HMAC-SHA256, 5-minute tolerance). I checked it against the Stripe SDK's own header generator.

  • - On checkout.session.completed, or async_payment_succeeded for payments that settle later, it emails the buyer both Mac DMG links and a link to /help#set-up, through Mailtrap.
    - It ignores sessions without the uncloud-home mark and sessions that aren't paid yet.
    - If Mailtrap fails it returns 500, so Stripe retries.
  • /thanks is the noindex page Stripe returns buyers to. It tells them to check their email.

  • Both functions are Web handlers, so the webhook can read the raw body. The exported GET and POST read process.env themselves, because Vercel passes a FetchEvent as the second argument. The tests inject their own settings through handle().
  • Site

  • Every "Reserve your spot – $5" button (Buy Me a Coffee) is now "Buy now – $79" and goes to /buy. This covers the homepage, the five acquisition pages (regenerated), the FAQ and the hardware page.

  • The GitHub icon is gone from every page header. The footer link and the help page's DMG links stay.

  • Platforms: the site no longer claims Mac, PC and Linux.

  • - The hero, setup steps and platform lists say Mac, with Windows "coming soon".
    - Every buy note says the same.
    - The FAQ and each comparison page answer "Does Uncloud work on Windows?".
    - Structured data lists only macOS.
    - The social card's platform line is updated.
    - Linux is no longer mentioned.
  • Privacy policy:

  • - It now covers Stripe and the download email.
    - The advertising sentence now refers to buy clicks.
    - The effective date is November 25, 2026.
  • robots.txt disallows /buy and /api/.
  • Docs: landing/README.md#checkout lists the env vars and the one-time Stripe setup. Reservers get single-use promotion codes. pricing.md, measurement.md and docs/technical.md are updated.

    Review fixes


  • db6b633 (Codex, P1): Vercel calls Web handlers as handler(request, event). The env default never applied, so /buy always returned 503 and the webhook 500.

  • 9e9d886 (Cursor): the Vercel adapter builds request.url as http://. Stripe's return URLs now use https for public hosts.

  • 787257c (Cursor, minor): the README promo-code advice and the privacy policy's ads sentence.

  • Open, for the owner: Terms have no purchase or refund wording.
  • Before merging


    1. Set STRIPE_SECRET_KEY and STRIPE_PRICE_ID in Vercel. Use test keys on Preview.
    2. Create the webhook endpoint at /api/stripe-webhook and set STRIPE_WEBHOOK_SECRET.
    3. Run one test-mode purchase on a Preview with MAILTRAP_INBOX_ID set.

    Until steps 1 and 2 are done, /buy shows the "unavailable" page.

    Tests


  • node --test "api/.test.js": 58 pass. These include each handler called the way Vercel calls it.

  • node --test "landing/.test.cjs": 32 pass. These cover:

  • - no GitHub link in any header;
    - help page and email DMG links match;
    - no PC or Linux claims;
    - Windows is "coming soon" on every buy note.
  • CI is green on 787257c: Linux and macOS checks, both Mac app builds, and the iOS app.
  • 🤖 Generated with Claude Code

    https://claude.ai/code/session_01DchAE4kCQdAr11wCAAVwzV

    Diff: 459 lines (+344 / -115) across 5 files Reviewer: ethanteng Review duration: 128m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.46) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.46 · 459 lines diff across 5 files
    0.46
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.367
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #151"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45.5% (MEDIUM) · Higher = larger blast radius
    45.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.7% · Safe to merge
    19.7%