Analyse and Update Status API

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

ParameterDescriptionExample
instanceId
mandatory
String (4 digits) - Trident instance identifier that identifies the instance setup to analyze risk for a particular client.8888
channelId
mandatory
String (Alphanumeric) - Transaction channel ID.3DS
async
mandatory
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
details
mandatory
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.
true
txnSourceType
mandatory
String (Alphanumeric) - Type of transaction source.Purchase
partRequest
mandatory
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 share in this request is not multi part format.
true
lastDrop
mandatory
String (true) - Always set to true (as of April 2025).true
messageType
optional
String (Alphanumeric) - Type of request message.Auth_init
acctNumber
mandatory
String (Alphanumeric) - Primary user/customer identifier (for example, card number or account number).4346781238815413
txnTimestamp
mandatory
String (yyyyMMddHHmmss) - UTC timestamp of the transaction.20231015123045
clientTxnRefId
mandatory
String (Alphanumeric) - Unique ID for the transaction created by the calling application.TXN12345UNIQUE
statusUpdateJSON object - Contains the status details. For information refer to statusUpdate parameters.
Custom parameters
merchantCountryCode
custom
String (3-digit numeric code) - Merchant's country code in numeric format.356
purchaseAmount
custom
String (Amount in minor unit) - Purchase amount expressed in minor units (all punctuation removed).10000
ip
custom
String (IPV4 or IPV6) - Customer's IP address.172.27.0.1 or FE80:CD00::211E:729C
cardType
custom
String (Alphanumeric) - Type of card (e.g., Credit or Debit).Debit
userAgent
custom
String - Exact User-Agent header from customer's browser.Mozilla/5.0 (Windows NT 10.0; Win64)
mobileNumber
custom
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

ParameterDescriptionExample
action
optional
String (3 digits) - Action taken by client.001 - Default action
finalStatus
mandatory
String (3 digits) - Final status of the transaction.100 - Transaction Success
reason
optional
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

ParameterDescriptionExample
nodeIDString - Server node identifier that processed the request.172.31.2.145::8443
stepUpString (true/false) - Indicates if additional authentication is recommended.true
accIDString - Unique identifier associated with the transaction eg. 3DS is 16 digit Card Number9801 7768 7865 7256
idString - Transaction identifier (typically matches clientId)
frictionLessString (true/false) - Indicates if the transaction requires/does not require an additional factor of authentication.true
observationSummaryObject - 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

ParameterDescriptionExample
ruleRatingInteger - Total risk score for the transaction. Higher scores indicate higher risk.60
clientIdString (UUID) - Unique transaction ID generated by Trident for tracking purposes.201809_86642221-1801-49aa-ad12-c409c0317451
ruleSuggestionString - Trident's risk suggestion based on the risk evaluation table configured for the calling application.ACCEPT
stepUpString (true/false) - Indicates if additional authentication is recommended.true
NodeIdString - Server node identifier that processed the request.172.31.2.145::8443
frictionLessString (true/false) - Indicates if the transaction requires/does not require an additional factor of authentication.false
observationsObject - 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

FieldDescriptionExample
ruleNameThe name of the rule which was executed3DS023
ruleIdThe unique rule identifierRULE::1777::3DS::1707280384671
ruleAliasNameAlias to the rule with a rule nameFirstTimeMerchant
descriptionThe description of the configured ruleFirst ever transaction on Merchant id from card.
ratingAddedThe rule score being added to the overall score. This rule rating will be weighed by the exemption weight applied from rule exemption.30
requestIddeprecated1
startTimeThe rule execution end time. This is in Unix time format.1748511188668
endTimeThe rule execution start time. This is in Unix time format.1748511188669
estimatedTimeTakenThe estimated time taken in executing the rule1
observationThe output of the rule execution whether it has been triggered or not.'merchantId' COUNT_PAST_SUCCESS_INSTANCES_PRIMARY_ID 'cardNo|==\0' = true
analyzedData
analyzedDataThis 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
clientIdString (UUID) - Unique transaction ID generated by Trident for tracking purposes.20250529150308_1777_3DS_1b7f16bf-42c8-4982-831b-47243e9afa05
commentDeprecated
falseAlarmDeprecated
exceptionCaseThis 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
modeIdentifies 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 transaction1
instanceIdTrident instance identifier that identifies the instance setup to analyze risk for a particular client.1777
cardPrefixThe prefix of the card for issuer use cases9804
ttlThe time to live period of the observation0
timestampThe time stamp when the rule was triggered in server. This is in Unix format.1748511188668
exceptionDetailThe error code object is shownRule Not Executed correctly
methodTypeDeprecated
monthNameDeprecated
policyDecisionDeprecated
policyDecisionLevelDeprecated
authModeDeprecated
isHourIs the hourly rule appliedtrue/false
blockEntityListBlock - entity list in rule level/
entityBlockUptoentity block expiry in rule level6/6/2025 20:20
blockedRuleDeprecated
blockedUptoDeprecated
observationDataDeprecated

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
}
]