Skip to main content
The Transactions API is the core of AntifraudAI. Use it to submit payment transactions for real-time fraud screening and to retrieve the results of previous screenings. Screening is synchronous — the response includes the risk score and decision immediately, with no polling required.

POST /transactions/screen

Submit a transaction for real-time fraud screening. The response includes a risk score (0–100), a decision (allow, review, or block), and an array of the risk signals that contributed to the score.

Request Parameters

string
required
Your internal identifier for the user initiating the transaction. This is used to build the user’s risk profile over time.
number
required
The transaction amount in the currency specified by currency. Must be a positive number (e.g., 349.00).
string
required
ISO 4217 three-letter currency code for the transaction amount (e.g., USD, EUR, GBP).
string
IPv4 or IPv6 address of the user at the time of the transaction. Providing this field significantly improves fraud detection accuracy by enabling geo-velocity and proxy detection signals.
string
Device fingerprint token generated by the AntifraudAI JavaScript SDK. Enables device-level risk signals such as known fraudulent devices and device switching.
string
The payment method used for this transaction. Accepted values: card, bank, wallet, crypto.
object
The billing address associated with the payment method. Providing this enables address verification signals.
object
A flat key-value map of custom attributes to attach to this transaction. Use this to pass context such as order IDs, product categories, or channel identifiers. Values must be strings.

Response Fields

string
Unique identifier for this screening result. Use this ID to retrieve the result later via GET /transactions/{id}.
integer
Risk score from 0 (no risk) to 100 (highest risk). Scores are calculated synchronously using AntifraudAI’s ML models and rule engine.
string
The recommended action for this transaction. One of:
  • allow — low risk; proceed normally
  • review — elevated risk; a case is automatically created for manual review
  • block — high risk; decline the transaction
array of strings
List of active risk signals that contributed to the score, e.g. ["velocity_spike", "ip_mismatch", "card_testing_pattern"].
string
ISO 8601 UTC timestamp of when the screening was performed.
Example response:

GET /transactions/

Retrieve the screening result for a previously submitted transaction by its ID.
string
required
The transaction_id returned from the POST /transactions/screen response.
cURL
The response contains the same fields as the POST /transactions/screen response.
Screening results are retained for 90 days. Requests for transactions older than 90 days will return a 404 not_found error.