> ## Documentation Index
> Fetch the complete documentation index at: https://docs-restapi.wplimit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Payments

> Retrieve a paginated list of all payment transactions.

## Query Parameters

<ParamField query="page" type="integer" default="1">
  Page number for pagination
</ParamField>

<ParamField query="per_page" type="integer" default="10">
  Number of payments per page
</ParamField>

<ParamField query="customer_id" type="integer">
  Filter payments by customer ID
</ParamField>

<ParamField query="order_id" type="integer">
  Filter payments by order ID
</ParamField>

<ParamField query="status" type="string">
  Filter payments by status. Common values: `succeeded`, `processing`, `failed`
</ParamField>

<ParamField query="payment_method" type="string">
  Filter by payment method (e.g. `cash`, `credit_card`, `paypal`, `stripe`, `mercadopago_checkout`)
</ParamField>

<ParamField query="processor" type="string">
  Filter by payment processor (e.g. `stripe`, `paypal`, `mercadopago`, `square`, `other`)
</ParamField>

<ParamField query="amount_min" type="number">
  Filter payments with amount greater than or equal to this value
</ParamField>

<ParamField query="amount_max" type="number">
  Filter payments with amount less than or equal to this value
</ParamField>

<ParamField query="date_from" type="string">
  Filter payments created on or after this date (YYYY-MM-DD)
</ParamField>

<ParamField query="date_to" type="string">
  Filter payments created on or before this date (YYYY-MM-DD)
</ParamField>

<ParamField query="search" type="string">
  Search across token, notes, and receipt number
</ParamField>

<ParamField query="sort" type="string" default="created_at">
  Field to sort results by. Valid values: `id`, `amount`, `created_at`, `status`
</ParamField>

<ParamField query="order" type="string" default="DESC">
  Sort direction. Valid values: `ASC`, `DESC`
</ParamField>

## Example Requests

### Basic Request

```bash theme={null}
GET /wp-json/latepoint-api/v1/payments
X-API-Key: YOUR_API_KEY
```

### Filter by Status

```bash theme={null}
GET /wp-json/latepoint-api/v1/payments?status=succeeded
X-API-Key: YOUR_API_KEY
```

### Filter by Order

```bash theme={null}
GET /wp-json/latepoint-api/v1/payments?order_id=37
X-API-Key: YOUR_API_KEY
```

### Filter by Customer

```bash theme={null}
GET /wp-json/latepoint-api/v1/payments?customer_id=10&per_page=5
X-API-Key: YOUR_API_KEY
```

## Example Response

```json theme={null}
{
  "success": true,
  "data": [
    {
      "id": "5",
      "token": "",
      "invoice_id": null,
      "order_id": "37",
      "customer_id": "10",
      "processor": "other",
      "payment_method": "local",
      "payment_portion": "deposit",
      "kind": "capture",
      "amount": "467.0000",
      "status": "succeeded",
      "notes": "",
      "created_at": "2025-08-21 10:35:39",
      "updated_at": "2025-08-21 10:35:39"
    },
    {
      "id": "4",
      "token": "",
      "invoice_id": null,
      "order_id": "37",
      "customer_id": "10",
      "processor": "mercadopago",
      "payment_method": "mercadopago_checkout",
      "payment_portion": "full",
      "kind": "capture",
      "amount": "233.0000",
      "status": "succeeded",
      "notes": "",
      "created_at": "2025-08-21 10:34:17",
      "updated_at": "2025-08-21 10:34:17"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 10,
    "total": 4,
    "total_pages": 1,
    "has_next_page": false,
    "has_previous_page": false
  }
}
```
