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) | Name | Description |
---|---|---|
String - [In] | $transactionId | Transaction 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) | Name | Description |
---|---|---|
Integer- [In] | $order | Sort 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] | $limit | Number of items to be returned per call. The function will use 10 value in case the parameter is left out during execution. |
Integer- [In] | $offset | Start 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] | $createdAtMin | List transactions that were created after this timestamp. The function will use 0 value in case the parameter is left out during execution. |
Integer- [In] | $createdAtMax | List transactions that were created before this timestamp. The function will use 0 value in case the parameter is left out during execution. |
Integer- [In] | $filterCustomData | Filter results by a custom data field. The function will use BLANK value if the parameter is left out during execution. |
Integer- [In] | $filterDecision | Filter result by decision (accept, review, reject). The function will use the BLANK value if the parameter is left out during execution. |
Integer- [In] | $filterDocupass | Filter result by Docupass reference. The function will use the BLANK value if the parameter is left out during execution. |
Integer- [In] | $filterProfileId | Filter results by KYC Profile ID. The function will use the BLANK value if the parameter is left out during execution. |
Object- [Out] | N/A | The 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) | Name | Description |
---|---|---|
String - [In] | $transactionId | Transaction 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] | $decision | Updated decision. Possible value can be accept, review or reject. The function will throw exceptions if any other value is passed. |
Object- [Out] | N/A | The 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) | Name | Description |
---|---|---|
String - [In] | $transactionId | Transaction 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/A | The 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) | Name | Description |
---|---|---|
String - [In] | $imageToken | Image 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] | $destination | Full 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/A | The 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) | Name | Description |
---|---|---|
String - [In] | $fileName | Secured 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] | $destination | Full 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/A | The 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) | Name | Description |
---|---|---|
String - [In] | $destination | Full 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] | $transactionId | Export 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] | $exportType | Export 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] | $ignoreUnrecognized | Ignore unrecognized entries. The function will use false value in case the parameter is left out during execution. |
Bool- [In] | $ignoreDuplicate | Ignore duplicated entries. The function will use false value in case the parameter is left out during execution. |
Integer- [In] | $createdAtMin | List 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] | $createdAtMax | List transactions that were created before this timestamp. The function will use 0 value in case the parameter is left out during execution. |
String - [In] | $filterCustomData | Filter result by customData field. Function will use BLANK value if the parameter is left out during execution. |
String - [In] | $filterDecision | Filter result by decision (accept, review, reject). The function will use BLANK value in case the parameter is left out during execution. |
String - [In] | $filterDocupass | Filter result by Docupass reference. The function will use BLANK value if the parameter is left out during execution. |
String - [In] | $filterProfileId | Filter result by KYC Profile ID. The function will use BLANK value if the parameter is left out during execution. |
Object- [Out] | N/A | The exported file result object streamed into $payload named parameter and returned. |
Updated 9 months ago