Transaction processing (Risk-score). Single item

Process a single transaction for fraud detection and risk scoring. Returns a risk score and recommendation per payment gate.

How it works

This endpoint is the single entry point for both creating and updating transactions. The same method is used for the initial submission and all subsequent data/status updates.

Transaction identity

A transaction is uniquely identified by companyId (from auth context) + externalId (from the request body). Calling the endpoint again with the same externalId within the same company updates the existing transaction rather than creating a new one.

Status state machine

Transaction status is governed by a forward-only state machine: NEW -> PENDING -> ACCEPT / DECLINE.

Transition rules:

  • The PENDING step is optional: direct transitions NEW -> ACCEPT and NEW -> DECLINE are allowed.

Updating transaction data

When resubmitting with the same externalId (and a valid next status), most fields can be updated: amounts, card data, customer details, merchant info, address, cascade and gates, customData, browserData, etc.

Fields that are never updated (fixed at creation time):

  • dateStart - transaction start date
  • customerCompanyId - company-level customer binding
  • customerSystemId - system-level customer identifier

Typical usage flow:

  • Transaction arrives with status: NEW - the system creates a record and performs scoring.
  • After the payment outcome is known, an update is sent with status: ACCEPT or status: DECLINE - the system updates the record, recalculates the score, and records the final result.

Gate-level statuses

Each gate in the cascade has its own status (NEW, ACCEPT, DECLINE) and its own state machine: NEW -> ACCEPT or NEW -> DECLINE. A gate that has already transitioned from NEW to a final status cannot be changed again.
If a gate has status: DECLINE, the declineBy field becomes required and must specify the decline reason (BANK or SYSTEM). Optionally, errorReason can be provided with a more specific PROCESSING_ERROR-type code.

Concurrent request handling

Parallel requests for the same transaction (companyId + externalId) are serialized via a Redis mutex. If the transaction is currently being processed, a subsequent request waits in the queue. If the lock cannot be acquired within the timeout, an error is returned.

Automatic entity creation

During processing the system automatically creates related entities if they do not yet exist: Merchant, MerchantAccount, Cascade, Bank, Gate. If cascade is omitted from the request body, a default cascade is used. If gateList is empty, a default gate (default_zero_gate) is added automatically.

Scoring

Risk score is calculated per gate individually. There is no single aggregate score for the transaction - the response contains an array of results per gate with a breakdown by score generator type (basic, main). Every call (including updates) triggers a full score recalculation.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required
length ≥ 1

The transaction identifier in the client's system. It is unique within a single company in the antifraud system. This means that two transactions cannot be submitted with the same externalId

string
enum
required

The transaction status. Possible values: NEW (the transaction is not yet being processed), PENDING (the transaction is being processed), ACCEPT (the transaction was successfully completed), DECLINE (the transaction was rejected)

Allowed:
string
enum
required

The transaction type. Possible values: PAYMENT, WITHDRAW

Allowed:
string

Payment method information

string

Transaction description

date-time
required

The transaction start date

date-time

The transaction end date

string
required
length ≥ 3

The transaction currency

string
required
length ≥ 1

The transaction amount as a whole number of MINOR currency units — for example 12345 for 123.45 EUR, or 449000 for 4490 KZT. A fractional value such as "123.45" is rejected: it is not silently truncated. The amount converted to USD must not exceed 100000000 minor units (1 000 000 USD).

cascade
object
string
required
length ≥ 1

External merchant identifier. Will be created if it doesn't exist

string

Merchant name

string
required
length ≥ 1

External merchant account identifier. Will be created if it doesn't exist

string

Merchant account name

string

Customer's external identifier

string

MCC identifier

string

Merchant order ID

string

Processing order ID

string

External order ID

string

Retrieval Reference Number

boolean

Flag indicating the customer's first transaction

string

Link to redirect the user to after a successful payment

string

Link to redirect the user to after a payment is canceled

string

Customer's fingerprint

string

Customer's email

string

Customer's phone number

string

Customer's phone country code

string

Customer's date of birth

string

Number of customer's withdrawals

string

Number of customer's deposits

boolean

KYC passed indicator

date-time

Customer's registration date

date-time

Customer's last login date

string

Card token

string

GCC tokenized card token for Smart Payments generated-card check

string

GCC session token for Smart Payments generated-card check

string

Card BIN

string

Card country code

string
length between 4 and 4

Last 4 digits of card

string

Card expiration year and month

string

Cardholder's first and last name

string

Customer's IP address

string

The country code of the customer's IP address

string

The customer's time zone in UTC+4 format

string

The customer's full address

string

The first line of the address

string

The second line of the address

string

The customer's city

string

The customer's country

string

The customer's postal code

string

The customer's region

string

The customer's language code

customData
object

Arbitrary data in JSON format

browserData
object

The customer's browser data

integer
≥ 0

How long to wait (ms) for fingerprintExternal to be populated before giving up (0 = no wait). Overrides company settings value

demoMainScoreOverride
object

Demo-only: explicitly force (true) or suppress (false) MAIN score generators for this transaction

Headers
string
string
Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json