Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
•
YouTube Security VideosNeil Patel: The 3-Search Test For Your Business #shorts(24.09.2026 um 20:04 Uhr)
•
YouTube Security VideosLinus Tech Tips: The One Apple Product I Fanboy Over(24.09.2026 um 20:18 Uhr)
•
YouTube Security VideosMicrosoft Mechanics: One Prompt Builds Your Copilot Agent(24.09.2026 um 20:15 Uhr)
••
Sichere ProgrammierungAI-powered fuzzing with the GitHub Security Lab Taskflow Agent(24.09.2026 um 20:26 Uhr)
•••
Sichere ProgrammierungBuilt an Agentic Fraud Investigator using(24.09.2026 um 20:15 Uhr)
•
Sichere ProgrammierungBuilding a fraud investigator that argues with itself(24.09.2026 um 20:15 Uhr)
••
YouTube Security VideosNeil Patel: The 3-Search Test For Your Business #shorts(24.09.2026 um 20:04 Uhr)
•
YouTube Security VideosLinus Tech Tips: The One Apple Product I Fanboy Over(24.09.2026 um 20:18 Uhr)
•
YouTube Security VideosMicrosoft Mechanics: One Prompt Builds Your Copilot Agent(24.09.2026 um 20:15 Uhr)
••
Sichere ProgrammierungAI-powered fuzzing with the GitHub Security Lab Taskflow Agent(24.09.2026 um 20:26 Uhr)
•••
Sichere ProgrammierungBuilt an Agentic Fraud Investigator using(24.09.2026 um 20:15 Uhr)
•
Sichere ProgrammierungBuilding a fraud investigator that argues with itself(24.09.2026 um 20:15 Uhr)
•
Intelligence View
⚡ tsecurity.de Intelligence

Supabase Stripe — Implement Subscription Billing with Edge Functions

Supabase × Stripe — Implement Subscription Billing with Edge Functions Build a monthly subscription system with Stripe and Supabase Edge Functions. Architecture Overview Flutter → Supabase EF (create-checkout) → Stripe Chec…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




Supabase × Stripe — Implement Subscription Billing with Edge Functions



Build a monthly subscription system with Stripe and Supabase Edge Functions.






Architecture Overview






Flutter → Supabase EF (create-checkout) → Stripe Checkout
Stripe Webhook → Supabase EF (stripe-webhook) → DB update
Flutter → Supabase DB (read subscription status)









Create a Checkout Session






// supabase/functions/create-checkout/index.ts
import Stripe from "npm:stripe";

const stripe = new Stripe(Deno.env.get("STRIPE_SECRET_KEY")!);

Deno.serve(async (req) => {
const { userId, priceId } = await req.json();

// Get existing Stripe Customer ID (or create one)
const { data: profile } = await supabase
.from("profiles")
.select("stripe_customer_id, email")
.eq("id", userId)
.single();

let customerId = profile.stripe_customer_id;
if (!customerId) {
const customer = await stripe.customers.create({ email: profile.email });
customerId = customer.id;
await supabase.from("profiles").update({ stripe_customer_id: customerId }).eq("id", userId);
}

const session = await stripe.checkout.sessions.create({
customer: customerId,
payment_method_types: ["card"],
line_items: [{ price: priceId, quantity: 1 }],
mode: "subscription",
success_url: `${Deno.env.get("APP_URL")}/success?session_id={CHECKOUT_SESSION_ID}`,
cancel_url: `${Deno.env.get("APP_URL")}/pricing`,
metadata: { user_id: userId },
});

return new Response(JSON.stringify({ url: session.url }));
});









Update DB via Webhook






// supabase/functions/stripe-webhook/index.ts
Deno.serve(async (req) => {
const sig = req.headers.get("stripe-signature")!;
const body = await req.text();

const event = stripe.webhooks.constructEvent(
body,
sig,
Deno.env.get("STRIPE_WEBHOOK_SECRET")!
);

switch (event.type) {
case "customer.subscription.created":
case "customer.subscription.updated": {
const sub = event.data.object as Stripe.Subscription;
const userId = sub.metadata.user_id;
await supabase.from("subscriptions").upsert({
user_id: userId,
stripe_subscription_id: sub.id,
status: sub.status, // active / past_due / canceled
current_period_end: new Date(sub.current_period_end * 1000).toISOString(),
plan: sub.items.data[0].price.lookup_key,
});
break;
}
case "customer.subscription.deleted": {
const sub = event.data.object as Stripe.Subscription;
await supabase
.from("subscriptions")
.update({ status: "canceled" })
.eq("stripe_subscription_id", sub.id);
break;
}
}

return new Response("ok");
});









Open Checkout from Flutter






Future<void> openCheckout(String priceId) async {
final res = await supabase.functions.invoke(
'create-checkout',
body: {'userId': supabase.auth.currentUser!.id, 'priceId': priceId},
);

final url = (res.data as Map)['url'] as String;
await launchUrl(Uri.parse(url), mode: LaunchMode.externalApplication);
}









Summary






Checkout    → EF creates Stripe session → Flutter opens the URL
Webhook → Stripe → EF → update subscriptions table
Status → Flutter reads subscriptions table directly (protected by RLS)
Security → STRIPE_WEBHOOK_SECRET signature verification is mandatory






Skipping webhook signature verification lets attackers spoof events and falsify billing status. Always verify.

SOC Incident Playbook: Vulnerability Remediation & Verification
title: Detect Exploitation - Supabase Stripe — Implement Subscription Billing with Edge Functions
id: 61b6c55d-651d-41a8-b103-f510b53c7f61
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "Supabase Stripe — Implement Su" ascii wide
    condition:
        any of them
}
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich Supabase Stripe — Implement Subscription.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Supabase Stripe — Implement Subscription Billing with Edge Functions

Thematisch verwandte Begriffe: Supabase, Stripe, Implement, Subscription · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-57175 | Python Social Auth is a social authentication/registration mechanism. Pr…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel • Rechts: nächster Artikel • unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...
↗ Original-Quelle