client.transactions.verify({ ...params }) -> Flagright.TransactionsVerifyResponse
-
-
-
/transactionsendpoint allows you to operate on the Transaction entity.In order to pass the payload of a transaction to Flagright and verify the transaction, you will need to call this endpoint with the transaction payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
Here are some of the most used payload fields explained (you can find the full payload schema below with 1 line descriptions):
type: Type of transaction (Ex:WITHDRAWAL,DEPOSIT,TRANSFERetc).transactionId- Unique Identifier for the transaction.timestamp- UNIX timestamp in milliseconds of when the transaction took placetransactionState- The state of the transaction, set toCREATEDby default. More details hereoriginUserId- Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the create a consumer user or create a business user endpointdestinationUserId- Unique identifier (if any) of the user who is receiving the money. This user must be created within the Flagright system before using the create a consumer user or create a business user endpointoriginAmountDetails- Details of the amount being sent from the origindestinationAmountDetails- Details of the amount being received at the destinationoriginPaymentDetails- Payment details (if any) used at the origin (ex:CARD,IBAN,WALLETetc). You can click on the dropdown next to the field in the schema below to view all supported payment types.destinationPaymentDetails- Payment details (if any) used at the destination (ex:CARD,IBAN,WALLETetc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
-
-
-
await client.transactions.verify({ validateOriginUserId: "true", validateDestinationUserId: "true", body: { type: "DEPOSIT", transactionId: "7b80a539eea6e78acbd6d458e5971482", timestamp: 1641654664000, originUserId: "8650a2611d0771cba03310f74bf6", destinationUserId: "9350a2611e0771cba03310f74bf6", originAmountDetails: { transactionAmount: 2000, transactionCurrency: "EUR", country: "DE" }, destinationAmountDetails: { transactionAmount: 68351.34, transactionCurrency: "INR", country: "IN" }, originPaymentDetails: { method: "CARD", cardFingerprint: "20ac00fed8ef913aefb17cfae1097cce", cardIssuedCountry: "TR", transactionReferenceField: "Deposit", 3DsDone: true }, destinationPaymentDetails: { method: "CARD", cardFingerprint: "20ac00fed8ef913aefb17cfae1097cce", cardIssuedCountry: "TR", transactionReferenceField: "Deposit", 3DsDone: true }, promotionCodeUsed: true, reference: "loan repayment", originDeviceData: { batteryLevel: 95, deviceLatitude: 13.0033, deviceLongitude: 76.1004, ipAddress: "10.23.191.2", deviceIdentifier: "3c49f915d04485e34caba", vpnUsed: false, operatingSystem: "Android 11.2", deviceMaker: "ASUS", deviceModel: "Zenphone M2 Pro Max", deviceYear: "2018", appVersion: "1.1.0" }, destinationDeviceData: { batteryLevel: 95, deviceLatitude: 13.0033, deviceLongitude: 76.1004, ipAddress: "10.23.191.2", deviceIdentifier: "3c49f915d04485e34caba", vpnUsed: false, operatingSystem: "Android 11.2", deviceMaker: "ASUS", deviceModel: "Zenphone M2 Pro Max", deviceYear: "2018", appVersion: "1.1.0" }, tags: [{ key: "customKey", value: "customValue" }] } });
-
-
-
request:
Flagright.TransactionsVerifyRequest
-
requestOptions:
Transactions.RequestOptions
-
-
client.transactions.get(transactionId) -> Flagright.TransactionWithRulesResult
-
-
-
/transactionsendpoint 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 correspondingtransactionId
-
-
-
await client.transactions.get("transactionId");
-
-
-
transactionId:
string— Unique Transaction Identifier
-
requestOptions:
Transactions.RequestOptions
-
-
client.batch.verifyTransaction({ ...params }) -> Flagright.BatchResponse
-
-
-
await client.batch.verifyTransaction({ validateOriginUserId: "true", validateDestinationUserId: "true", data: [ { type: "type", transactionId: "transactionId", timestamp: 1.1, }, ], });
-
-
-
request:
Flagright.TransactionBatchRequest
-
requestOptions:
Batch.RequestOptions
-
-
client.batch.getTransactions(batchId, { ...params }) -> Flagright.BatchTransactionMonitoringResults
-
-
-
await client.batch.getTransactions("batchId", { pageSize: 1.1, page: 1.1, });
-
-
-
batchId:
string— Unique Batch Identifier
-
request:
Flagright.BatchGetTransactionsRequest
-
requestOptions:
Batch.RequestOptions
-
-
client.batch.createTransactionEvents({ ...params }) -> Flagright.BatchResponse
-
-
-
await client.batch.createTransactionEvents({ data: [ { transactionState: "CREATED", timestamp: 1.1, transactionId: "transactionId", }, ], });
-
-
-
request:
Flagright.TransactionEventBatchRequest
-
requestOptions:
Batch.RequestOptions
-
-
client.batch.getTransactionEvents(batchId, { ...params }) -> Flagright.BatchTransactionEventMonitoringResults
-
-
-
await client.batch.getTransactionEvents("batchId", { pageSize: 1.1, page: 1.1, });
-
-
-
batchId:
string— Unique Batch Identifier
-
request:
Flagright.BatchGetTransactionEventsRequest
-
requestOptions:
Batch.RequestOptions
-
-
client.batch.createConsumerUsers({ ...params }) -> Flagright.BatchResponse
-
-
-
await client.batch.createConsumerUsers({ lockCraRiskLevel: "true", lockKycRiskLevel: "true", data: [ { userId: "userId", createdTimestamp: 1.1, }, ], });
-
-
-
request:
Flagright.UserBatchRequest
-
requestOptions:
Batch.RequestOptions
-
-
client.batch.getConsumerUsers(batchId, { ...params }) -> Flagright.BatchConsumerUsersWithRulesResult
-
-
-
await client.batch.getConsumerUsers("batchId", { pageSize: 1.1, page: 1.1, });
-
-
-
batchId:
string— Unique Batch Identifier
-
request:
Flagright.BatchGetConsumerUsersRequest
-
requestOptions:
Batch.RequestOptions
-
-
client.batch.createBusinessUsers({ ...params }) -> Flagright.BatchResponse
-
-
-
await client.batch.createBusinessUsers({ lockCraRiskLevel: "true", lockKycRiskLevel: "true", data: [ { userId: "userId", createdTimestamp: 1.1, legalEntity: { companyGeneralDetails: { legalName: "Ozkan Hazelnut Export JSC", businessIndustry: ["Farming"], mainProductsServicesSold: ["Hazelnut"], }, }, }, ], });
-
-
-
request:
Flagright.BusinessBatchRequest
-
requestOptions:
Batch.RequestOptions
-
-
client.batch.getBusinessUsers(batchId, { ...params }) -> Flagright.BatchBusinessUsersWithRulesResults
-
-
-
await client.batch.getBusinessUsers("batchId", { pageSize: 1.1, page: 1.1, });
-
-
-
batchId:
string— Unique Batch Identifier
-
request:
Flagright.BatchGetBusinessUsersRequest
-
requestOptions:
Batch.RequestOptions
-
-
client.batch.createConsumerUserEvents({ ...params }) -> Flagright.BatchResponse
-
-
-
await client.batch.createConsumerUserEvents({ lockCraRiskLevel: "true", lockKycRiskLevel: "true", data: [ { timestamp: 1.1, userId: "userId", }, ], });
-
-
-
request:
Flagright.ConsumerUserEventBatchRequest
-
requestOptions:
Batch.RequestOptions
-
-
client.batch.getConsumerUserEvents(batchId, { ...params }) -> Flagright.BatchConsumerUserEventsRulesResult
-
-
-
await client.batch.getConsumerUserEvents("batchId", { pageSize: 1.1, page: 1.1, });
-
-
-
batchId:
string— Unique Batch Identifier
-
request:
Flagright.BatchGetConsumerUserEventsRequest
-
requestOptions:
Batch.RequestOptions
-
-
client.batch.createBusinessUserEvents({ ...params }) -> Flagright.BatchResponse
-
-
-
await client.batch.createBusinessUserEvents({ lockCraRiskLevel: "true", lockKycRiskLevel: "true", data: [ { timestamp: 1.1, userId: "userId", }, ], });
-
-
-
request:
Flagright.BusinessUserEventBatchRequest
-
requestOptions:
Batch.RequestOptions
-
-
client.batch.getBusinessUserEvents(batchId, { ...params }) -> Flagright.BatchBusinessUserEventsWithRulesResult
-
-
-
await client.batch.getBusinessUserEvents("batchId", { pageSize: 1.1, page: 1.1, });
-
-
-
batchId:
string— Unique Batch Identifier
-
request:
Flagright.BatchGetBusinessUserEventsRequest
-
requestOptions:
Batch.RequestOptions
-
-
client.transactionEvents.create({ ...params }) -> Flagright.TransactionEventMonitoringResult
-
-
-
/events/transactionendpoint allows you to operate on the Transaction Events entity.Transaction events are created after the initial
POST /transactionscall (which creates a transaction) and are used to:- Update the STATE of the transaction, using the
transactionStatefield and manage the Transaction Lifecycle - Update the transaction details, using the
updatedTransactionAttributesfield.
If you have neither of the above two use cases, you do not need to use transaction events.
Each transaction event needs three mandatory fields:
transactionState- STATE of the transaction -> value is set toCREATEDafterPOST /transactionscalltimestamp- the timestamp of when the event was created or occured in your systemtransactionId- The ID of the transaction for which this event is generated.
In order to make individual events retrievable, you also need to pass in a unique
eventIdto the request body. - Update the STATE of the transaction, using the
-
-
-
await client.transactionEvents.create({ transactionState: "SUCCESSFUL", timestamp: 1752526580000, transactionId: "443dea26147a406b957d9ee3a1247b11", eventId: "aaeeb166147a406b957dd9147a406b957", eventDescription: "Transaction created", metaData: { batteryLevel: 76.3, deviceLatitude: 13.009711, deviceLongitude: 76.102898, ipAddress: "79.144.2.20", vpnUsed: true, }, });
-
-
-
request:
Flagright.TransactionEvent
-
requestOptions:
TransactionEvents.RequestOptions
-
-
client.transactionEvents.get(eventId) -> Flagright.TransactionEventWithRulesResult
-
-
-
/events/transactionendpoint allows you to operate on the Transaction Events entity..You can retrieve any transaction event you created using the POST Transaction Events call.
-
-
-
await client.transactionEvents.get("eventId");
-
-
-
eventId:
string— Unique Transaction Identifier
-
requestOptions:
TransactionEvents.RequestOptions
-
-
client.consumerUsers.create({ ...params }) -> Flagright.ConsumerUsersCreateResponse
-
-
-
/consumer/userendpoint allows you to operate on the Consumer user entity.In order to pass the payload of a User to Flagright and verify the User, you will need to call this endpoint with the User payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
Each consumer user needs two mandatory fields:
userId- Unique identifier for the usercreatedTimestamp- UNIX timestamp in milliseconds for when the User is created in your system
-
-
-
await client.consumerUsers.create({ lockCraRiskLevel: "true", lockKycRiskLevel: "true", validateUserId: "true", body: { userId: "96647cfd9e8fe66ee0f3362e011e34e8", createdTimestamp: 1641654664000, userDetails: { name: { firstName: "Baran", middleName: "Realblood", lastName: "Ozkan", }, dateOfBirth: "1991-01-01", countryOfResidence: "US", countryOfNationality: "DE", }, legalDocuments: [ { documentType: "passport", documentNumber: "Z9431P", documentIssuedDate: 1639939034000, documentExpirationDate: 1839939034000, documentIssuedCountry: "DE", tags: [ { key: "customerType", value: "wallet", }, ], }, ], contactDetails: { emailIds: ["baran@flagright.com"], contactNumbers: ["+37112345432"], websites: ["flagright.com"], addresses: [ { addressLines: ["Klara-Franke Str 20"], postcode: "10557", city: "Berlin", state: "Berlin", country: "Germany", tags: [ { key: "customKey", value: "customValue", }, ], }, ], }, tags: [ { key: "customKey", value: "customValue", }, ], }, });
-
-
-
request:
Flagright.ConsumerUsersCreateRequest
-
requestOptions:
ConsumerUsers.RequestOptions
-
-
client.consumerUsers.get(userId) -> Flagright.UserWithRulesResult
-
-
-
/consumer/userendpoint allows you to operate on the Consumer User entity.Calling
GET /consumer/user/{userId}will return the entire user payload and rule execution results for the user with the correspondinguserId
-
-
-
await client.consumerUsers.get("userId");
-
-
-
userId:
string—
-
requestOptions:
ConsumerUsers.RequestOptions
-
-
client.businessUsers.create({ ...params }) -> Flagright.BusinessUsersCreateResponse
-
-
-
/business/userendpoint allows you to operate on the Business user entity.In order to pass the payload of a User to Flagright and verify the User, you will need to call this endpoint with the User payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
Each business user needs three mandatory fields:
userId- Unique identifier for the userlegalEntity- Details of the business legal entity (CompanyGeneralDetails, FinancialDetails etc) - onlylegalNameinCompanyGeneralDetailsis mandatorycreatedTimestamp- UNIX timestamp in milliseconds for when the User is created in your system
-
-
-
await client.businessUsers.create({ lockCraRiskLevel: "true", lockKycRiskLevel: "true", validateUserId: "true", body: { userId: "userId", createdTimestamp: 1.1, legalEntity: { companyGeneralDetails: { legalName: "Ozkan Hazelnut Export JSC", businessIndustry: ["Farming"], mainProductsServicesSold: ["Hazelnut"], }, }, }, });
-
-
-
request:
Flagright.BusinessUsersCreateRequest
-
requestOptions:
BusinessUsers.RequestOptions
-
-
client.businessUsers.get(userId) -> Flagright.BusinessWithRulesResult
-
-
-
/business/userendpoint allows you to operate on the Business User entity.Calling
GET /business/user/{userId}will return the entire User payload and rule execution results for the User with the correspondinguserId
-
-
-
await client.businessUsers.get("userId");
-
-
-
userId:
string—
-
requestOptions:
BusinessUsers.RequestOptions
-
-
client.consumerUserEvents.create({ ...params }) -> Flagright.UserWithRulesResult
-
-
-
/events/consumer/userendpoint allows you to operate on the Consumer User Events entity.User events are created after the initial
POST /consumer/userscall (which creates a user) and are used to:- Update the STATE and KYC Status of the user, using the
userStateDetailsorkycStatusDetailsfield - Update the user details, using the
updatedConsumerUserAttributesfield.
If you have neither of the above two use cases, you do not need to use user events.
Each user event needs three mandatory fields:
timestamp- the timestamp of when the event was created or occured in your systemuserId- The ID of the transaction for which this event is generated.
In order to make individual events retrievable, you also need to pass in a unique
eventIdto the request body. - Update the STATE and KYC Status of the user, using the
-
-
-
await client.consumerUserEvents.create({ allowUserTypeConversion: "true", lockKycRiskLevel: "true", lockCraRiskLevel: "true", body: { timestamp: 1.1, userId: "userId", }, });
-
-
-
request:
Flagright.ConsumerUserEventsCreateRequest
-
requestOptions:
ConsumerUserEvents.RequestOptions
-
-
client.consumerUserEvents.get(eventId) -> Flagright.ConsumerUserEventWithRulesResult
-
-
-
You can retrieve any consumer user event you created using the POST Consumer User Events call.
-
-
-
await client.consumerUserEvents.get("eventId");
-
-
-
eventId:
string— Unique Consumer User Event Identifier
-
requestOptions:
ConsumerUserEvents.RequestOptions
-
-
client.businessUserEvents.create({ ...params }) -> Flagright.BusinessWithRulesResult
-
-
-
/events/business/userendpoint allows you to operate on the Business User Events entity.User events are created after the initial
POST /business/userscall (which creates a user) and are used to:- Update the STATE and KYC Status of the user, using the
userStateDetailsorkycStatusDetailsfield - Update the user details, using the
updatedBusinessUserAttributesfield.
If you have neither of the above two use cases, you do not need to use user events.
Each user event needs three mandatory fields:
timestamp- the timestamp of when the event was created or occured in your systemuserId- The ID of the transaction for which this event is generated.
In order to make individual events retrievable, you also need to pass in a unique
eventIdto the request body. - Update the STATE and KYC Status of the user, using the
-
-
-
await client.businessUserEvents.create({ allowUserTypeConversion: "true", lockKycRiskLevel: "true", lockCraRiskLevel: "true", body: { timestamp: 1.1, userId: "userId", }, });
-
-
-
request:
Flagright.BusinessUserEventsCreateRequest
-
requestOptions:
BusinessUserEvents.RequestOptions
-
-
client.businessUserEvents.get(eventId) -> Flagright.BusinessUserEventWithRulesResult
-
-
-
You can retrieve any business user event you created using the POST Business User Events call.
-
-
-
await client.businessUserEvents.get("eventId");
-
-
-
eventId:
string— Unique Business User Event Identifier
-
requestOptions:
BusinessUserEvents.RequestOptions
-
-