This API combines the functionality of both the Analyse and Update Transaction Status APIs, allowing clients to evaluate transaction risk and update transaction status in a single call.
HTTP Request
Endpoint URL Format: <domainname>/analyse/txnRequestAndUpdate
Endpoint Example URL:
http://127.0.0.1:8443/analyse/txnRequestAndUpdate
Method: POST
Content-Type: application/json
Request parameters
Analysis 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 |
detailsmandatory | String (true/false) - Request for a detailed result or just a summary. The values can be any of the following:
| true |
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 |
lastDropmandatory | String (true) - Always set to true (as of April 2025). | true |
messageTypeoptional | String (Alphanumeric) - Type of request message. | Auth_init |
acctNumbermandatory | String (Alphanumeric) - Primary user/customer identifier (for example, card number or account number). | 4346781238815413 |
txnTimestampmandatory | String (yyyyMMddHHmmss) - UTC timestamp of the transaction. | 20231015123045 |
clientTxnRefIdmandatory | String (Alphanumeric) - Unique ID for the transaction created by the calling application. | TXN12345UNIQUE |
| statusUpdate | JSON object - Contains the status details. For information refer to statusUpdate parameters. | |
| Custom parameters | ||
merchantCountryCodecustom | String (3-digit numeric code) - Merchant's country code in numeric format. | 356 |
purchaseAmountcustom | String (Amount in minor unit) - Purchase amount expressed in minor units (all punctuation removed). | 10000 |
ipcustom | String (IPV4 or IPV6) - Customer's IP address. | 172.27.0.1 or FE80:CD00::211E:729C |
cardTypecustom | String (Alphanumeric) - Type of card (e.g., Credit or Debit). | Debit |
userAgentcustom | String - Exact User-Agent header from customer's browser. | Mozilla/5.0 (Windows NT 10.0; Win64) |
mobileNumbercustom | String (Numeric) - Customer's mobile number. . | 9123456789 |
Custom parameters:Trident supports any number of custom fields to be configured basis the use case.
statusUpdate parameters
| Parameter | Description | Example |
|---|---|---|
actionoptional | String (3 digits) - Action taken by client. | 001 - Default action |
finalStatusmandatory | String (3 digits) - Final status of the transaction. | 100 - Transaction Success |
reasonoptional | String (3 digits) - Reason for failed transaction. | 004 - User Decline |
Sample request
curl -X POST "http://127.0.0.1:8443/analyse/txnRequestAndUpdate" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"instanceId": "1999",
"channelId": "POS",
"async": "false",
"details": "true",
"txnSourceType": "POS",
"partRequest": "true",
"lastDrop": "true",
"acctNumber": "9123456789120001",
"deviceId": "MH100001",
"merchantName": "DAMODAR FILLING STATIO ",
"purchaseAmount": "500000",
"purchaseDate": "20220416",
"messageType": "POS_Purchase",
"merchantCity": "ANGUL",
"merchantCountry": "ORIN",
"merchantId": "12345678",
"mcc": "4722",
"ip": "71.140.200.0",
"purchaseCurrencyCode": "356",
"terminalid": "MH103361",
"merchantZip": "757576",
"merchanttype": "Retail",
"RRN": "218718124894",
"txntype": "Sales",
"posEntryMode": "051",
"fallbackstatus": "No",
"rc": "00",
"tt": "00",
"authCode": "07871D",
"cardType": "INTERNATIONAL/DOMESTIC",
"reasonCode": "250 characters",
"plasticType": "EMV/NON EMV",
"interchange": "Visa/MasterCard etc.",
"creditDebit": "Credit or Debit",
"issuingBank": "Bank Name",
"merchantAverageTicket": "123456",
"accountType": "State Bank of India",
"merchantLocation": "AKBAR TRAVELS OF INDIA MUMBAI",
"txntimeStamp": "23-10-2023 12:00:00",
"status": {
"finalStatus": "100",
"action": "001",
"challengeType": "002",
"reason": "014"
}
}'
Response parameters
When details = false
| Parameter | Description | Example |
|---|---|---|
| nodeID | String - Server node identifier that processed the request. | 172.31.2.145::8443 |
| stepUp | String (true/false) - Indicates if additional authentication is recommended. | true |
| accID | String - Unique identifier associated with the transaction eg. 3DS is 16 digit Card Number | 9801 7768 7865 7256 |
| id | String - Transaction identifier (typically matches clientId) | |
| frictionLess | String (true/false) - Indicates if the transaction requires/does not require an additional factor of authentication. | true |
| observationSummary | Object - Contains pairs of triggered rules along with their corresponding scores in a key-value format. For more information, refer to observationSummary JSON object .Note: The key-value pair in this JSON object are rules and respective score which was applied for the specific transaction. Hence, the list of key-value pairs are dynamic and will be different for each transaction. | Refer object |
observationSummary JSON object
Sample object
"observationSummary": {
"tw": "1000",
"TRID-59RULE1": "-250",
"RULEPOS14": "-125",
"RULEPOS4-1": "-100",
"SAMPLERULE1": "600",
"TRID2330-30DAYS": "-80",
"RULEPOS4-6": "-100",
"RULEPOS4-5": "-100",
"TRID-2330RULE1--CURRENTDAY": "-80",
"TESTRULE": "-100",
"sessionStorage": "99",
"TESTRULEGP1": "-80",
"PURCHASEAMOUNTRULE": "990",
"RULEPOS22233": "-100",
"TRID94SUCCESSFAILURE": "1000",
"POS14ManualKEYEntryOnRetailMerchants": "-125",
"NODECIMALSUCCESSRULE5": "-100",
"NODECIMALSUCCESSRULE4": "-100",
"POS2ValueOfPurchasetransactionexceedsaverage": "-100",
"NODECIMALFAILURERULE5": "-100",
"NODECIMALFAILURERULE4": "-100",
"Rule1": "-1",
"TEST-AUTO-BLOCK-01": "33",
"TRID-94RULEPOS2": "-188",
"RRNSUCCESSSALES1LTEQ": "-20",
"TRID-94ALL": "-188",
"TRID-94SUCCESS": "-188",
"TRID233015DAYS": "-80"
}
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. | 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 |
| observations | Object - Gives the observation summary. Contains an array object of all the rules executed for the transaction, where each object details a particular rule which was executed. This is in key-value format. For more information, refer to observations JSON object. | Refer to observations JSON object . |
observations JSON object
Sample JSON object
"observations": [
{
"ratingAdded": -250,
"requestId": "1",
"ruleName": "TRID-59RULE1",
"ruleId": "RULE::1999::POS::1656676783200",
"observation": "'merchantId' COUNT_ALL_PAST_INSTANCES_DAY '<=|5|2' = true ",
"analyzedData": "",
"clientId": "20250610111923_1999_POS_05ae842a-0b49-4bfd-a10b-2b6a1467eb58",
"comment": null,
"falseAlarm": null,
"exceptionCase": 0,
"startTime": 1749534563921,
"endTime": 1749534563929,
"mode": 1,
"instanceId": "1999",
"cardPrefix": null,
"ttl": 0,
"timestamp": null,
"exceptionDetail": null,
"methodType": "",
"monthName": "",
"ruleAliasName": "TRID-59RULE1",
"description": "testing",
"policyDecision": null,
"policyDecisionLevel": null,
"authMode": null,
"observationData": {
"total": 0
}
"isHour": null,
"blockEntityList": "",
"entityBlockUpto": null,
"blockedRule": false,
"extimatedTimeTaken": 8
}
]
Field Descriptions
| Field | Description | Example |
|---|---|---|
| ruleName | The name of the rule which was executed | 3DS023 |
| ruleId | The unique rule identifier | RULE::1777::3DS::1707280384671 |
| ruleAliasName | Alias to the rule with a rule name | FirstTimeMerchant |
| description | The description of the configured rule | First ever transaction on Merchant id from card. |
| ratingAdded | The rule score being added to the overall score. This rule rating will be weighed by the exemption weight applied from rule exemption. | 30 |
| requestId | deprecated | 1 |
| startTime | The rule execution end time. This is in Unix time format. | 1748511188668 |
| endTime | The rule execution start time. This is in Unix time format. | 1748511188669 |
| estimatedTimeTaken | The estimated time taken in executing the rule | 1 |
| observation | The output of the rule execution whether it has been triggered or not. | 'merchantId' COUNT_PAST_SUCCESS_INSTANCES_PRIMARY_ID 'cardNo|==\0' = true analyzedData |
| analyzedData | This parameter will be dependent on the rule operator being used. If analyze Data is available in the operator then the running value of the count/sum will be shown. | COUNT_PAST_SUCCESSINSTANCES(cardNo)= :0 |
| clientId | String (UUID) - Unique transaction ID generated by Trident for tracking purposes. | 20250529150308_1777_3DS_1b7f16bf-42c8-4982-831b-47243e9afa05 |
| comment | Deprecated | |
| falseAlarm | Deprecated | |
| exceptionCase | This flag identifies whether the rule was exempted by using rule exemptions. If the flag 1 then the rule is exempted or if the flag is 0 there is no rule exemption. | 0 |
| mode | Identifies whether the rule is running in Live(1) or Test(0)mode. Only scores of live rules are considered for total risk score of the transaction | 1 |
| instanceId | Trident instance identifier that identifies the instance setup to analyze risk for a particular client. | 1777 |
| cardPrefix | The prefix of the card for issuer use cases | 9804 |
| ttl | The time to live period of the observation | 0 |
| timestamp | The time stamp when the rule was triggered in server. This is in Unix format. | 1748511188668 |
| exceptionDetail | The error code object is shown | Rule Not Executed correctly |
| methodType | Deprecated | |
| monthName | Deprecated | |
| policyDecision | Deprecated | |
| policyDecisionLevel | Deprecated | |
| authMode | Deprecated | |
| isHour | Is the hourly rule applied | true/false |
| blockEntityList | Block - entity list in rule level/ | |
| entityBlockUpto | entity block expiry in rule level | 6/6/2025 20:20 |
| blockedRule | Deprecated | |
| blockedUpto | Deprecated | |
| observationData | Deprecated |
Sample response
When details=false
{
"nodeId": "node-n1",
"clientId": "20250610114309_1999_POS_4673d27f-f95b-4bd8-8e98-3cde4806e1d9",
"ruleRating": 299,
"ruleSuggestion": "OTHERS",
"stepUp": "true",
"accId": "null",
"id": "20250610114309_1999_POS_4673d27f-f95b-4bd8-8e98-3cde4806e1d9",
"frictionLess": "false",
"observationSummary": {
"tw": "1000",
"TRID-59RULE1": "-250",
"RULEPOS14": "-125",
"RULEPOS4-1": "-100",
"SAMPLERULE1": "600",
"TRID2330-30DAYS": "-80",
"RULEPOS4-6": "-100",
"RULEPOS4-5": "-100",
"TRID-2330RULE1--CURRENTDAY": "-80",
"TESTRULE": "-100",
"sessionStorage": "99",
"TESTRULEGP1": "-80",
"PURCHASEAMOUNTRULE": "990",
"RULEPOS22233": "-100",
"TRID94SUCCESSFAILURE": "1000",
"POS14ManualKEYEntryOnRetailMerchants": "-125",
"NODECIMALSUCCESSRULE5": "-100",
"NODECIMALSUCCESSRULE4": "-100",
"POS2ValueOfPurchasetransactionexceedsaverage": "-100",
"NODECIMALFAILURERULE5": "-100",
"NODECIMALFAILURERULE4": "-100",
"Rule1": "-1",
"TEST-AUTO-BLOCK-01": "33",
"TRID-94RULEPOS2": "-188",
"RRNSUCCESSSALES1LTEQ": "-20",
"TRID-94ALL": "-188",
"TRID-94SUCCESS": "-188",
"TRID233015DAYS": "-80"
}
}
When details=true
{
"nodeId": "node-n1",
"clientId": "20250610111923_1999_POS_05ae842a-0b49-4bfd-a10b-2b6a1467eb58",
"ruleRating": 399,
"ruleSuggestion": "OTHERS",
"stepUp": "true",
"accId": "null",
"id": "20250610111923_1999_POS_05ae842a-0b49-4bfd-a10b-2b6a1467eb58",
"frictionLess": "false",
"observations": [
{
"ratingAdded": -250,
"requestId": "1",
"ruleName": "TRID-59RULE1",
"ruleId": "RULE::1999::POS::1656676783200",
"observation": "'merchantId' COUNT_ALL_PAST_INSTANCES_DAY '<=|5|2' = true ",
"analyzedData": "",
"clientId": "20250610111923_1999_POS_05ae842a-0b49-4bfd-a10b-2b6a1467eb58",
"comment": null,
"falseAlarm": null,
"exceptionCase": 0,
"startTime": 1749534563921,
"endTime": 1749534563929,
"mode": 1,
"instanceId": "1999",
"cardPrefix": null,
"ttl": 0,
"timestamp": null,
"exceptionDetail": null,
"methodType": "",
"monthName": "",
"ruleAliasName": "TRID-59RULE1",
"description": "testing",
"policyDecision": null,
"policyDecisionLevel": null,
"authMode": null,
"observationData": {
"total": 0
}
"isHour": null,
"blockEntityList": "",
"entityBlockUpto": null,
"blockedRule": false,
"extimatedTimeTaken": 8
}
]