Skip to main content
Every payment or user-initiated event in your system can be screened against AntifraudAI’s ML engine before it’s processed. Within milliseconds, AntifraudAI returns a risk score (0–100) and a decision — allow, review, or block — so your application can act immediately. This guide walks you through the full flow from building a request to handling each outcome.
1

Prepare your transaction data

Gather the following fields before calling the API. Richer input data leads to more accurate scoring — include as many fields as your stack can provide.
The device_fingerprint field is optional but strongly recommended. Transactions submitted without it cannot benefit from device-based velocity and anomaly signals.
2

Call POST /transactions/screen

Submit the transaction payload to the screening endpoint. Use your live API key for production traffic and your sandbox key for testing.
3

Handle the response

A successful screening returns HTTP 200 with the following JSON body:
4

Act on the decision

Branch your application logic on the decision field returned in the response.
The transaction passed screening. Proceed normally — complete the payment, fulfil the order, or grant access.
Python
5

Retrieve transaction details later

You can fetch the full details of any previously screened transaction using its transaction_id.
Decisions returned at screening time are final for that transaction record. To change an outcome — for example, to approve a transaction that was flagged for review — use the Cases API to resolve the associated case. Resolving a case does not retroactively alter the original decision field but does update the case status and can trigger downstream webhooks.

Manage Cases

Review and resolve fraud cases that are created when a transaction decision is review.

Risk Scoring

Understand how AntifraudAI calculates risk scores and what each signal means.