No advanced coding skills required. Just follow along and let AI do most of
the heavy lifting!
Setting Up Your Project on Lovable
1
Create your account
Go to lovable.dev and create a new account.
Click on “New Project” to start building.
2
Choose a template
Pick a basic template or start from scratch. Name your project (e.g.,
QR Code Generator
).Building the Core Functionality
1
Plan Your App's Design
The first step is to create a rough sketch of the design. This helps AI to understand the flow better—no guesswork involved. 

Design created using Excalidraw
2
Give the First Prompt
Now that you have a rough design, you can feed it to AI along with a basic flow of how the app would work.
3
Review & Improve
Check the output and give it a try. If you encounter bugs, tell AI to fix them! 

First iteration output - perfect UI but download button needed fixing
Adding User Authentication
Now that your app is working, the next step is to authenticate users. Lovable’s default way to add authentication is through Supabase which needs just one prompt -
Monetising with Paygentic
Setting Up Paygentic
1
Create a Paygentic account
Go to paygentic.io and sign up. Choose Merchant during registration.
2
Create a Product
Open your merchant dashboard and create a new Product: 

3
Define Billable Metrics
This is what you’ll charge for—e.g., number of QR codes generated 

4
Create Plan and Price
- Create a usage plan
- Set a price for your metric (e.g.,
$0.00001
per QR code)

Integrating in Lovable App
Once your product and pricing are set up in Paygentic, it’s time to link everything to your Lovable app so users can authorize payments and be charged for usage.1
Add Paygentic Environment Variables
Ask Lovable to add the following environment variables to your app:
- PAYGENTIC_API_KEY: Your Paygentic API key (Found in settings/API keys in merchant dashboard)
- PAYGENTIC_MERCHANT_ID: Your Paygentic merchant ID (Found in settings/Organization, starts with ‘org_’)
- PAYGENTIC_BILLABLE_METRIC_ID: Your billable metric ID
- PAYGENTIC_PLAN_ID: Your plan ID
2
Store User Metadata in Supabase
By default, Lovable only stores the user’s email. You need to store two more fields:Lovable will likely propose SQL changes—approve them and let it handle the update.
auth_token
(used to authorize the user with Paygentic)customer_id
(unique to each user in Paygentic)
3
Set Up Authorization Flow
Every user needs a Paygentic Customer ID to be charged. We’ll guide Lovable to:By now the users should be able to Pay with Paygentic. 
- Check if a user already has this ID
- If not, start the payment setup/authorization process
- Save the result so it only happens once

Final Step: Reporting Usage
1
Track Usage
The last step is to create a usage event whenever a customer generates QR codes. Ask lovable to follow the docs and create a usage event if the payment is authorised.
2
Testing
That’s all! Now it’s time to test it. Publish the app or use Lovable’s preview mode.In a different browser:

- Signup on the app (pretending as consumer)
- Authorise Paygentic - flow depends on how you prompt the user to authorise, in QR app we prompt the user if he inputs more than 2 urls
- Register as Consumer
- Subscribe to the plan

- Generate lots of QRs and check the usage dashboard for complete transparency

Conclusion
Congratulations! You’ve created a fully functional QR code generator app with
monetization using Paygentic.
- Quickly build a professional web application without advanced coding
- Add monetization with a usage-based billing model
- Create a smooth user experience from signup to payment