JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr# TransactionApi You can use the APIs below to interface with Xendit's `TransactionApi`. To start using the API, you need to configure the secret key and initiate the client instance. ```php getTransactionByID($id, $for_user_id); print_r($result); } catch (\Xendit\XenditSdkException $e) { echo 'Exception when calling TransactionApi->getTransactionByID: ', $e->getMessage(), PHP_EOL; echo 'Full Error: ', json_encode($e->getFullError()), PHP_EOL; } ``` ## `getAllTransactions()` Function ```php getAllTransactions($for_user_id, $types, $statuses, $channel_categories, $reference_id, $product_id, $account_identifier, $amount, $currency, $created, $updated, $limit, $after_id, $before_id): \BalanceAndTransaction\TransactionsResponse ``` Get a list of transactions Get a list of all transactions based on filter and search parameters. | Name | Value | |--------------------|:-------------:| | Function Name | `getAllTransactions` | | Request Parameters | [GetAllTransactionsRequestParams](#request-parameters--GetAllTransactionsRequestParams) | | Return Type | [**\Xendit\BalanceAndTransaction\TransactionsResponse**](BalanceAndTransaction/TransactionsResponse.md) | ### Request Parameters - GetAllTransactionsRequestParams |Name | Type | Required |Default | |-------------|:-------------:|:-------------:|-------------| | **for_user_id** | **string** | | | | **types** | [**TransactionTypes**](BalanceAndTransaction/TransactionTypes.md) | | | | **statuses** | [**TransactionStatuses**](BalanceAndTransaction/TransactionStatuses.md) | | | | **channel_categories** | [**ChannelsCategories**](BalanceAndTransaction/ChannelsCategories.md) | | | | **reference_id** | **string** | | | | **product_id** | **string** | | | | **account_identifier** | **string** | | | | **amount** | **float** | | | | **currency** | [**Currency**](BalanceAndTransaction/Currency.md) | | | | **created** | [**DateRangeFilter**](BalanceAndTransaction/DateRangeFilter.md) | | | | **updated** | [**DateRangeFilter**](BalanceAndTransaction/DateRangeFilter.md) | | | | **limit** | **float** | | [10] | | **after_id** | **string** | | | | **before_id** | **string** | | | ### Usage Example ```php new \Xendit\BalanceAndTransaction\DateRangeFilter()); // DateRangeFilter | Filter time of transaction by created date. If not specified will list all dates. $updated = array('key' => new \Xendit\BalanceAndTransaction\DateRangeFilter()); // DateRangeFilter | Filter time of transaction by updated date. If not specified will list all dates. $limit = 10; // float | number of items in the result per page. Another name for \"results_per_page\" $after_id = "'after_id_example'"; // string $before_id = "'before_id_example'"; // string try { $result = $apiInstance->getAllTransactions($for_user_id, $types, $statuses, $channel_categories, $reference_id, $product_id, $account_identifier, $amount, $currency, $created, $updated, $limit, $after_id, $before_id); print_r($result); } catch (\Xendit\XenditSdkException $e) { echo 'Exception when calling TransactionApi->getAllTransactions: ', $e->getMessage(), PHP_EOL; echo 'Full Error: ', json_encode($e->getFullError()), PHP_EOL; } ``` [[Back to README]](../README.md)