Gift cards for the people who own them.
Attackers guess and check gift card numbers, then drain the balances. Spot the one visitor behind thousands of balance checks.
SignalsvelocitydatacenterIpbot
Step 3 of 3velocity: eventsPerVisitor5mBlock
•••• 8812ValidAllow
•••• 0001InvalidChallenge
•••• 0002InvalidBlock
events per visitor, 5 min threshold
How it plays out
The attack, what the verified event shows, and what your code does about it.
01 · The attack
How it usually goes
- Balance checkingScripts trying card numbers in bulk.
- Fast redemptionFound balances drained in minutes.
- Hosting IPsChecks run from rented servers.
02 · What Trace sees
Fields on the verified event
- velocityMany checks from one visitor.
"velocity": { "detected": true, "details": { "exceeded": ["eventsPerVisitor5m"] }} - datacenterIpChecks from cloud servers.
"datacenterIp": { "detected": true } - botAutomated forms.
"bot": { "detected": true }
03 · What you do
Decide, with your own thresholds
- AllowOwner checking a balance
- ChallengeSame visitor, new card
- Blockvelocity: eventsPerVisitor5m
Decision lab
Switch signals on and off. The score is a plain sum of weights.
Signals
Weights are the defaults in scoring.default.json. The cut-offs at 25 and 60 are examples; your app sets its own.
20suspectScore / 100
AllowLet the action through.
20/ 100
reasons
velocity+20
Implementation
One browser call, one server check.
01IdentifyCall the SDK on the action and send the eventId with it.
02VerifyYour server reads the event with a secret key.
03DecideAllow, challenge or block, with your own thresholds.
identify.ts
const trace = createClient({ apiKey: 'pk_...', endpoint: 'https://id.example.com' });
// On the action (signup, login, checkout), then send eventId with the form.
const { eventId } = await trace.get();Example response, illustrative
{ "eventId": "evt_example"}Start in shadow mode. Block later.
Log the decision for a week, check who it would have stopped, then turn it on.