# List charges

Return a paginated list of charges.

Endpoint: GET /charges
Version: V5
Security: bearerAuth, basicAuth

## Query parameters:

  - `limit` (integer)
    Limit the number of charges returned.

  - `page` (string)
    Specify the page of charges returned.

  - `search` (string)
    Search across supported charge fields.

Search is applied to charge and associated record values including:
`id`, `number`, `merchant_invoice.order_number`, `merchant_invoice.po_number`,
and customer/merchant identifying fields.

  - `order` (string)
    Sort charges by field. Prefix with `-` for descending order.

Examples:
- `order=-created_at`
- `order=amount`

  - `starting_at` (string)
    Return charges created at or after this timestamp.

  - `ending_at` (string)
    Return charges created at or before this timestamp.

## Response 200 fields (application/json):

  - `count` (integer)
    Example: 1

  - `limit` (integer)
    Example: 25

  - `page` (integer)
    Example: 1

  - `results` (array)

  - `results.id` (string)
    Unique identifier for the charge.
    Example: PMMlaE5wbg0

  - `results.amount` (number)
    Authorized amount of the charge in USD.
    Example: 1000

  - `results.customer_id` (string)
    Unique identifier of the customer.
    Example: X50sgfRd

  - `results.amount_refunded` (number)
    Total refunded amount for the charge in USD.
    Example: 0

  - `results.canceled` (boolean)
    Indicates whether the charge is canceled.
    Example: false

  - `results.canceled_at` (string)
    Date the charge was canceled.
    Example: null

  - `results.captured` (boolean)
    Indicates whether the charge has been captured.
    Example: true

  - `results.captured_at` (string)
    Date the charge was captured.
    Example: 2020-01-02T00:00:00.730Z

  - `results.created_at` (string)
    Date the charge was created.
    Example: 2020-01-01T00:00:00.730Z

  - `results.invoice_url` (string)
    URL of the invoice document associated with this charge.
    Example: https://example.com/invoice.pdf

  - `results.number` (string)
    Charge number identifier.
    Example: ch_100001

  - `results.terms` (string)
    Payment terms associated with the charge.
    Enum: "due_upon_receipt", "net7", "net10", "net10th", "net15", "net20", "net30", "net45", "net60", "net75", "net90", "net120", "net180"

  - `results.updated_at` (string)
    Date the charge was last updated.
    Example: 2020-01-02T00:00:00.730Z

  - `results.merchant_invoice_id` (string)
    ID of the merchant invoice associated with the charge.
    Example: INabc123

  - `results.order_number` (string)
    Order number associated with the charge.
    Example: 5055

  - `results.po_number` (string)
    PO number associated with the charge.
    Example: PO-555

  - `results.fee` (number)
    Fee amount associated with the charge in USD.
    Example: 25.5

  - `results.fee_refunded` (number)
    Refunded fee amount for the charge in USD.
    Example: 0

## Response 400 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Validation error

  - `error.type` (string)
    A short string, describing error type
    Enum: "validation_error"

  - `error.details` (array)

  - `error.details.path` (string)
    Path to the field failed validation
    Example: path.to.field

  - `error.details.message` (string)
    Detailed description of the error
    Example: `[field]` is required

## Response 401 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Invalid merchant credentials

  - `error.type` (string)
    A short string, describing error type
    Enum: "authentication_error"

## Response 429 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Too many requests

  - `error.type` (string)
    A short string, describing error type
    Enum: "rate_limit_error"

