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 |
---|---|---|
instanceId
|
| 8888 |
channelId
|
| 3DS |
async
|
| false |
details |
| true |
txnSourceType |
| Purchase |
partRequest |
| true |
lastDrop |
| true |
messageType |
| Auth_init |
acctNumber |
| 4346781238815413 |
txnTimestamp |
| 20231015123045 |
clientTxnRefId |
| TXN12345UNIQUE |
statusUpdate |
| |
Custom parameters | ||
merchantCountryCode |
| 356 |
purchaseAmount |
| 10000 |
ip |
| 172.27.0.1 or FE80:CD00::211E:729C |
cardType |
| Debit |
userAgent |
| Mozilla/5.0 (Windows NT 10.0; Win64) |
mobileNumber |
| 9123456789 |
Custom parameters:
Trident supports any number of custom fields to be configured basis the use case.
statusUpdate parameters
Parameter | Description | Example |
---|---|---|
action
|
| 001 - Default action |
finalStatus
|
| 100 - Transaction Success |
reason
|
| 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 |
| 172.31.2.145::8443 |
stepUp |
| true |
accID |
| 9801 7768 7865 7256 |
id |
| |
frictionLess |
| true |
observationSummary |
| 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_SUCCESS_INSTANCES_(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
}
]