Payments
Connect Stripe to your backend, query customers, products and subscriptions with SQL, and deploy ready-made Stripe edge functions.
The Payments page connects your Stripe account to your project database. Your Stripe data becomes tables you can query, and Lyna can deploy the edge functions your app needs to take payments. Open Settings > Lyna Cloud > Payments.
What you can do
- Save your Stripe keys to the project in one step.
- Read Stripe customers, products, prices, subscriptions, invoices, payment intents, charges, balance and events as tables in a
stripeschema. - Join Stripe data with your own tables in SQL.
- Deploy ready-made functions for checkout, payment intents, subscriptions, the customer portal and webhooks.
Set up Stripe
API keys
Choose Configure integration. Paste your Stripe Publishable key (pk_live_ or pk_test_) and Secret key (sk_live_ or sk_test_). Find them in your Stripe Dashboard under Developers, API keys.
Data
Review the Stripe resources that will be available as tables. Some can be written to, others are read-only.
Functions (optional)
Pick the edge functions to deploy: Payment intent, Checkout session, Subscription manager, Customer portal and Webhook handler. The webhook handler needs a webhook signing secret from Stripe. You can skip this step and add functions later.
Let Lyna configure it
Lyna saves the keys, configures the database wrapper, deploys the functions and writes their URLs. When it is done, the page shows Connected.
Start in test mode
Use your pk_test_ and sk_test_ keys while you build. Switch to live keys only when you are ready to take real payments.
After setup
| Tab | What it shows |
|---|---|
| Overview | The Stripe resources (Active or Inactive) and example queries you can copy. |
| Tables | The foreign tables in the stripe schema and their columns. |
| Query | Run read-only SQL on the stripe schema, in Guided mode (pick a resource, a filter and a limit) or Raw SQL. |
Remove the integration
In Danger zone, choose Remove integration and type REMOVE. This drops the stripe schema and the wrapper. Your Stripe keys stay in .env: delete them yourself if you no longer need them.
Good to know
- Payments needs a project database. If Lyna cannot configure your database automatically, the page explains how to set up the Stripe wrapper by hand.
- Only editors can configure payments.
- For the whole payment flow in your app, from test keys to webhooks, see Stripe.
Next steps
API
Explore and test the REST, GraphQL, Auth and Storage APIs generated for your backend, read their docs, tune the Data API and copy your connection keys.
Logs and observability
Follow your backend with reports on queries, the API gateway, the database, the Data API, auth, edge functions and storage, and read the logs behind them.