DEV Community

Casey Marlin
Casey Marlin

Posted on AI-assisted

Checking a "proof of purchase" photo: three kinds of fake receipt and what actually catches each

If you handle refunds, expense claims or marketplace disputes, you've probably been sent a photo of a receipt as proof. A few years ago faking one took effort. Now there are three cheap ways to do it, and each one slips past a different check.

The three kinds of fake

Kind How it's made What tends to catch it
Fully generated An image model prompted for "a crumpled restaurant receipt" AI-image checks, plus arithmetic and merchant checks
Edited real receipt A genuine receipt with the total, date or items changed in an editor Font, alignment and arithmetic checks; an AI check may see nothing
Template output A "receipt maker" site renders a clean fake Merchant details, store-number format, suspiciously perfect flatness

The point of the table: no single check covers all three. An AI detector is fast and good at the first row, and close to useless on the second, because the second one is a real photo.

Check 1: do the maths (it's scriptable)

Generated receipts are pictures of receipts, not ledgers. The items, tax and total often don't add up. If you get these often, a few lines save you the mental arithmetic:

// items: line totals as printed; rate: local sales-tax rate, e.g. 0.0875
function checkReceipt(items, printedTax, printedTotal, rate) {
  const cents = (x) => Math.round(x * 100);
  const subtotal = items.reduce((s, x) => s + cents(x), 0);
  const expectedTax = Math.round(subtotal * rate);
  return {
    subtotal: subtotal / 100,
    taxOff: (cents(printedTax) - expectedTax) / 100,
    totalOff: (cents(printedTotal) - (subtotal + cents(printedTax))) / 100,
  };
}

checkReceipt([12.5, 8.75, 3.0], 2.12, 26.37, 0.0875);
// { subtotal: 24.25, taxOff: 0, totalOff: 0 }
Enter fullscreen mode Exit fullscreen mode

Work in cents to avoid floating-point noise, and look up the rate for the city on the receipt, not your own. A tax line that's off by a few cents can be rounding; one that matches no plausible rate is a flag.

Check 2: the merchant and the clock

  • Does the store exist at that address, and does the phone number belong to it?
  • Was it open at the printed time, and does the weekday match the date?
  • Is the store or register number in the same format as that chain's other receipts?

Template generators get these wrong constantly, because they don't know or care what a real store's receipt looks like.

Check 3: the print itself

Thermal printers use one font with even spacing. Mixed fonts, characters that don't sit on a line, or one sharp number among blurry text usually mean someone edited a real receipt, which is exactly the case an AI check misses.

Check 4: the image's own evidence

Before running any model, look at what the file says about itself. Some AI tools now sign their output with Content Credentials (C2PA), and some write the generator's name into metadata. A phone photo sent as a file can keep its camera metadata; a photo pasted into chat usually loses everything. If the file is silent, a detection model gives a likelihood, which is useful for the first row of the table and nothing more.

I use a receipt check page I built for this step. It reads credentials and metadata on your device first and only falls back to a model when the file has nothing to say. Whatever tool you use, treat a low AI score as "not generated", never as "genuine".

Check 5: ask for the original

The strongest check isn't technical. A real customer can usually forward the e-receipt email, or show the charge in their banking app with the same last four digits and amount. Someone with a fake tends to stall.

A checklist to keep next to the inbox

  • [ ] Original file requested (email receipt or PDF, not a chat photo)
  • [ ] Items + tax = total, at the right local rate
  • [ ] Merchant, address and phone real and consistent
  • [ ] Time inside opening hours; weekday matches the date
  • [ ] One font, straight lines, consistent print texture
  • [ ] Card digits and amount match the statement
  • [ ] Image evidence checked, and the result noted with where it came from

And one rule above the checklist: don't accuse anyone on a detector score alone. Ask for supporting evidence first.

What's the most convincing fake receipt you've been sent, and which check caught it?

Top comments (0)