Transactions

Retrieve a Transaction

GET

GET Transactions

/transactions endpoint allows you to operate on the Transaction entity.

Calling GET /transactions/{transactionId} will return the entire transaction payload and rule execution results for the transaction with the corresponding transactionId

Path parameters

transactionIdstringRequired
Unique Transaction Identifier

Response

This endpoint returns an object
executedRules
list of objects
Model for list of executed rules
hitRules
list of objects
Model for list of hit rules
status
enum
Model for rule action if a rule is hit. This is returned in the API response and can be configured on Console by operational accounts like a Compliance Analyst
Allowed values: ALLOWFLAGBLOCKSUSPEND
timestamp
double
Timestamp of when transaction took place
transactionId
string
Unique transaction identifier
type
enum
destinationAmountDetails
objectOptional
Model for transaction amount details
destinationDeviceData
objectOptional
Model for device data
destinationPaymentDetails
unionOptional
Payment details of the destination. It can be a bank account number, wallet ID, card fingerprint etc.
destinationUserId
stringOptional
UserId for transaction's destination. In other words, where the value is being transferred to.
originAmountDetails
objectOptional
Model for transaction amount details
originDeviceData
objectOptional
Model for device data
originPaymentDetails
unionOptional
Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
originUserId
stringOptional
UserId for where the transaction originates from
productType
stringOptional
Type of produce being used by the consumer (ex wallets, payments etc)
promotionCodeUsed
booleanOptional
Whether a promotion code was used or not the transaction
reference
stringOptional
Reference field for the transaction indicating the purpose of the transaction etc.
relatedTransactionIds
list of stringsOptional
IDs of transactions related to this transaction. Ex: refund, split bills
riskScoreDetails
objectOptional
tags
list of objectsOptional
Additional information that can be added via tags
transactionState
enumOptional
Model for transaction states. E.g. Processing, Refunded, Successful etc.

Errors

GET
1curl https://sandbox.api.flagright.com/transactions/transactionId \
2 -H "x-api-key: <apiKey>"
1{
2 "executedRules": [
3 {
4 "ruleInstanceId": "ruleInstanceId",
5 "ruleName": "Proof of funds for high value transactions",
6 "ruleDescription": "If a user makes a remittance transaction >= 1800 in EUR - ask for proof of funds",
7 "ruleAction": "BLOCK",
8 "ruleHit": true,
9 "ruleId": "R-1a",
10 "vars": [
11 {
12 "value": {}
13 }
14 ],
15 "labels": [
16 "UNEXPECTED_BEHAVIOR"
17 ],
18 "nature": "AML",
19 "isShadow": true
20 }
21 ],
22 "hitRules": [
23 {
24 "ruleInstanceId": "ruleInstanceId",
25 "ruleName": "Proof of funds for high value transactions",
26 "ruleDescription": "If a user makes a remittance transaction >= 1800 in EUR - ask for proof of funds",
27 "ruleAction": "BLOCK",
28 "ruleId": "R-1a",
29 "labels": [
30 "UNEXPECTED_BEHAVIOR"
31 ],
32 "nature": "AML",
33 "isShadow": true
34 }
35 ],
36 "status": "ALLOW",
37 "timestamp": 1641654664000,
38 "transactionId": "7b80a539eea6e78acbd6d458e5971482",
39 "type": "DEPOSIT",
40 "destinationAmountDetails": {
41 "transactionAmount": 68351.34,
42 "transactionCurrency": "INR",
43 "country": "IN"
44 },
45 "destinationDeviceData": {
46 "batteryLevel": 95,
47 "deviceLatitude": 13.0033,
48 "deviceLongitude": 76.1004,
49 "ipAddress": "10.23.191.2",
50 "deviceIdentifier": "3c49f915d04485e34caba",
51 "vpnUsed": false,
52 "operatingSystem": "Android 11.2",
53 "deviceMaker": "ASUS",
54 "deviceModel": "Zenphone M2 Pro Max",
55 "deviceYear": "2018",
56 "appVersion": "1.1.0"
57 },
58 "destinationUserId": "9350a2611e0771cba03310f74bf6",
59 "originAmountDetails": {
60 "transactionAmount": 800,
61 "transactionCurrency": "EUR",
62 "country": "DE"
63 },
64 "originDeviceData": {
65 "batteryLevel": 95,
66 "deviceLatitude": 13.0033,
67 "deviceLongitude": 76.1004,
68 "ipAddress": "10.23.191.2",
69 "deviceIdentifier": "3c49f915d04485e34caba",
70 "vpnUsed": false,
71 "operatingSystem": "Android 11.2",
72 "deviceMaker": "ASUS",
73 "deviceModel": "Zenphone M2 Pro Max",
74 "deviceYear": "2018",
75 "appVersion": "1.1.0"
76 },
77 "originUserId": "8650a2611d0771cba03310f74bf6",
78 "productType": "productType",
79 "promotionCodeUsed": true,
80 "reference": "loan repayment",
81 "relatedTransactionIds": [
82 "relatedTransactionIds"
83 ],
84 "riskScoreDetails": {
85 "trsScore": 1.1,
86 "trsRiskLevel": "VERY_HIGH"
87 },
88 "tags": [
89 {
90 "key": "customKey",
91 "value": "customValue"
92 }
93 ],
94 "transactionState": "CREATED"
95}