Skip to main content

Transactions

Transactions are the core data unit in PredictaID. They represent financial or interaction events that you want to analyze for risk.

Overview

When you send a Transaction to PredictaID, it passes through our Decision Engine. The engine evaluates the transaction against your configured Rules and RuleSets to assign a Risk Score.

Risk Levels

Each transaction is assigned a risk level based on its score (0-100):

  • LOW: Safe to proceed.
  • MEDIUM: Caution, might require step-up auth.
  • HIGH: Risky, manual review recommended.
  • CRITICAL: Block immediately.

Data Structure

A Transaction object contains:

  • Customer: Who is performing the action (Name, Document).
  • Amount & Currency: Value of the transaction.
  • Metadata: Custom fields (Device ID, IP Algorithm, etc.) used for advanced rules.

REST API

Create Transaction

Submit a new transaction for analysis.

Endpoint: POST /transactions
Content-Type: application/json Auth: x-client-id, x-client-secret

{
"id": "tx_unique_id_from_your_system", // Optional canonical ID
"customer": {
"id": "cust_123",
"name": "Customer Name",
"doc": "123.456.789-00"
},
"amount": 150.00,
"currency": "BRL",
"metadata": {
"device_id": "dev_abc",
"ip_address": "192.168.1.1"
}
}

Response

The API returns the created transaction with its initial status. Risk analysis is performed asynchronously in milliseconds.

{
"id": "TRX-123",
"status": "PENDING",
"riskScore": 85,
"riskLevel": "HIGH"
}

Note: Subscribe to the transaction.updated webhook to receive the final analysis result if it takes longer than the HTTP response time.