Analyze and Update Status API

This API combines the functionality of both the Analyze 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 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

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.

Status update parameters

Parameter

Description

Example

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

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

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

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"
  },
  "exceptions": []
}