Skip to content

Add Stripe webhook endpoint, Supabase analytics rollup, and update env/docs#20

Open
feispla wants to merge 2 commits into
codex/provide-professional-e-commerce-promptfrom
codex/configure-stripe-with-vercel-webhook-2e3mmj
Open

Add Stripe webhook endpoint, Supabase analytics rollup, and update env/docs#20
feispla wants to merge 2 commits into
codex/provide-professional-e-commerce-promptfrom
codex/configure-stripe-with-vercel-webhook-2e3mmj

Conversation

@feispla
Copy link
Copy Markdown
Owner

@feispla feispla commented May 15, 2026

Motivation

  • Add a server-side Stripe webhook endpoint to securely verify incoming Stripe events on Vercel.
  • Provide a backend analytics rollup to aggregate store_events and newsletter_signups into daily tables for secure reporting.
  • Tighten and document runtime defaults and deployment configuration for Supabase, Stripe, GitHub agent metadata and the app URL.

Description

  • Add api/stripe-webhook.js implementing Stripe signature parsing, timestamp freshness checking, HMAC-SHA256 verification with timing-safe comparison, JSON parsing, logging and a POST-only route that returns 200 on verified events.
  • Add supabase/migrations/202605150001_analytics_rollup.sql to create analytics_event_cursor, analytics_event_daily, analytics_leads_daily, RLS policies restricting selects to a service_role, and a security definer function process_store_events() that aggregates new rows into the daily rollups.
  • Update .env.example with obfuscated keys, new STRIPE_* and APP_URL entries, set SHOPIFY_ENABLE_REMOTE_PRODUCTS=false, and add GitHub agent workflow metadata.
  • Update docs/INTEGRATIONS.md with a new Stripe + Vercel webhook setup guide and notes about the analytics rollup migration and RLS behavior.

Testing

  • No automated tests were executed as part of this rollout.

Codex Task

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
feishtml Ready Ready Preview, Comment May 15, 2026 8:14am

@supabase
Copy link
Copy Markdown

supabase Bot commented May 15, 2026

Updates to Preview Branch (codex/configure-stripe-with-vercel-webhook-2e3mmj) ↗︎

Deployments Status Updated
Database Fri, 15 May 2026 08:14:28 UTC
Services Fri, 15 May 2026 08:14:28 UTC
APIs Fri, 15 May 2026 08:14:28 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations Fri, 15 May 2026 08:14:29 UTC
Migrations Fri, 15 May 2026 08:14:29 UTC
Seeding Fri, 15 May 2026 08:14:29 UTC
Edge Functions Fri, 15 May 2026 08:14:32 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant