Transaction
Table of Contents
- $throwError : mixed
- __construct() : void
- Initialize Transaction API
- deleteTransaction() : array<string|int, mixed>
- Delete a transaction
- exportTransaction() : void
- Download transaction archive onto local file system
- getTransaction() : array<string|int, mixed>
- Retrieve a single transaction record
- listTransaction() : array<string|int, mixed>
- Retrieve a list of transaction history
- saveFile() : void
- Download transaction file onto local file system using secured file name obtained from transaction
- saveImage() : void
- Download transaction image onto local file system
- setParameter() : void
- Set an API parameter and its value, this function allows you to set any API parameter without using the built-in functions
- throwAPIException() : void
- Whether an exception should be thrown if API response contains an error message
- updateTransaction() : array<string|int, mixed>
- Update transaction decision, updated decision will be relayed to webhook if set.
Properties
$throwError
private
mixed
$throwError
= false
Methods
__construct()
Initialize Transaction API
public
__construct() : void
Tags
Return values
void —deleteTransaction()
Delete a transaction
public
deleteTransaction(string $transactionId) : array<string|int, mixed>
Parameters
- $transactionId : string
-
Transaction ID
Tags
Return values
array<string|int, mixed> —exportTransaction()
Download transaction archive onto local file system
public
exportTransaction(string $destination[, array<string|int, mixed> $transactionId = array() ][, string $exportType = "csv" ][, bool $ignoreUnrecognized = false ][, bool $ignoreDuplicate = false ], int $createdAtMin, int $createdAtMax[, string $filterCustomData = "" ][, string $filterDecision = "" ][, string $filterDocupass = "" ][, string $filterProfileId = "" ]) : void
Parameters
- $destination : string
-
Full destination path including file name, file extension should be zip, for example: '\home\archive.zip'
- $transactionId : array<string|int, mixed> = array()
-
Export only the specified transaction IDs
- $exportType : string = "csv"
-
'csv' or 'json'
- $ignoreUnrecognized : bool = false
-
Ignore unrecognized documents
- $ignoreDuplicate : bool = false
-
Ignore duplicated entries
- $createdAtMin : int
-
Export only transactions that were created after this timestamp
- $createdAtMax : int
-
Export only transactions that were created before this timestamp
- $filterCustomData : string = ""
-
Filter export by customData field
- $filterDecision : string = ""
-
Filter export by decision (accept, review, reject)
- $filterDocupass : string = ""
-
Filter export by Docupass reference
- $filterProfileId : string = ""
-
Filter export by KYC Profile ID
Tags
Return values
void —getTransaction()
Retrieve a single transaction record
public
getTransaction(string $transactionId) : array<string|int, mixed>
Parameters
- $transactionId : string
-
Transaction ID
Tags
Return values
array<string|int, mixed> —listTransaction()
Retrieve a list of transaction history
public
listTransaction([int $order = -1 ][, int $limit = 10 ], int $offset, int $createdAtMin, int $createdAtMax[, string $filterCustomData = "" ][, string $filterDecision = "" ][, string $filterDocupass = "" ][, string $filterProfileId = "" ]) : array<string|int, mixed>
Parameters
- $order : int = -1
-
Sort results by newest(-1) or oldest(1)
- $limit : int = 10
-
Number of items to be returned per call
- $offset : int
-
Start the list from a particular entry index
- $createdAtMin : int
-
List transactions that were created after this timestamp
- $createdAtMax : int
-
List transactions that were created before this timestamp
- $filterCustomData : string = ""
-
Filter result by customData field
- $filterDecision : string = ""
-
Filter result by decision (accept, review, reject)
- $filterDocupass : string = ""
-
Filter result by Docupass reference
- $filterProfileId : string = ""
-
Filter result by KYC Profile ID
Tags
Return values
array<string|int, mixed> —saveFile()
Download transaction file onto local file system using secured file name obtained from transaction
public
saveFile(string $fileName, string $destination) : void
Parameters
- $fileName : string
-
Secured file name
- $destination : string
-
Full destination path including file name, for example: '\home\auditreport.pdf'
Tags
Return values
void —saveImage()
Download transaction image onto local file system
public
saveImage(string $imageToken, string $destination) : void
Parameters
- $imageToken : string
-
Image token from transaction API response
- $destination : string
-
Full destination path including file name, file extension should be jpg, for example: '\home\idcard.jpg'
Tags
Return values
void —setParameter()
Set an API parameter and its value, this function allows you to set any API parameter without using the built-in functions
public
setParameter(string $parameterKey, string $parameterValue) : void
Parameters
- $parameterKey : string
-
Parameter key
- $parameterValue : string
-
Parameter value
Return values
void —throwAPIException()
Whether an exception should be thrown if API response contains an error message
public
throwAPIException([bool $throwException = false ]) : void
Parameters
- $throwException : bool = false
-
Throw exception upon API error, defaults to false
Return values
void —updateTransaction()
Update transaction decision, updated decision will be relayed to webhook if set.
public
updateTransaction(string $transactionId, string $decision) : array<string|int, mixed>
Parameters
- $transactionId : string
-
Transaction ID
- $decision : string
-
New decision (accept, review or reject)