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
type
enum
transactionId
string
Unique transaction identifier
timestamp
double
Timestamp of when transaction took place
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
originUserId
stringOptional
UserId for where the transaction originates from
destinationUserId
stringOptional
UserId for transaction's destination. In other words, where the value is being transferred to.
transactionState
enumOptional
Model for transaction states. E.g. Processing, Refunded, Successful etc.
originAmountDetails
objectOptional
Model for transaction amount details
destinationAmountDetails
objectOptional
Model for transaction amount details
originPaymentDetails
unionOptional
Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
destinationPaymentDetails
unionOptional
Payment details of the destination. It can be a bank account number, wallet ID, card fingerprint etc.
relatedTransactionIds
list of stringsOptional
IDs of transactions related to this transaction. Ex: refund, split bills
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.
originDeviceData
objectOptional
Model for device data
destinationDeviceData
objectOptional
Model for device data
tags
list of objectsOptional
Additional information that can be added via tags
riskScoreDetails
objectOptional

Errors

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