Skip to main content

Running alongside your current provider

Before you switch, you can run Defraudo next to the antifraud system you use today. You keep acting on your current provider's verdict, send the same events to Defraudo with that verdict attached, and compare the two decisions on your own traffic. This is optional: an event without the field is scored exactly as before.

Send the verdict​

Add external_decision to the event body: allow, review or block.

{
"event_id": "0192f3c4-8b7a-7c3e-9d21-5f6a7b8c9d0e",
"event_type": "deposit",
"async": true,
"external_account_id": "user-123",
"external_decision": "block",
"context": { "ip": "203.0.113.9", "platform": "web", "fp_id": "fp_..." }
}
  • The value is stored next to our decision and compared with it. It never reaches the rules and never changes the Defraudo decision.
  • Any other value is refused with 400.
  • Map your provider's outcomes onto the three values.

Order the calls​

  1. Call your current provider and act on its verdict, as today.
  2. Send the event to Defraudo with async: true and the verdict in external_decision, from a background job with retries.

async: true removes the wait for scoring, not for intake, so keep the Defraudo call out of the path that decides the payment while you are still in the comparison period.

Retries​

A resend with the same event_id and the same body is an idempotent retry. A resend whose external_decision differs from the first one, or adds it to an event first sent without it, is refused with 409 EVENT_ID_CONFLICT and the first write stands. Send the verdict with the first call.

How events compare​

Each event falls into one of four states:

StateMeaning
not_providedNo external_decision was sent.
pendingThe verdict was sent, Defraudo has not finished scoring yet.
matchBoth systems gave the same decision.
mismatchThe decisions differ.

The comparison uses the decision in force: the last manual change by an analyst, else the decision of a resolved case, else the decision Defraudo gave when it scored the event.