Transaction

5. Transaction

5.1. getTransaction

This function enables the developer to retrieve a single transaction record based on the provided transactionId.

Declaration

public function getTransaction($transactionId)

Here are the input and output parameters defined against this function.

Type (In/Out)NameDescription
String - [In]$transactionIdTransaction ID that is to be retrieved. The function will use BLANK value if the parameter is left out during execution. The function will throw an exception if the BLANK value is passed in this parameter.
Object- [Out]N/A- The transaction result object streamed into $payload named parameter and returned.

5.2. listTransaction

This function retrieves a list of transaction history based on the provided filter parameters.

Declaration

public function listTransaction($order = -1, $limit = 10, $offset = 0, $createdAtMin = 0, $createdAtMax = 0, $filterCustomData = "", $filterDecision = "", $filterDocupass = "", $filterProfileId = "")

Here are the input and output parameters defined against this function.

Type (In/Out)NameDescription
Integer- [In]$orderSort results by newest(-1) or oldest(1). If the parameter is left out during execution, the function will use the -1 value. The function will throw an exception if the BLANK value is passed in this parameter. The parameter cannot be 1 or -1.
Integer- [In]$limitNumber of items to be returned per call. The function will use 10 value in case the parameter is left out during execution.
Integer- [In]$offsetStart the list from a particular entry index. The function will use 0 value in case the parameter is left out during execution. limit should be a positive integer greater than 0 and less than or equal to 100.
Integer- [In]$createdAtMinList transactions that were created after this timestamp. The function will use 0 value in case the parameter is left out during execution.
Integer- [In]$createdAtMaxList transactions that were created before this timestamp. The function will use 0 value in case the parameter is left out during execution.
Integer- [In]$filterCustomDataFilter results by a custom data field. The function will use BLANK value if the parameter is left out during execution.
Integer- [In]$filterDecisionFilter result by decision (accept, review, reject). The function will use the BLANK value if the parameter is left out during execution.
Integer- [In]$filterDocupassFilter result by Docupass reference. The function will use the BLANK value if the parameter is left out during execution.
Integer- [In]$filterProfileIdFilter results by KYC Profile ID. The function will use the BLANK value if the parameter is left out during execution.
Object- [Out]N/AThe transaction list result object streamed into $payload named parameter and returned.

5.3. updateTransaction

This function updates the decision against the provided transactionId. A list of possible decision updates is.

  • accept
  • review
  • reject

Declaration

public function updateTransaction($transactionId, $decision)

Here are the input and output parameters defined against this function.

Type (In/Out)NameDescription
String - [In]$transactionIdTransaction ID against which the decision needs to be updated. The function will use BLANK value if the parameter is left out during execution. The function will throw an exception if BLANK value is passed in this parameter.
String - [In]$decisionUpdated decision. Possible value can be accept, review or reject. The function will throw exceptions if any other value is passed.
Object- [Out]N/AThe updated transaction result object streamed into $payload named parameter and returned.

5.4. deleteTransaction

Consumers can use this function to delete any unnecessary transactions from the system.

Declaration

public function deleteTransaction($transactionId)

Here are the input and output parameters defined against this function.

Type (In/Out)NameDescription
String - [In]$transactionIdTransaction ID that is to be deleted. The function will use BLANK value if the parameter is left out during execution. The function will throw an exception if BLANK value is passed in this parameter.
Object- [Out]N/AThe deleted transaction result object streamed into $payload named parameter and returned.

5.5. saveImage

This function download transaction image onto a local file system.

Declaration

public function saveImage($imageToken, $destination)

Here are the input and output parameters defined against this function.

Type (In/Out)NameDescription
String - [In]$imageTokenImage token from the transaction API response. The function will use the BLANK value if the parameter is left out during execution. The function will throw an exception if BLANK value is passed in this parameter.
String - [In]$destinationFull destination path including file name, file extension should be jpg, for example: '\home\idcard.jpg'. The function will use the BLANK value if the parameter is left out during execution. The function will throw an exception if BLANK value is passed in this parameter.
Object- [Out]N/AThe saved image result object streamed into $payload named parameter and returned.

5.6. saveFile

This function download transaction file onto the local file system using the secured file name obtained from the transaction.

Declaration

public function saveFile($fileName, $destination)

Here are the input and output parameters defined against this function.

Type (In/Out)NameDescription
String - [In]$fileNameSecured file name. The function will use BLANK value if the parameter is left out during execution. The function will throw an exception if BLANK value is passed in this parameter.
String - [In]$destinationFull destination path including file name, file extension should be jpg, for example: '\home\idcard.jpg'. The function will use the BLANK value if the parameter is left out during execution. The function will throw an exception if BLANK value is passed in this parameter.
Object- [Out]N/AThe saved file result object streamed into $payload named parameter and returned back.

5.7. exportTransaction

This function is used to download transaction archives onto the local file system.

Declaration

public function exportTransaction($destination, $transactionId = array(), $exportType = "csv", $ignoreUnrecognized = false, $ignoreDuplicate = false, $createdAtMin = 0, $createdAtMax = 0, $filterCustomData = "", $filterDecision = "", $filterDocupass = "", $filterProfileId = "")

Here are the input and output parameters defined against this function.

Type (In/Out)NameDescription
String - [In]$destinationFull destination path including file name, file extension should be zip, for example: '\home\archive.zip'. The function will use BLANK value if the parameter is left out during execution. The function will throw an exception if BLANK value is passed in this parameter.
Array - [In]$transactionIdExport only the specified transaction IDs passed in the list. The function will use BLANK value if the parameter is left out during execution.
String - [In]$exportTypeExport type of document. Possible value can be csv or json. The function will throw exception if any other value is passed. The function will use csv1 value in case the parameter is left out during execution.
Bool- [In]$ignoreUnrecognizedIgnore unrecognized entries. The function will use false value in case the parameter is left out during execution.
Bool- [In]$ignoreDuplicateIgnore duplicated entries. The function will use false value in case the parameter is left out during execution.
Integer- [In]$createdAtMinList transactions that were created after this timestamp. The function will use 0 value in case the parameter is left out during execution.
System.integer- [In]$createdAtMaxList transactions that were created before this timestamp. The function will use 0 value in case the parameter is left out during execution.
String - [In]$filterCustomDataFilter result by customData field. Function will use BLANK value if the parameter is left out during execution.
String - [In]$filterDecisionFilter result by decision (accept, review, reject). The function will use BLANK value in case the parameter is left out during execution.
String - [In]$filterDocupassFilter result by Docupass reference. The function will use BLANK value if the parameter is left out during execution.
String - [In]$filterProfileIdFilter result by KYC Profile ID. The function will use BLANK value if the parameter is left out during execution.
Object- [Out]N/AThe exported file result object streamed into $payload named parameter and returned.