KBAISE/ for lovable
Library
Docs

Connect your own Stripe account

about 15 minBuildingchecked 4d agoOfficial page
The short version

You can connect your own Stripe account to your Lovable project to accept payments directly. Lovable will build the checkout process and manage subscriptions using your existing Stripe setup.

Anyone who wants to use their existing Stripe account for payments in a Lovable project, especially if they are on the Free plan or have specific control needs.

Do this, in order

  1. 1

    In your project chat, tell Lovable what you want to sell, like a one-time course or subscription tiers.

    This tells Lovable you want to set up payments and prompts it to ask about your Stripe account.

  2. 2

    When Lovable asks, tell it you want to use your own Stripe account instead of built-in payments.

    Lovable usually recommends its built-in payment option first, so you need to specify your preference.

  3. 3

    Go to your Stripe dashboard, create a restricted API key with the necessary permissions, and paste it into the 'Connect Stripe' form that appears in your Lovable project chat.

    This key allows Lovable to securely interact with your Stripe account to create payment flows. Use a test key first to try things out safely.

  4. 4

    Review the backend code, products, and prices Lovable creates or uses in your Stripe account, and test the payment flow in the preview.

    This ensures everything is set up correctly and works as expected before going live.

  5. 5

    To go live, ask Lovable to update your Stripe key, then submit a live API key in the 'Update Stripe secret key' form.

    This switches your payment system from test mode to live mode, allowing real transactions.

  6. 6

    Confirm that your products and prices exist in live mode in Stripe, and ask Lovable to switch your app to use those live price IDs.

    Test and live modes in Stripe have different IDs for products and prices, so you need to update your app to use the correct live ones.

  7. 7

    Perform a real purchase on your published app to verify the live setup.

    This final check confirms that your payment system is fully operational and ready for customers.

Paste this into your project

I want to set up payments using my own Stripe account. I'd like to sell a digital course for $29 as a one-time purchase.

Words decoded

API key
A secret code that allows one computer program (like Lovable) to securely talk to another program (like Stripe) and perform actions on your behalf.
Backend
The part of your app that runs on a server, handling things like data storage, security, and processing payments, rather than what you see on the screen.
Edge functions
Small pieces of code that run very close to your users, making your app faster and more responsive, especially for tasks like processing payments securely.
Webhooks
Automated messages sent from one application (like Stripe) to another (like your Lovable app's backend) when a specific event happens, such as a payment being completed.
Cloud
Lovable's built-in backend service that handles server-side operations for your app without you needing to set up your own servers.
Supabase
An external service that provides a database and backend features, which you can connect to your Lovable project if you prefer to manage your own backend.

Where people get stuck

  • Never paste your Stripe API key directly into the project chat; only use the dedicated form.
  • Do not expect the customer portal to work within the Lovable preview panel; test it in a standalone browser tab or your published app.
  • Be aware that disconnecting Stripe from Lovable does not cancel customer subscriptions or issue refunds; you must manage these in your Stripe dashboard.
  • Remember that the Payments view in Lovable is read-only when using your own Stripe account; all management (products, refunds, webhooks) happens in your Stripe dashboard.
  • Ensure your workspace's Stripe connector is enabled if Lovable isn't offering to connect your own Stripe account.

The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.