Transactions
POST /analyze
Real-time scoring for a transaction
POST /analyze
{API_BASE} is https://sandbox-api.fraudeg.com/api or https://api.fraudeg.com/api, depending on
your environment. In production:
/analyze/sandbox. That path
is a mode, not the sandbox host.
Headers
Request
Required fields:
The canonical name is
payment_method. paymentInstrumentType is the same field under a different
name in the JSON. It accepts up to 50 characters; a longer value returns 422. See Payment methods and rails.
All other fields are optional. The full list is in Fields.
Response
decision.typeis the only actionable field — never act onrisk_score.- The catalog of
flags[].codelives in Flags catalog, not here. recommendationis a sentence in the company’s language. Don’t branch on it.
Errors
The public API error envelope is:error_code comes from the error codes catalog. The text
that tells one case from another is in details, not in message (message is the code’s generic
prose).
HTTP statuses for this endpoint
The two 409s
Same HTTP status, different details:
A
400, 403, or 422 means the request never got scored: nothing was persisted.
A 409 is different: the transaction may already be scored and stored.POST /analyze