Case study · Private AI
Case Study: Reading UPI Payment Screenshots Privately with Self-Hosted OCR
Finance and operations teams in India receive payment proof as screenshots from apps such as Google Pay, PhonePe and Paytm, and someone types the amount and transaction ID into a sheet. We built a containerised service that reads those screenshots and returns structured data, including the amount, UPI ID, transaction ID, date and names, using PaddleOCR and spaCy running on your own server, so the screenshots are never sent to a third-party API.
By Web Your Vyavsay team · Published
Drafted with AI assistance. Claims are checked against the sources listed below and reviewed by our team.
The problem
- Staff type amounts and transaction IDs from screenshots by hand, and typos slip through.
- The same screenshot is sometimes submitted twice for two different payments.
- Edited or fake screenshots are hard to spot by eye.
- Screenshots contain names, UPI IDs and amounts: personal data that should not travel to outside services.
What the service does
- Reads the text in a UPI screenshot with OCR.
- Extracts the amount, UPI IDs, transaction ID, date and names, using NLP to improve name extraction.
- Accepts an uploaded file or a base64 image, and answers immediately or through an asynchronous job queue.
- Flags duplicate screenshots using a perceptual hash, even if the image was resized or recompressed.
- Runs validation and fraud checks and flags suspicious screenshots for a person to review.
- Limits requests per IP address or API key.
Why self-hosted matters
Because the OCR and language models run inside the service, the screenshots stay on your infrastructure. The models are downloaded once, about 100 MB on the first run, and every request after that is processed locally. For payment data covered by India’s DPDP rules, keeping processing in house is simpler than assessing where an outside OCR provider stores and uses your images.
Technology
The service is written in Python and served with Uvicorn. PaddleOCR reads the text, spaCy improves name extraction, Redis backs the job queue and caching, and the whole service runs with Docker Compose next to your existing systems, exposed as a small REST API.
Where it fits
- Reconciling customer payments sent as screenshots on WhatsApp.
- Checking EMI or collection payments in lending and finance businesses.
- Verifying prepaid orders before dispatch.
- Any workflow where staff copy details from payment screenshots into a system.
Frequently asked questions
Which payment apps does it read?
It is built for UPI payment screenshots from apps such as Google Pay, PhonePe and Paytm.
Can it detect fake payment screenshots?
It runs validation and fraud checks and flags screenshots that look inconsistent, but no check catches every edited image. Confirm high-value payments against your bank statement.
Does it need an internet connection?
Only to download the OCR models the first time. After that, screenshots are processed on your own server.
Can it connect to our CRM or accounting system?
Yes. It exposes a REST API, so a CRM, a WhatsApp workflow or an internal tool can send screenshots and store the extracted fields.
