# List payments

Endpoint: GET /orders/{direction}/{orderID}/payments
Version: 1.0.445.36017
Security: OAuth2

## Path parameters:

  - `direction` (string, required)
    Direction of the order, from the current user's perspective.
    Enum: "Incoming", "Outgoing", "All"

  - `orderID` (string, required)
    ID of the order.

## Query parameters:

  - `search` (string)
    Word or phrase to search for.

  - `searchOn` (array)
    Comma-delimited list of fields to search on.
    Enum: "ID", "Description"

  - `sortBy` (array)
    Comma-delimited list of fields to sort by.
    Enum: "DateCreated", "ID", "Type", "CreditCardID", "SpendingAccountID", "!DateCreated", "!ID", "!Type", "!CreditCardID", "!SpendingAccountID"

  - `page` (integer)
    Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

  - `pageSize` (integer)
    Number of results to return per page.

  - `filters` (object)
    An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

## Response 200 fields (application/json):

  - `Items` (array)
    Example: [{"ID":"","Type":"PurchaseOrder","DateCreated":"2018-01-01T00:00:00-06:00","CreditCardID":"","SpendingAccountID":"","Description":"","Currency":"","Amount":0,"Accepted":false,"OrderReturnID":"","xp":{},"Transactions":[{"ID":"","Type":"","DateExecuted":"2018-01-01T00:00:00-06:00","Currency":"","Amount":0,"Succeeded":false,"ResultCode":"","ResultMessage":"","xp":{}}]}]

  - `Items.ID` (string)

  - `Items.Type` (string)
    Enum: "PurchaseOrder", "CreditCard", "SpendingAccount"

  - `Items.DateCreated` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `Items.CreditCardID` (string)
    Only writeable on create.

  - `Items.SpendingAccountID` (string)
    Only writeable on create.

  - `Items.Description` (string)

  - `Items.Currency` (string)
    Inherited from order.

  - `Items.Amount` (number)
    If null, payment applies to order total (or total of specific line items, if set), less any other payments where Amount is set. Value can only be negative if processing a payment for an order return.

  - `Items.Accepted` (boolean)
    All payments must be Accepted to submit an order. This property should be updated after authorizing or capturing the payment in your middleware by a user with the elevated OrderAdmin role.

  - `Items.OrderReturnID` (string)
    Used to indicate this payment is associated with an order return.

  - `Items.xp` (object)
    Example: {}

  - `Items.Transactions` (array)
    Example: [{"ID":"","Type":"","DateExecuted":"2018-01-01T00:00:00-06:00","Currency":"","Amount":0,"Succeeded":false,"ResultCode":"","ResultMessage":"","xp":{}}]

  - `Items.Transactions.ID` (string)

  - `Items.Transactions.Type` (string)

  - `Items.Transactions.DateExecuted` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `Items.Transactions.Currency` (string)
    Usually the same as Payment.Currency, but can be different. A marketplace owner may capture funds from the buyer user in one currency and process a payout to the seller in another.

  - `Items.Transactions.Amount` (number)
    Usually the same as Payment.Amount, but can be different. A charge might have a subsequent partial credit, for example.

  - `Items.Transactions.Succeeded` (boolean)

  - `Items.Transactions.ResultCode` (string)

  - `Items.Transactions.ResultMessage` (string)

  - `Items.Transactions.xp` (object)
    Example: {}

  - `Meta` (object)

  - `Meta.Page` (integer)

  - `Meta.PageSize` (integer)

  - `Meta.TotalCount` (integer)

  - `Meta.TotalPages` (integer)

  - `Meta.ItemRange` (array)

  - `Meta.NextPageKey` (string)

## Response 4XX fields (application/json):

  - `StatusCode` (integer)
    Example: "404"

  - `ErrorCode` (string)
    Example: "NotFoundError"

  - `Message` (string)
    Example: "Object not found"

  - `Data` (object)
    Example: {"ObjectType":"","ObjectID":""}


