Dispacc Logo
Available on npm

Automate manual
bank transfer
verification.

Stop manually checking bank receipts. Extract structured transaction data from uploaded proof of payments instantly to prevent fraud and speed up order fulfillment.

$npm install receipt-ocr-ng
verifyTransfer.ts
TS
import { createExtractor } from "receipt-ocr-ng"; const extractor = createExtractor({  groqApiKey: process.env.GROQ_API_KEY,}); // 1. User uploads proof of paymentconst { transaction } = await extractor.extractFromBase64(  base64Image, "image/jpeg"); // 2. Programmatically verify the transferif (  transaction.status === "successful" &&  transaction.amount === expectedAmount) {  await fulfillOrder();} 
Pro tip: Press Ctrl+V anywhere to instantly verify a screenshot

live verification playground

Test your customers' receipts.

Drag a file, click to upload, or paste a proof of payment screenshot. The entire page is a dropzone.

Upload Proof of Payment

Click, drag, or paste a bank receipt to extract verification data.

Ctrl + V anywhere

Awaiting structured data to verify...

why build with this

Replace manual checks with code.

01

Verify Proof of Payments

Stop manually checking WhatsApp or dashboards. Let users upload receipts and automatically extract the exact sent amount, date, and status.

02

Fight Fake Receipts

Parse the exact sender, recipient, and transaction references to cross-check against expected data and block forged screenshots.

03

Built for Nigerian Banks

Trained to recognize standard transfer receipts from OPay, PalmPay, Kuda, Moniepoint, GTBank, Access, Zenith, and more local platforms.

04

Near-Instant Decisions

Powered by Groq's incredibly fast inference API. Process customer uploads in milliseconds so they aren't left waiting at checkout.

05

Strictly Typed Results

Returns a predictable ExtractResult object. Safely write logic like `if (tx.amount >= orderTotal)` without guessing data shapes.

06

Plug & Play

No AI model tuning or prompt engineering required. Just provide your API key and pass the user's uploaded base64 image.

the real problem

Every Nigerian business is solving this manually.

Bank transfer is the dominant payment method in Nigeria — but there is no programmatic way to verify a receipt. Businesses currently trust screenshots, rely on staff to check dashboards, or risk fraud. receipt-ocr-ng turns proof of payment into structured, verifiable data your code can act on.

E-commerce & marketplaces

The problem

Customers send WhatsApp screenshots as proof of payment. Staff manually check a bank dashboard before releasing orders — slow, error-prone, and impossible to scale.

With receipt-ocr-ng

Upload the screenshot, extract structured data in milliseconds, and auto-approve orders where the amount and recipient match. No human in the loop for clear cases.

Eliminate manual review
Ticket & event sales

The problem

At gate check-in or during high-volume pre-sales, operators receive hundreds of transfer receipts and cannot verify each one before doors open.

With receipt-ocr-ng

Programmatically validate reference numbers, amounts, and timestamps against your order database. Flag duplicates or mismatched amounts before seats are issued.

Block duplicate submissions
Freelancer & service platforms

The problem

Platforms that release funds or unlock features on payment confirmation rely on users self-reporting. A forged or reused screenshot bypasses the whole system.

With receipt-ocr-ng

Extract sender name, recipient account, and reference number to cross-check against the expected payer and transaction. Reject screenshots that don't pass all three checks.

Detect forged receipts
Logistics & delivery

The problem

Cash-on-delivery alternatives require dispatchers to confirm transfers at the door. Network issues or rushed checks mean fraudulent payments slip through.

With receipt-ocr-ng

Drivers or dispatch apps can scan uploaded receipts on-device or via API, confirming payment before handing over the package without calling HQ.

Confirm payment at handoff
SaaS & subscription apps

The problem

Apps that accept manual bank transfer as a billing option require support staff to match reference codes to user accounts — hours of manual reconciliation daily.

With receipt-ocr-ng

When a user uploads their receipt, automatically extract the reference number, match it to their pending invoice, and activate their subscription without human intervention.

Automate reconciliation
Escrow & lending

The problem

Trust-sensitive workflows like escrow and short-term lending require auditable proof that funds were actually transferred — not just a screenshot that anyone could stage.

With receipt-ocr-ng

Extract and store structured transaction records (amount, timestamp, reference) as a verifiable audit trail. Surface warnings when data is inconsistent or fields are missing.

Build an audit trail

ready to integrate?

Two function calls. Zero dashboards.

Install the package, provide your Groq API key, and start verifying receipts in minutes.

image preparation

Get the best extraction results.

A few simple rules to make sure OCR can reliably read the receipt before you send it to the engine.

01

Use a clear screenshot

The entire receipt should be visible — crop out unrelated UI like notification bars or browser chrome. Make sure amount, bank name, and date are all legible.

02

Keep it under 6MB

Most phone screenshots are well below this limit. If you're resizing before upload, aim for at least 800px in the shorter dimension to preserve OCR accuracy.

03

Supported formats

JPG, PNG, or WEBP only. Screenshots from all major Nigerian banking apps export as JPG or PNG by default — no conversion needed.

04

Convert to base64 before sending

The library accepts base64-encoded strings, not raw File objects. Use the snippet below on the client side before calling the extractor.

client-side — file input → base64

prepareImage.ts
// File comes from an <input type="file"> or drag-drop
const file: File = e.target.files[0];

// 1. Read the raw bytes
const arrayBuffer = await file.arrayBuffer();

// 2. Encode to base64 (works in all modern browsers)
const base64Image = btoa(
  String.fromCharCode(
    ...new Uint8Array(arrayBuffer)
  )
);

// 3. Pass to the extractor
const { transaction } = await extractor
  .extractFromBase64(base64Image, file.type);

server-side — multer / formdata upload

uploadHandler.ts
// If you receive a Buffer from multer / fs.readFile:
const fileBuffer: Buffer = req.file.buffer;

// Convert Node.js Buffer → base64 string
const base64Image = fileBuffer.toString("base64");
const mimeType    = req.file.mimetype; // e.g. "image/jpeg"

// Extract
const { transaction } = await extractor
  .extractFromBase64(base64Image, mimeType);

// Cross-check against your order
if (
  transaction.status === "successful" &&
  transaction.amount >= order.total
) {
  await fulfillOrder(order.id);
}

open source

Built in the open.
Contributions welcome.

Dispacc is an open-source tool built to help Nigerian developers safely process manual payments without the operational headache. Want to add support for a new bank or improve accuracy? Pull requests are highly encouraged.

get started locally

01clonegit clone https://github.com/codepraycode/dispacc-receipt-ocr
02installpnpm install
03configurecp .env.example .env.local
04runpnpm dev