Connect your own Stripe account
Connect your personal Stripe account to accept one-time payments or subscriptions directly into your bank. You give Lovable a Stripe API key, and it generates the checkout pages and backend code.
Anyone who already has a Stripe account, wants to manage their own payments directly, or is using the Free Lovable plan.
Do this, in order
- 1
Type a message in the Lovable chat asking for payments, specifying that you want to use your own Stripe account.
Lovable defaults to built-in payments, so telling it to use your own account triggers the setup form.
- 2
Open your Stripe Dashboard, go to Developers > API keys, create a restricted key (starts with rk_test_), and paste it into the Connect Stripe form in the Lovable chat.
This securely links your app to your Stripe account without revealing your key to the public or in plain chat.
- 3
Approve the products, prices, and checkout buttons Lovable creates in the chat.
Lovable requires your confirmation before creating new product entries in your Stripe dashboard.
- 4
Test the checkout in the preview using Stripe's test card (4242 4242 4242 4242).
This verifies that buyers can complete transactions safely before you handle real money.
- 5
When ready, ask Lovable to switch to your live Stripe key and update your product price IDs to live ones.
Test keys and live keys use completely different IDs, so live mode requires real credentials and real product IDs.
Paste this into your project
I want to accept payments using my own Stripe account. Please help me set up a checkout page for a digital product priced at $29, and provide the form to connect my Stripe restricted API key.
Words decoded
- API key
- A private digital password that lets Lovable safely talk to your Stripe account.
- Edge functions
- Small bits of background code that securely process payment details behind the scenes so customers never see your secret key.
- Customer portal
- A ready-made Stripe webpage where your subscribers can change plans, update credit cards, or cancel.
- Webhooks
- Automated alert messages sent from Stripe to your app whenever an event happens, like a successful monthly charge.
Where people get stuck
- Never paste your Stripe API key into the regular chat window; only paste it into the dedicated Connect Stripe form.
- Do not use publishable keys (pk_...); the form only accepts restricted (rk_...) or secret (sk_...) keys.
- Preview testing uses whichever key is active; if you switch to a live key, any test purchase in the preview charges real money.
- Subscriptions require user authentication so your app can match the buyer's account to their payment by email.
- Disconnecting Stripe from Lovable does not stop active recurring subscriptions; you must cancel them inside your Stripe dashboard.
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.