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 |
---|---|---|
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. | 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 - Evaluation data shared in this request is in multi part format. - false - Evaluation data share | true |
lastDropmandatory | String (true) - Always set to true (as of April 2025). Mandatory. | true |
messageTypeoptional | String (Alphanumeric) - Type of request message. Optional. | Auth_init |
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 |
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. Optional. | 9123456789 |
Custom parameters:
Trident supports any number of custom fields to be configured basis the use case.
Status update parameters
Parameter | Description | Example |
---|---|---|
action | String (3 digits) - Action taken by client. Optional. | 001 - Default action |
finalStatus | String (3 digits) - Final status of the transaction. Mandatory. | 100 - Transaction Success |
reason | String (3 digits) - Reason for failed transaction. Optional. | 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
Parameter | Description | Example |
---|---|---|
clientId | String (UUID) - Unique transaction ID generated by Trident for tracking purposes. | 201809_86642221-1801-49aa-ad12-c409c0317451 |
Sample response
{
"clientId": "201809_86642221-1801-49aa-ad12-c409c0317451"
}