<- Payments API

Payments API

All versions ->

List payments

GET

 /v2/payments

Retrieves a list of payments taken by the account making the request.

Results are eventually consistent, and new payments or changes to payments might take several seconds to appear.

The maximum results per page is 100.

Permissions:PAYMENTS_READ
Try in API Explorer
Link to section

Query parameters

Example code

Link to section

begin_time

string

Indicates the start of the time range to retrieve payments for, in RFC 3339 format.
The range is determined using the created_at field for each Payment. Inclusive. Default: The current time minus one year.

Link to section

end_time

string

Indicates the end of the time range to retrieve payments for, in RFC 3339 format. The range is determined using the created_at field for each Payment.

Default: The current time.

Link to section

sort_order

string

The order in which results are listed by ListPaymentsRequest.sort_field:

  • ASC - Oldest to newest.
  • DESC - Newest to oldest (default).
Link to section

cursor

string

A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for the original query.

For more information, see Pagination.

Link to section

location_id

string

Limit results to the location supplied. By default, results are returned for the default (main) location associated with the seller.

Link to section

total

integer(64-bit)

The exact amount in the total_money for a payment.

Link to section

last_4

string

The last four digits of a payment card.

Link to section

card_brand

string

The brand of the payment card (for example, VISA).

Link to section

limit

integer(32-bit)

The maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page.

The default value of 100 is also the maximum allowed value. If the provided value is greater than 100, it is ignored and the default value is used instead.

Default: 100

Link to section

is_offline_payment

boolean

Whether the payment was taken offline or not.

Link to section

offline_begin_time

string

Indicates the start of the time range for which to retrieve offline payments, in RFC 3339 format for timestamps. The range is determined using the offline_payment_details.client_created_at field for each Payment. If set, payments without a value set in offline_payment_details.client_created_at will not be returned.

Default: The current time.

Examples for January 25th, 2020 6:25:34pm Pacific Standard Time:

UTC: 2020-01-26T02:25:34Z

Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00

Link to section

offline_end_time

string

Indicates the end of the time range for which to retrieve offline payments, in RFC 3339 format for timestamps. The range is determined using the offline_payment_details.client_created_at field for each Payment. If set, payments without a value set in offline_payment_details.client_created_at will not be returned.

Default: The current time.

Examples for January 25th, 2020 6:25:34pm Pacific Standard Time:

UTC: 2020-01-26T02:25:34Z

Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00

Link to section

updated_at_begin_time

string

Indicates the start of the time range to retrieve payments for, in RFC 3339 format. The range is determined using the updated_at field for each Payment.

Link to section

updated_at_end_time

string

Indicates the end of the time range to retrieve payments for, in RFC 3339 format. The range is determined using the updated_at field for each Payment.

Link to section

sort_field

string

The field used to sort results by. The default is CREATED_AT.

Link to section

Response fields

Link to section

errors

Information about errors encountered during the request.

Link to section

payments

The requested list of payments.

Link to section

cursor

string

The pagination cursor to be used in a subsequent request. If empty, this is the final response.

For more information, see Pagination.