The short answer
AI helps detect payment fraud by giving each transaction a risk score based on the payer's history and behavior. Normal transactions go straight through, highly suspicious ones are stopped, and the ones in between go to a person for review. The hard part is not the algorithm. It is dealing with the fact that fraud is rare, that blocking good customers is also expensive, and that every automated decision needs an explanation.
Have you ever had your card declined while paying for an ordinary dinner, while someone else managed to push a strange purchase through in your name? Both mistakes come from the same system, tuned in different ways.
Why fraud is a hard problem for machines
One of the most widely used public datasets on the subject was assembled by researchers at the Université Libre de Bruxelles together with Worldline. It contains transactions made by European cardholders over two days in September 2013: 492 frauds out of 284,807 transactions, or 0.172% of the total.
Do the math. A model that answers "not fraud" to everything is right more than 99.8% of the time and does not catch a single fraud. That is why "accuracy" is the wrong metric for this problem. What matters is how many frauds the system catches, how many good customers it blocks by mistake, and how much each of those errors costs your business.
The same dataset carries another lesson. The original columns were transformed before publication, for confidentiality reasons. In real life, whoever builds the system has to decide which data to use and on what legal basis, and that decision comes before the model.
What a detection system does in practice
A serious fraud detection system usually has four layers:
- Clear rules. Limits anyone can understand, such as an amount far above the usual, many attempts in a row, or an account created minutes before the purchase.
- Risk score. A model that compares the transaction with the past behavior of that customer, that device and that type of purchase.
- Human review queue. Transactions in the gray zone go to someone who decides, with the reasons for the alert on screen.
- Feedback loop. Whatever review and disputes confirm as fraud, or as a false alarm, feeds the tuning of the rules and the model.
In the 2002 film Catch Me If You Can, Steven Spielberg tells the story of Frank Abagnale Jr., the con man who claimed to have passed millions in fake checks while posing as a Pan Am pilot. The irony is that the story itself was later disputed: US federal court records cited on Wikipedia show he cashed only 10 personal checks with a Pan Am logo, totaling less than 1,500 dollars. The lesson applies to fraud and to AI alike: an impressive number needs a source.
Pix changed the game
With Pix, Brazil's instant payment system, the money arrives immediately, and that changes how prevention has to be designed. Brazil's Central Bank created the Special Refund Mechanism, known as MED, which applies to well-founded suspicion of fraud and to operational failures. Since October 1, 2025, banks must offer a dispute button in their apps for cases of scams, fraud and coercion.
According to the Central Bank, once a dispute is filed, the information goes immediately to the scammer's bank, which must block the funds, if any remain. Banks have up to seven days to analyze it, and the refund can happen up to eleven days after the dispute. The deadline to dispute is up to 80 days. The Central Bank itself points out that MED is not a card chargeback: it does not cover commercial disagreements, regret, or a mistyped key.
For a business that gets paid via Pix, this means risk analysis has to happen before the product is delivered, and the records of each sale become evidence in a possible dispute.
Personal data and automated decisions
Brazil's data protection law, the LGPD, does not forbid using data to fight fraud, but it demands care. Article 7 allows processing to serve the controller's legitimate interests, as long as the data subject's rights do not prevail. Article 11 allows sensitive data to be processed without consent when it is indispensable for fraud prevention and the data subject's security, in identification and authentication processes for electronic accounts.
And Article 20 gives the data subject the right to request a review of decisions made solely on the basis of automated processing, as well as clear information about the criteria used. In practice, a system that blocks a customer without being able to say why is a technical and a legal problem at the same time.
Frequently asked questions
Do I need AI, or are rules enough? To start, well-designed rules solve a lot and are easy to explain. The risk model comes in once there is enough history of confirmed fraud to learn from.
Will AI block my good customers? It can, and that is why the cutoff threshold is a business decision, not just a technical one. The middle band should go to human review, and false alarms should feed back into tuning the system.
Does it work for a small business? Yes, as long as the scope matches the size of the problem: an alert dashboard, a few rules and a review queue already change a lot for anyone who gets paid via Pix or card.
Where DOUVRAS fits
DOUVRAS Labs builds custom software, such as dashboards and internal systems, and automations and integrations with logs, alerts and contingency plans. In a fraud detection project, that becomes integration with payment data, alert rules, a risk score, a human review queue and a record of every decision, with AI assistants only where they make sense and with defined limits.
We do not promise zero fraud or a magic accuracy rate. Every project starts with a diagnostic conversation that defines the problem, the available data, the evidence of completion and what is out of scope.
So in your business, what costs more today: the fraud that slips through, or the good customer who gets turned away?
Douglas Henrique, DOUVRAS Labs.
References
Dal Pozzolo, A.; Caelen, O.; Johnson, R. A.; Bontempi, G. Calibrating Probability with Undersampling for Unbalanced Classification. IEEE CIDM, 2015. creditcard dataset. openml.org
Banco Central do Brasil. Pix terá botão de contestação (Pix will have a dispute button), 2025. bcb.gov.br
Banco Central do Brasil. FAQ Participantes do Pix (MED). bcb.gov.br
Brazil. Law No. 13,709 of August 14, 2018 (LGPD), arts. 7, 11 and 20. planalto.gov.br
Catch Me If You Can (2002 film), Wikipedia. wikipedia.org
DOUVRAS Labs. Automation and integrations. douvras.com