senternet-site-stripe

Integrates Stripe payments into sites via Firebase Cloud Functions with configurable checkout and fulfillment.

Updated May 8, 2026
One-click install
npx skills add https://github.com/MattSenter/senternet-site-skills --skill senternet-site-stripe-mattsenter
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: senternet-site-stripe
Source: https://github.com/MattSenter/senternet-site-skills/tree/main/.claude/skills/senternet-site-stripe
Command: npx skills add https://github.com/MattSenter/senternet-site-skills --skill senternet-site-stripe-mattsenter

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires stripe, firebase-functions, firebase-admin, jsonwebtoken, @stripe/stripe-js, @stripe/react-stripe-js.

What problem does it solve? Adding payments to a marketing site requires coordinating Stripe keys, webhook signature verification, Firebase secrets, IAM roles, and fulfillment logic — a multi-service setup that is easy to misconfigure. This Skill walks through the entire integration end-to-end, from storing secrets to testing against the Stripe sandbox. ## Core Features & Use Cases - Two checkout shapes: hosted Stripe Checkout redirect or an embedded Payment Element rendered on your own page with @stripe/react-stripe-js. - Four fulfillment modes: RS256 JWT entitlement tokens for desktop-app licensing, receipt emails via Resend, time-limited signed download URLs for private files, or Stripe's own receipt only. - Order recovery endpoint: OTP-verified self-serve flow so customers who lost a license or download link can recover it by proving ownership of their purchase email, with optional reCAPTCHA Enterprise App Check gating. - Use Case: You sell a Mac app with monthly, annual, and lifetime plans. The Skill scaffolds a hosted Checkout function, a webhook that signs JWT entitlement tokens on checkout.session.completed, and a recovery endpoint — then verifies everything locally with the Firebase emulator and Stripe CLI before deploying. ## Quick Start Set up Stripe payments on my site using Firebase Functions with hosted checkout and a receipt email sent after each purchase.

Frequently Asked Questions about senternet-site-stripe

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Stripe payments to a Firebase-hosted site?▼

Create a Firebase Cloud Function that builds a Stripe Checkout Session and redirect the browser to its URL, or use the embedded Payment Element with a callable function returning a clientSecret. Store the Stripe secret key in Firebase Secret Manager and handle checkout.session.completed in a webhook function.

Should I use hosted Stripe Checkout or the embedded Payment Element?▼

Hosted Checkout redirects the browser to Stripe's page and needs no frontend Stripe SDK, making it the default for fixed products or licenses. The embedded Payment Element keeps the payment UI on your domain and suits dynamic amounts like donations, but requires @stripe/stripe-js and @stripe/react-stripe-js.

How do I verify Stripe webhooks in Firebase Functions?▼

Use stripe.webhooks.constructEvent with the request's raw body, the stripe-signature header, and the webhook signing secret stored as STRIPE_WEBHOOK_SECRET. Register the deployed function URL as a webhook endpoint in the Stripe Dashboard subscribed to checkout.session.completed.

Why are my Stripe secrets empty in the Firebase emulator?▼

The Functions emulator loads defineSecret values only from functions/.secret.local, not from functions/.env. A .env file provides non-secret runtime config, so secrets like STRIPE_SECRET_KEY come back empty unless placed in .secret.local.

How can customers recover a lost license key or expired download link?▼

The recoverPurchase endpoint looks up the customer's email in Stripe, emails a 6-digit OTP via Resend, and reissues the JWT token or signed download URL after verification. It uses a 15-minute TTL, a 5-attempt cap, and constant-time responses to avoid revealing whether an email is a customer.

Can I sell both subscriptions and one-time products on the same site?▼

Yes. Map each plan to its Stripe price ID and set the Checkout Session mode to subscription for recurring prices or payment for one-time prices. A single checkout function can mix both, as the premail reference does with monthly, annual, and lifetime plans.