SQL patterns I use to catch transaction fraud

(analytics.fixelsmith.com)

93 points | by redbell 7 hours ago

11 comments

  • inheritedwisdom 0 minutes ago
    This takes me back, fighting telephone fraud back when folks use to accept cc over the phone. We used similar patterns but only had phone numbers and the white pages. Cross state boundaries inside similar time frames and categorizing similar merchant types. It’s fun to see these same patterns still in use 20 years later for the same purpose.
  • jstanley 2 hours ago
    > Real cardholders almost never buy something for exactly $1.00. Coffee is $4.73, gas is $52.81. The roundness is the signal.

    Surely this depends on how the vendor sets their prices? If you're going to buy something from a website to test a stolen credit card you don't just get to make up your own prices.

    And I think you may be over-indexing on the US "prices don't include tax" thing. Elsewhere, round-number prices are extremely common.

    In fact a lot of the rest of the stuff in the post seems like it wouldn't work very well either. (E.g. you're flagging anyone who has done a transaction in the last 90 days outside the range of hours at which they have 2+ transactions? Wouldn't that be like 50% of people?).

    It's unclear to me whether this article is an attempt at breaking down complex expertise into over-simplified SQL queries, or whether it is all speculative and made up.

    There is a conflict between "Six SQL patterns I use to catch transaction fraud" and "Nothing here comes from anything I’ve actually worked on or seen".

    • normie3000 1 hour ago
      Worse than that.

      Coffee usually _is_ a round number in my experience, and I know of people who aim for round numbers when filling their car, and of fuel stations which require a pre-set value, often 10, 20, 50€ etc

      • Niksko 21 minutes ago
        All of that is easy to account for, all of the metadata you need is available. This also applies to the sibling comment about rounding up to charity at the grocery store, the data is all there, even if it's e.g. the fraud analyst at the bank or credit card company instead of the fraud analyst at the grocery store.
    • themafia 1 hour ago
      I'm seeing a few stores here and there which have a "round up to donate" option. I guess I'm a bit of a sucker and I always use that option. My groceries are always a round number as a result.
  • dnnddidiej 8 minutes ago
    2 can be genuine use. I let my partner use my card and I use it on my phone as rfid. Maybe ignore phone usages since they are secured pretty well.
    • WhyIsItAlwaysHN 1 minute ago
      Exactly, hopefully this is not an autoblock in the future.
  • dogscatstrees 43 minutes ago
    The main problem with these SQL calculations is that they are deterministic shortcuts for a probabilistic problem. Fraud is not usually a “true because rule X matched.” It is more like "what is the probability this is fraudulent"? SQL patterns are useful, but they are blunt instruments. I really don't think banks use deterministic heuristics but more data science stuff.
  • 0cf8612b2e1e 1 hour ago

      If a card swipes in Chicago and seven minutes later swipes in Los Angeles, one of those swipes is fake.
    
    How does this work with online shopping? When I am sitting on the couch and buy from Amazon, where does the address get registered?

    Can also imagine an edge case: couple shares an online account, one is traveling and purchases with the saved card details.

    • teraflop 1 hour ago
      Swiping a card (or inserting, or tapping) is a "card present" transaction. Online shopping, where you type in the card number, is a "card not present" transaction. Retailers and banks can tell the difference.
    • thedebuglife 1 hour ago
      They can tell based on transaction metadata. Source: I worked at a cc company
    • rootusrootus 1 hour ago
      I believe the system distinguishes between card present and card not present.
  • crmd 2 hours ago
    > Drawback: this doesn’t work until you have history. New accounts have no baseline.

    This is an underrated CX factor: If my card gets denied when i’m a new customer or exhibiting a new pattern, i’m impressed with their software.

    However if they deny a transaction where there is any previous history of me authenticating, then I’m frustrated by their naive paranoid algorithm.

  • maciekkmrk 1 hour ago
    What if I go on a roadtrip and suddenly get gas at 2am?
    • vesrah 54 minutes ago
      I had this happen once - I flew to a city about 8 hours of driving time away to buy a motorcycle and landed late in the evening. My card was declined when I got gas a little after midnight and I had no cash or other card with me so I called the 24 hour support line. I had a quick conversation with a support agent explaining that I was traveling and the card needed to be reactivated right away. Within five minutes the card was working and I was back to working my way down a long chain of mistakes.
  • sincerely 1 hour ago
    This is quite interesting, but the blatantly AI generated explanations are like an anti-signal for quality
  • themafia 58 minutes ago
    > If a card swipes in Chicago and seven minutes later swipes in Los Angeles, one of those swipes is fake. The card is cloned.

    Or, the cardholder is trying to do the cannonball run:

    https://www.youtube.com/shorts/Dx5WPNIEwiE

  • yieldcrv 23 minutes ago
    the real question is whether you would point hour agentic system at this blog post and create

    chargeback-mcp

    or would you turn it all into a markdown file and call it a skill?

  • achierius 1 hour ago
    This seems interesting, but has so many signs of AI writing that I worry it's not just edited but generated from whole cloth. Probably still a lot of truth in there but it does give me pause!

    > The roundness is the signal.

    > Slight pain, same result.

    to point at a few.

    • jorisnoo 54 minutes ago
      > Three filters. That’s it.

      And my favourite most hated pattern, the no no no:

      > Not machine learning, not graph databases, not whatever Gartner is hyping this year.