Where to place collect
Hang the browser widget on pages where a real human commits identity or money.
Collect is cheap; assess credits only when your server calls /v1/assess.
Rule of thumb
One page = one form selector (or one manual
Frod.collect).
Always pass a stable user_id on assess so memory (profile / dossier) works.
No third-party product names required — any HTML form or SPA submit works.
Signup / registration
Best first hang. Builds the dossier while the account is new.
- Form: email + password (or magic link confirm page).
- Watch mode:
new_only(First-sync) orcontinuousif you also score later logins. - Assess on successful create — before welcome email / free trial starts if abuse is expensive.
FX.auto({
publishableKey: "fk_pk_…",
form: "#signup", // your register form
mode: "full",
progressive: true
});
Login / session resume
Catch account takeover after a clean signup. Same user_id as signup.
- Hang collect on the login form (and SSO callback page if you have one).
- Prefer
watch_mode: "continuous"on assess. - On
challenge→ MFA / email code; onblock→ hold + support review.
Trial start / plan upgrade
Freemium and “start trial” buttons are high-abuse surfaces even without a card.
- Collect on the trial CTA page or modal form.
- Assess when the trial actually activates (server), not on every page view.
- Policy tip: Soft preset is fine for free trials; switch Strict when a paid plan or payout unlocks.
- Context:
"context": { "flow": "trial_start" }so logs and webhooks stay readable.
POST /v1/assess
{
"session_id": "ses_…",
"user_id": "usr_123",
"email": "user@example.com",
"watch_mode": "new_only",
"policy": "soft",
"context": { "flow": "trial_start" }
}
Checkout / add payment / payout
Money movement — hang collect on the payment step, not only the cart.
- Card add, first charge, gift-card buy, withdrawal / payout request.
- Assess immediately before capture / payout queue.
- Policy: Strict bands + optional hard-relay block rule (see Decision policy).
- Context examples:
checkout,add_card,payout.
Password reset / email change / 2FA change
Classic ATO paths. Collect + continuous assess with the same user_id.
- If score drops vs baseline → challenge even if password reset “succeeded”.
- Do not hang collect on marketing pages — wastes nothing in credits, but adds noise.
Minimal hang pattern
<!-- Any sensitive form -->
<form id="risk-form">…</form>
<script src="https://fraudlens.io/c.js" async></script>
<script>
FX.auto({
publishableKey: "fk_pk_…",
form: "#risk-form",
mode: "full",
progressive: true
});
// FX and Frod are the same API surface
</script>
# server — after form submit, read hidden frod_session_id
curl -sS -X POST https://fraudlens.io/v1/assess \
-H "X-Api-Key: fk_sk_…" \
-H "Content-Type: application/json" \
-d '{
"session_id": "ses_…",
"email": "user@shop.com",
"user_id": "usr_123",
"watch_mode": "new_only",
"context": { "flow": "signup" }
}'
# → score, action, reasons[], billing, dossier, profile, support
Full embed: Browser embed · response: Assess response · mailbox-only: Mailbox reputation · support: Support & lookup.