Skip to content

Latest commit

 

History

History
187 lines (129 loc) · 5.79 KB

transactions.md

File metadata and controls

187 lines (129 loc) · 5.79 KB

Transactions

TransactionsApi transactionsApi = client.getTransactionsApi();

Class Name

TransactionsApi

Methods

List Transactions

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

CompletableFuture<ListTransactionsResponse> listTransactionsAsync(
    final String locationId,
    final String beginTime,
    final String endTime,
    final String sortOrder,
    final String cursor)

Parameters

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 Query, Optional The order in which results are listed in the response (ASC for
oldest 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.

Response Type

ListTransactionsResponse

Example Usage

String locationId = "location_id4";

transactionsApi.listTransactionsAsync(locationId, null, null, null, null).thenAccept(result -> {
    // TODO success callback handler
}).exceptionally(exception -> {
    // TODO failure callback handler
    return null;
});

Retrieve Transaction

This endpoint is deprecated.

Retrieves details for a single transaction.

CompletableFuture<RetrieveTransactionResponse> retrieveTransactionAsync(
    final String locationId,
    final String transactionId)

Parameters

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.

Response Type

RetrieveTransactionResponse

Example Usage

String locationId = "location_id4";
String transactionId = "transaction_id8";

transactionsApi.retrieveTransactionAsync(locationId, transactionId).thenAccept(result -> {
    // TODO success callback handler
}).exceptionally(exception -> {
    // TODO failure callback handler
    return null;
});

Capture Transaction

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.

CompletableFuture<CaptureTransactionResponse> captureTransactionAsync(
    final String locationId,
    final String transactionId)

Parameters

Parameter Type Tags Description
locationId String Template, Required -
transactionId String Template, Required -

Response Type

CaptureTransactionResponse

Example Usage

String locationId = "location_id4";
String transactionId = "transaction_id8";

transactionsApi.captureTransactionAsync(locationId, transactionId).thenAccept(result -> {
    // TODO success callback handler
}).exceptionally(exception -> {
    // TODO failure callback handler
    return null;
});

Void Transaction

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.

CompletableFuture<VoidTransactionResponse> voidTransactionAsync(
    final String locationId,
    final String transactionId)

Parameters

Parameter Type Tags Description
locationId String Template, Required -
transactionId String Template, Required -

Response Type

VoidTransactionResponse

Example Usage

String locationId = "location_id4";
String transactionId = "transaction_id8";

transactionsApi.voidTransactionAsync(locationId, transactionId).thenAccept(result -> {
    // TODO success callback handler
}).exceptionally(exception -> {
    // TODO failure callback handler
    return null;
});