Page 1 of 7
hardy-invoices System Requirements Document
1. Introduction
This document outlines the system requirements for the project "hardy-invoices," which aims to integrate UPI payment support for Indian users, specifically through Google Pay and PhonePe-compatible UPI links. The project is designed to facilitate invoice payments for Indian freelancers, consultants, and small digital agencies.
2. System Overview
Page 2 of 7
2a. Product Interpretation and Delivery Boundary
Domain Descriptors:
- UPI Payment Integration: Facilitate UPI payments through standard deep links and QR codes.
Project Scope:
-
Inclusions:
- UPI payment support using standard UPI deep links and QR codes.
- Manual payment confirmation for MVP.
- Optional integration with Razorpay for future automated payment confirmation.
- Invoice management with UPI-specific fields and security measures.
-
Exclusions:
- Separate app-specific APIs for Google Pay and PhonePe.
- Automatic payment confirmation without manual review.
Access:
- Public access for customers to make payments.
- Internal access for invoice owners to manage payments and invoices.
Behavior Contracts:
- Display UPI Payment Options: Triggered when a customer accesses an invoice with UPI enabled, displaying payment options and QR codes.
- Submit Payment Reference: Allows customers to submit UTR/reference numbers, marking invoices as "Payment submitted."
- Manual Payment Confirmation: Invoice owners review and confirm payments manually.
- Generate UPI Payment URI and QR Code: Automatically generates UPI payment URIs and QR codes when UPI payment is enabled.
- Store Customer Payment Reference and Notes: Stores customer-submitted UTR/reference numbers and payment notes.
- Set Payment Created Timestamp: Automatically sets the timestamp when a payment record is created.
2b. Source Content Inventory
Not applicable as no explicit content_source directive was provided.
Page 3 of 7
2c. Page Content and Component Coverage
UPI Payment Page:
- Display "Pay by UPI" button.
- Display "Open in Google Pay" and "Open in PhonePe" buttons if supported.
- Display QR code generated from UPI URI.
- Display UPI ID with a copy button.
- Display invoice details: number, amount, payee name, due date.
- Payment instructions page for mobile and desktop.
- Warning: "Payment status is confirmed only after verification."
Invoice Management Page:
- Review payment submissions.
- Confirm payments manually.
- Manage invoice/payment state.
UPI Payment Record Management:
- Generate and store UPI payment URIs and QR codes.
- Manage payment record timestamps.
3. Functional Requirements as Story Points
- As a Customer, I should be able to view UPI payment options when accessing an invoice with UPI enabled.
explicit
- As a Customer, I should be able to submit a UTR/reference number and payment note after a UPI payment attempt.
explicit
- As an Invoice Owner, I should be able to manually confirm payments after reviewing payment submissions.
explicit
- As an Application, I should automatically generate a UPI payment URI and QR code when UPI payment is enabled or updated.
explicit
- As a Customer, I should be able to store my UTR/reference number and payment notes for future reference.
explicit
- As an Application, I should set a created timestamp when a payment record is created.
explicit
Page 4 of 7
4. User Personas
- Invoice Owner: Manages invoices and confirms payments manually.
- Customer: Makes payments using UPI and submits payment references.
5. Core User Flows
Invoice Owner Flow
- Access the Invoice Management Page.
- Review payment submissions.
- Confirm payments manually.
- Manage invoice/payment state.
Customer Flow
- Access the UPI Payment Page.
- View UPI payment options.
- Submit UTR/reference number and payment note.
- Receive confirmation of "Payment submitted."
Page 5 of 7
6. Visuals Colors and Theme
- Primary: #007BFF (Blue)
- Primary Light: #66B2FF
- Secondary: #6C757D (Gray)
- Accent: #28A745 (Green)
- Highlight: #FFC107 (Yellow)
- Background: #FFFFFF (White)
- Surface: #F8F9FA (Light Gray)
- Text: #212529 (Dark Gray)
- Text Muted: #6C757D (Muted Gray)
- Border: #DEE2E6 (Light Border Gray)
7. Signature Design Concept
The UPI Payment Page will feature a clean, modern design with a focus on usability and clarity. The page will prominently display payment options, QR codes, and invoice details. The design will be mobile-responsive, ensuring accessibility across devices. The primary CTA will be the "Pay by UPI" button, with secondary options for Google Pay and PhonePe where supported.
8. Interaction Model & Motion Direction
- UPI Payment Page: Animated interaction model with moderate scroll-triggered reveals and hover transitions.
- Invoice Management Page: Static interaction model prioritizing clarity and data density.
Page 6 of 7
9. Non-Functional Requirements
- Validate UPI IDs using a safe format check.
explicit
- Escape and URL-encode all UPI URI values.
explicit
- Protect payment details and add CSRF protection.
explicit
- Add rate limits to payment-submission forms.
explicit
- Clearly state that PayNudge is not a bank, payment processor, or financial adviser.
explicit
10. Tech Stack
- Frontend: React for Web
- Backend: Python, FastAPI
- Database: PostgreSQL
- AI Tools: Ollama locally or Google AI Studio free usage
- Hosting: Vercel Hobby, Cloudflare Pages, or 8080.ai
- Email Testing: Mailpit
- Analytics: PostHog Free or Google Analytics
11. Assumptions and Constraints
- UPI payment support is optional and manual confirmation is required for MVP.
- Razorpay integration is optional and planned for future implementation.
- No separate app-specific APIs for Google Pay and PhonePe are required.
- Payment confirmation must be manual or verified through a trusted gateway response.
Page 7 of 7
12. Glossary
- UPI: Unified Payments Interface, a real-time payment system in India.
- MVP: Minimum Viable Product, the most basic version of a product that can be released.
- UTR: Unique Transaction Reference, a number used to identify a payment.
- QR Code: Quick Response Code, a type of matrix barcode.
- CTA: Call to Action, a prompt to encourage user interaction.
No comments yet. Be the first!