$transactionsApi = $client->getTransactionsApi();
TransactionsApi
This endpoint is deprecated.
Lists transactions for a particular location.
Transactions include payment information from sales and exchanges and refund information from returns and exchanges.
Max results per page: 50
function listTransactions(
string $locationId,
?string $beginTime = null,
?string $endTime = null,
?string $sortOrder = null,
?string $cursor = null
): ApiResponse
Parameter | Type | Tags | Description |
---|---|---|---|
locationId |
string |
Template, Required | The ID of the location to list transactions for. |
beginTime |
?string |
Query, Optional | The beginning of the requested reporting period, in RFC 3339 format. See Date ranges for details on date inclusivity/exclusivity. Default value: The current time minus one year. |
endTime |
?string |
Query, Optional | The end of the requested reporting period, in RFC 3339 format. See Date ranges for details on date inclusivity/exclusivity. Default value: The current time. |
sortOrder |
?string (SortOrder) |
Query, Optional | The order in which results are listed in the response (ASC foroldest first, DESC for newest first).Default value: DESC |
cursor |
?string |
Query, Optional | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See Paginating results for more information. |
$locationId = 'location_id4';
$apiResponse = $transactionsApi->listTransactions($locationId);
if ($apiResponse->isSuccess()) {
$listTransactionsResponse = $apiResponse->getResult();
} else {
$errors = $apiResponse->getErrors();
}
// Getting more response information
var_dump($apiResponse->getStatusCode());
var_dump($apiResponse->getHeaders());
This endpoint is deprecated.
Retrieves details for a single transaction.
function retrieveTransaction(string $locationId, string $transactionId): ApiResponse
Parameter | Type | Tags | Description |
---|---|---|---|
locationId |
string |
Template, Required | The ID of the transaction's associated location. |
transactionId |
string |
Template, Required | The ID of the transaction to retrieve. |
$locationId = 'location_id4';
$transactionId = 'transaction_id8';
$apiResponse = $transactionsApi->retrieveTransaction(
$locationId,
$transactionId
);
if ($apiResponse->isSuccess()) {
$retrieveTransactionResponse = $apiResponse->getResult();
} else {
$errors = $apiResponse->getErrors();
}
// Getting more response information
var_dump($apiResponse->getStatusCode());
var_dump($apiResponse->getHeaders());
This endpoint is deprecated.
Captures a transaction that was created with the Charge
endpoint with a delay_capture
value of true
.
See Delayed capture transactions for more information.
function captureTransaction(string $locationId, string $transactionId): ApiResponse
Parameter | Type | Tags | Description |
---|---|---|---|
locationId |
string |
Template, Required | - |
transactionId |
string |
Template, Required | - |
$locationId = 'location_id4';
$transactionId = 'transaction_id8';
$apiResponse = $transactionsApi->captureTransaction(
$locationId,
$transactionId
);
if ($apiResponse->isSuccess()) {
$captureTransactionResponse = $apiResponse->getResult();
} else {
$errors = $apiResponse->getErrors();
}
// Getting more response information
var_dump($apiResponse->getStatusCode());
var_dump($apiResponse->getHeaders());
This endpoint is deprecated.
Cancels a transaction that was created with the Charge
endpoint with a delay_capture
value of true
.
See Delayed capture transactions for more information.
function voidTransaction(string $locationId, string $transactionId): ApiResponse
Parameter | Type | Tags | Description |
---|---|---|---|
locationId |
string |
Template, Required | - |
transactionId |
string |
Template, Required | - |
$locationId = 'location_id4';
$transactionId = 'transaction_id8';
$apiResponse = $transactionsApi->voidTransaction(
$locationId,
$transactionId
);
if ($apiResponse->isSuccess()) {
$voidTransactionResponse = $apiResponse->getResult();
} else {
$errors = $apiResponse->getErrors();
}
// Getting more response information
var_dump($apiResponse->getStatusCode());
var_dump($apiResponse->getHeaders());