← Back to Session 4
💳

Payment QR Generator

Create custom payment QR codes with your name and amount. Perfect for accepting UPI payments instantly.

Setup Instructions

1

Install QR Code Library

Open Ubuntu terminal in your home directory and install the required QR code library with PIL support.

python3 -m pip install qrcode[pil] --break-system-packages
This installs the qrcode library with image generation capabilities
2

Download Payment Script

Download the payment QR generator script from GitHub repository using curl command.

curl -fsSL -o sir_payment.py https://raw.githubusercontent.com/sandeepbangaru17/qr/main/sir_payment.py
This saves the script as sir_payment.py in your current directory
3

Run the Script

Execute the Python script. It will prompt you to enter your details:

python3 sir_payment.py
When prompted:
• Enter your name as the payee
• Enter the payment amount
• The script will generate a QR code image
4

Start Local Server

Start a local HTTP server to view and share your generated QR code.

python3 -m http.server 8000
Access your QR code:
• On the same machine: http://localhost:8000
• From other devices: http://[Ubuntu-IP]:8000
• Press Ctrl+C to stop the server

📱 How It Works

This tool generates a UPI payment QR code that can be scanned by any UPI-enabled payment app like Google Pay, PhonePe, or Paytm. When someone scans the code, it will automatically fill in your name and the specified amount, making payments quick and hassle-free.