Stripe
Stripe handles two things in Lyna: Lyna's own subscription billing and payment processing for your apps. The billing side manages your Lyna subscription. The Payments tab in Lyna Cloud lets you add Stripe to the apps you build.
Lyna Subscription Billing
Lyna uses Stripe to manage subscriptions.
- Checkout: handled via Stripe Checkout sessions.
- Billing portal: manage your subscription, update payment methods, and view invoices through Stripe's Customer Portal.
- Tier changes: upgrade or downgrade between 11 pricing tiers ($25 to $3,750/month).
Access billing from Settings > Subscription or account settings on the dashboard.
Adding Payments to Your App
Open Settings > Cloud > Payments to integrate Stripe into the apps you build. This sets up Supabase edge functions that handle Stripe API calls server-side.

Prerequisites
- A connected Supabase database.
- A Stripe account with API keys (from the Stripe Dashboard).
Setup
Enter Your Stripe Keys
Provide your Secret Key and Publishable Key. Lyna stores them as environment variables in .env and as edge function secrets.

Sync Stripe Entities
Choose which Stripe data to sync to your database:
| Entity | Description |
|---|---|
| Customers | Customer records from Stripe |
| Products | Product catalog |
| Prices | Pricing tiers and amounts |
| Subscriptions | Active subscription records |
| Invoices | Billing invoices |
| Payment Intents | One-time payment records |
| Charges | Completed charges |
Lyna creates the corresponding database tables and syncs data from your Stripe account.
Deploy Edge Functions
Lyna deploys Supabase edge functions for common Stripe operations:
- Webhook handler: receives and processes Stripe events (payment succeeded, subscription updated, etc.).
- Checkout session: creates Stripe Checkout sessions for accepting payments.
- Customer portal: generates links to the Stripe Customer Portal.
- Sync function: keeps database tables in sync with Stripe data.
Select which functions to deploy. Lyna generates the code and pushes it to your Supabase project.
How It Works
Three layers:
- Database tables: synced copies of your Stripe data in Supabase PostgreSQL.
- Edge functions: serverless functions that handle Stripe API calls, webhooks, and data sync.
- Client-side code: the AI generates React components for checkout buttons, pricing tables, and subscription management that call your edge functions.
Stripe API calls always go through edge functions (server-side), never from the client. Your Stripe secret key stays secure.
Tabs
The payments panel has three tabs:
Overview
Connection status, configured keys, and available Stripe functions. Deploy or re-deploy edge functions from here.
Tables
Browse synced Stripe data tables. View customer records, subscription statuses, and payment history.
Keys
View and update your Stripe API keys.
Common Patterns
- One-time payments: deploy a Checkout Session edge function, add a "Buy Now" button.
- Subscriptions: sync products and prices, create a pricing page, use Customer Portal for management.
- Webhooks: deploy the webhook handler to react to payment events and subscription changes.