AWS Builder Center

One signal should not stop a payment: how Lookout decides when to hold the money

Lookout holds a risky payment between approval and capture until someone the account holder trusts agrees. This is how its fixed score and its shown-versus-approved check decide when that happens.

Most payment scams do not look like fraud from the bank's side. The login is real, the account holder is the one pressing approve, and the money goes where they asked it to go. The problem is that somebody on the phone or in a text thread talked them into it.
Lookout is a practice wallet my teammate Takshi Savaliya and I built at a hackathon to work on that problem. A risky payment waits until someone the account holder trusts agrees to it. It runs on the PayPal sandbox, so no real money moves, but the payment goes through the same approve, authorize and capture steps a real checkout does.

Where the pause lives

Lookout sits between PayPal's approve step and the capture. Before the person pays, it writes down what they were shown: the amount, the payee, a hash of the page, and the message that led them there. After PayPal approval it authorizes the order, which holds the money without moving it, and then compares PayPal's facts with what was shown.
If those two disagree, the payment is held no matter what any score says. This matters more once an AI agent is paying on someone's behalf, since the agent's description of a payment and the payment itself can drift apart, and only the second one leaves the account.

A fixed score where one signal is never enough

The scam check adds up points from a fixed table. A new recipient is 15 points. A payment method that is hard to undo (wire, gift card, crypto or an instant transfer) is 15. Urgency is 10, a request for secrecy is 15, someone claiming authority is 10, and a threat or a reward is 15. A total from 0 to 39 lets the payment through, 40 to 69 asks the account holder to confirm, and 70 or more holds it for the trusted contact.
The largest single weight in the table is 25, so no one signal can even reach the confirm step. That was on purpose. Paying a new plumber is normal, and so is sending a gift card to a cousin. A scam shows up as a stack: a new recipient (15), paid in gift cards (15), with urgency (10), a request to keep it quiet (15), a caller who says they are from the IRS (10), and a threat of arrest (15). That adds up to 80, which is a hold.
The weights can be tuned per signal, but only downward. A configured weight is capped at the value in the table, so a bad config can make Lookout quieter but never more aggressive than the design.

Where the model fits

The words in a message are read by Gemini, or by a set of offline rules when no model is available. Either one turns the message into flags such as urgency, secrecy or an authority claim. The score, the thresholds and the decision to hold are plain code that the message cannot argue with.
Adding a new detector means adding one file that notices certain words and contributes one signal. It cannot hold a payment by itself, for the same reason no single signal can.

What the trusted contact sees

When a payment is held, the trusted contact sees PayPal's amount and payee, not the agent's or the caller's framing of it. Allow captures the money right away, confirm waits for the account holder, and hold waits for the contact. A denial, a cancel or a timeout voids the authorization, so the default outcome for a held payment is that nothing is captured.
Two smaller choices came from thinking about who else reads the data. Verification codes are removed from a message before anyone other than the account holder sees it, and the webhook route only accepts events signed with a certificate PayPal serves.

What I have not answered yet

The thresholds came from reasoning about scam scripts, not from real payment data, so I do not know Lookout's false hold rate. A hold that fires too often teaches people to wave it through, which may be worse than having no hold at all. If you have worked on payment risk or fraud review, I would like to know how you chose the line between confirm and hold, and whether you tuned it per person or across everyone.
The code is on GitHub at anudeep-bonagiri/Lookout.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article