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
|
| 8888 |
channelId
|
| 3DS |
async
|
| false |
details |
| true |
txnSourceType |
| Purchase |
partRequest |
| true |
lastDrop |
| true |
messageType |
| Auth_init |
acctNumber |
| 4346781238815413 |
txnTimestamp |
| 20231015123045 |
clientTxnRefId |
| TXN12345UNIQUE |
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.
Status update 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 |
---|---|---|
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 |
When details = true
Parameter | Description | Example |
---|---|---|
ruleRating |
| 60 |
clientId |
| 201809_86642221-1801-49aa-ad12-c409c0317451 |
ruleSuggestion |
| ACCEPT |
stepUp |
| true |
NodeId |
| 172.31.2.145::8443 |
frictionLess |
| false |
observationSummary |
| "observationSummary": { "SB-MAX-AMT-RULE": "10", "SB-BLK-IP-RULE": "10" } |
exceptions |
| [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": []
}