API Calls
The response may contain ErrorCodes when the TrustFactor service call is not successful.
ErrorCodes are errors with unique codes standardized by TrustFactor services to be easier to manage errors outside TrustFactor services and give more information about why the TrustFactor services couldn’t handle the request.
ErrorCodes are thrown when a server side validation blocks a request.
ErrorCodes contain a unique code (e.g. E_400020001), a message and optionally, depending on the error code, extra arguments to the error. For example, when a contract already exists an E_400020001 error code is thrown and has an argument with the App User ID, that serves as additional information to situate the error.
Also, to notice that every request that supports User ID as a similar request that supports Contract Key. That way the application has a more diverse choice.
Create Register Code
Creates a registration token for a user with an expiration time between 0 seconds and 600 seconds, otherwise, the request will return an error.
You should create and display a QR Code and/or a Deep Link URL considering user’s device using the response object.
To get the QR Code you need to use the GetRegistrationQRCode method from the Client, for the QR Code URL you will need to use the GenerateRegistrationQRCodeURL method and finally for the Deep Link URL you need to use GenerateRegistrationDeeplinkURL method.
The registration QR Code encodes the registration Deep Link URL itself, so besides being readable by the agent application it can also be scanned with the device’s native camera application, which opens the agent through the deep link.
There are two versions of this request. The V2 version additionally supports auxiliary data (AuxData) and the RequirePreciseLocation flag, which requires the registration made with this code to be performed with a precise (GPS) device location.
- V1
RegisterCode.Params(Request Object)RegisterCode.Response(Response Object)
- V2
RegisterCodeV2.Params(Request Object)RegisterCodeV2.Response(Response Object)
Possible Response Error Codes:
Reset Contract Device
Removes the specified device from this contract.
If it is the last associated device, the user will no longer have TrustFactor associated to the account. From that moment on, it will no longer be possible to create new transactions for that user until he associates a new device through a registration flow.
- With Key
ResetContractDevice.Params(Request Object)ResetContractDevice.Response(Response Object)
- With User ID
ResetContractDeviceByUserID.Params(Request Object)ResetContractDeviceByUserID.Response(Response Object)
Possible Response Error Codes:
Get Contract Authentication Mechanisms
Returns all the authentications the user has configured on his agents. Might be useful to block certain actions (and don’t create transactions), if the user doesn’t have the required authentication mechanisms associated.
- With Key
GetContractAuthenticationMechanisms.Params(Request Object)GetContractAuthenticationMechanisms.Response(Response Object)
- With User ID
GetContractAuthenticationMechanismsByUserID.Params(Request Object)GetContractAuthenticationMechanismsByUserID.Response(Response Object)
Possible Response Error Codes:
Set SIBS Details
Sets the contract SIBS details used for SIBS transactions.
- With Key
SetSIBSDetailsByKey.Params(Request Object)SetSIBSDetailsByKey.Response(Response Object)
- With User ID
SetSIBSDetailsByUserID.Params(Request Object)SetSIBSDetailsByUserID.Response(Response Object)
Possible Response Error Codes:
Create Transaction
This API creates a new transaction for a user. In order to call this method you need a registered user, and a transaction object. For more information about how to create transactions, please check Transactions in depth chapter. The transaction object should have one of the following types:
| Transaction Type | CustomApps Only |
|---|---|
NormalTransaction | No |
ActionableTransaction | No |
GenericTransaction | No |
SIBS3DSTransaction | Yes |
SIBS3DSV2Transaction | Yes |
NormalTransaction and ActionableTransaction types reference an operation (see the BackOffice Documentation for more information on Operations) that should already be defined in Backoffice via Action field.
- With Key
CreateTransactionV3WithKey.Params(Request Object)CreateTransactionV3WithKey.Response(Response Object)
- With ID
CreateTransactionV3WithUserID.Params(Request Object)CreateTransactionV3WithUserID.Response(Response Object)
When the transaction is created with the RequireConfirmationCode flag active, the response also contains the generated ConfirmationCode, with the code the user must pick and the full list of options presented on the user’s agent.
Possible Response Error Codes:
E_500010002E_400020002E_400090057E_500040001E_500050003E_400090056E_400090050E_500050001E_400090007E_400090051E_400090052E_400090016E_400090017E_400090018E_400090044E_400090045E_400090026E_400090027E_400090028E_400090029E_400090015E_400090077E_400090039E_400090040E_400090041E_400090042E_400090072E_400090073E_400090074E_400090014E_400090038E_400090013E_400090071E_400090061E_400090062E_400090063E_400090064E_400090065E_400090066E_400090067E_400090068E_400090069E_400090070E_400090076E_400090019E_400090020E_400090023E_400090022E_400090024E_400090046E_400090031E_400090032E_400090033E_400090035E_400090034E_400090036E_400090037E_400090047E_400090030E_400090079E_400090080E_400090081
Update Transaction Status – CustomApps with SIBS MBWay SDK only
Sets the status of a SIBS3DSV2 transaction.
UpdateTransactionStatus.Params(Request Object)UpdateTransactionStatus.Response(Response Object)
The possible states the transaction can be updated to are:
If the requests tries to update the transaction to the same state the response returns a 204 HTTP code.
The possible states the transaction can be updated from are:
These transaction states can be found on TrustFactorSDK.V2.Constants namespace.
Possible Response Error Codes:
Get Transaction Status
Retrieves the status of a transaction.
GetTransactionStatus.Params(Request Object)GetTransactionStatus.Response(Response Object)