Trident's Analyze API is used to perform Risk analysis using the data, that is, transaction and user profile details shared by the Calling application.
Endpoint
Endpoint URL Format: <domainname>/analyse/request
Example Endpoint URL:
http://127.0.0.1:8443/analyse/request
Method: POST
Content-Type: application/json
Request Parameters
Parameter | Description | Example |
---|---|---|
instanceIdmandatory | String (4 digits) - Trident instance identifier that identifies the instance setup to analyze risk for a particular client. | 8888 |
channelIdmandatory | String (Alphanumeric) - Transaction channel ID. | 3DS |
asyncmandatory | String (true/false) - Determines communication mode. The values can be any of the following:- false (default): Analyze API is working in synchronous mode. Calling application must wait for the response from Trident. - true: Analyze API is working in asynchronous mode. Trident can process multiple requests at the same time. This allows time-consuming requests to be processed in the background while smaller requests are serviced immediately. | false |
detailsmandatory | String (true/false) - Request for a detailed result or just a summary. The values can be any of the following:- true - Trident is requested to provide a detailed risk analysis result. - false (default): - Trident is requested to provide a summarized risk analysis result. For the list of response parameters for each of this scenario, refer to following sub-sections under Response parameters: - When details = false - When details = true | false |
txnSourceTypemandatory | String (Alphanumeric) - Type of transaction source. | Purchase |
partRequestmandatory | String (true/false) - Whether full evaluation data in this request (or part). The values can be any of the following:- true - Evaluation data shared in this request is in multi part format. - false - Evaluation data shared in this request is not in multi part format. | true |
lastDropmandatory | String (true) - Always set to true (as of April 2025). | true |
acctNumbermandatory | String (Alphanumeric) - Primary user/customer identifier (e.g., card number or account number). | 4346781238815413 |
txnTimestampmandatory | String (yyyyMMddHHmmss) - UTC timestamp of the transaction. Mandatory. | 20231015123045 |
clientTxnRefIdmandatory | String (Alphanumeric) - Unique ID for the transaction created by the calling application. | TXN12345UNIQUE |
purchaseAmountmandatory | String (Amount in minor unit) - Purchase amount present in the transaction request expressed in minor unit/implied decimal format. For example, a purchase amount of one hundred is expressed as 10000. | 10000 |
Custom parameters | ||
messageTypeoptional | String (Alphanumeric) - Type of request message. Optional. | Auth_init |
merchantCountryCodeoptional | String (3-digit numeric code) - Merchant's country code in numeric format. | 356 |
ipoptional | String (IPV4 or IPV6) - Customer's IP address. | 172.27.0.1 or FE80:CD00::211E:729C |
cardTypeoptional | String (Alphanumeric) - Type of card (e.g., Credit or Debit). | Debit |
userAgentoptional | String - Exact User-Agent header from customer's browser. Optional. | Mozilla/5.0 (Windows NT 10.0; Win64) |
mobileNumberoptional | String (Numeric) - Customer's mobile number. | 9123456789 |
Custom parameters:
Trident supports any number of custom fields to be configured basis the use case.
Sample request
curl -X POST "http://127.0.0.1:8443/analyse/request" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"instanceId": "8888",
"channelId": "3DS",
"async": "false",
"details": "true",
"txnSourceType": "Purchase",
"partRequest": "true",
"lastDrop": "true",
"acctNumber": "4346781238815413",
"txnTimestamp": "20231015123045",
"ip": "172.27.0.1",
"merchantCountryCode": "356",
"purchaseAmount": "10000",
"cardType": "Debit",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"mobileNumber": "9123456789",
"clientTxnRefId": "TXN12345UNIQUE"
}'
Response parameters
When details = false
Parameter | Description | Example |
---|---|---|
ruleRating | Integer - Total risk score for the transaction. Higher scores indicate higher risk. | 60 |
clientId | String (UUID) - Unique transaction ID generated by Trident for tracking purposes. | 201809_86642221-1801-49aa-ad12-c409c0317451 |
ruleSuggestion | String - Trident's risk suggestion based on the risk evaluation table configured for the calling application. It can be any of the following:- ACCEPT - DECLINE | ACCEPT |
stepUp | String (true/false) - Indicates if additional authentication is recommended. | true |
When details = true
Parameter | Description | Example |
---|---|---|
ruleRating | Integer - Total risk score for the transaction. Higher scores indicate higher risk. | 60 |
clientId | String (UUID) - Unique transaction ID generated by Trident for tracking purposes. | 201809_86642221-1801-49aa-ad12-c409c0317451 |
ruleSuggestion | String - Trident's risk suggestion based on the risk evaluation table configured for the calling application. It can be any of the following:- ACCEPT - DECLINE | ACCEPT |
stepUp | String (true/false) - Indicates if additional authentication is recommended. | true |
NodeId | String - Server node identifier that processed the request. | 172.31.2.145::8443 |
frictionLess | String (true/false) - Indicates if the transaction requires/does not require an additional factor of authentication. | false |
observationSummary | Object - Contains pairs of triggered rules along with their corresponding scores in a key-value format. Eg. Triggered rules are are SB-MAX-AMT-RULE & SB-BLK-IP-RULE along with scores of 10 & 10. | "observationSummary": { "SB-MAX-AMT-RULE": "10", "SB-BLK-IP-RULE": "10" } |
elapsedTime | Integer - Time taken (in milliseconds) to process the request. | 250 |
exceptions | Array - List of exceptions encountered during processing, if any. | [401 501] |
Sample response
{
"ruleRating": 60,
"clientId": "201809_86642221-1801-49aa-ad12-c409c0317451",
"ruleSuggestion": "ACCEPT",
"stepUp": "true",
"NodeId": "172.31.2.145::8443",
"frictionLess": "false",
"observationSummary": {
"SB-MAX-AMT-RULE": "10",
"SB-BLK-IP-RULE": "10"
},
"elapsedTime": 250,
"exceptions": []
}