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

# List Payment Links

> Retrieve a list of all payment links with optional filtering

# List Payment Links

Returns a paginated list of payment links, ordered by creation date (most recent first). Supports filtering by status, customer, and date range.

## Authentication

```bash theme={null}
Authorization: Bearer glm_test_YOUR_API_KEY
```

## Query Parameters

| Parameter | Type | Description |
| :- | :- | :- |
| `limit` | integer | Number of results per page (default: 10, max: 100) |
| `starting_after` | string | Cursor for pagination (payment link ID) |
| `status` | enum | Filter by status: `active`, `paid`, `expired`, `cancelled` |
| `customer_email` | string | Filter by customer email |
| `payment_type` | enum | Filter by type: `one_time`, `subscription` |
| `created_after` | timestamp | Filter links created after this date |
| `created_before` | timestamp | Filter links created before this date |

## Response

> All monetary amounts are integers in cents (e.g., 4995 = \$49.95).

```json theme={null}
{
  "data": [
    {
      "id": "plink_abc123",
      "url": "https://checkout.withgale.com/pay/plink_abc123",
      "amount": 4995,
      "currency": "USD",
      "description": "Blood Pressure Monitor",
      "payment_type": "one_time",
      "status": "paid",
      "customer": {
        "email": "customer@example.com"
      },
      "order": {
        "id": "ord_xyz789"
      },
      "created_at": "2026-02-25T14:30:00Z",
      "paid_at": "2026-02-25T15:30:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": "plink_abc123"
}
```

## Response Fields

| Field | Type | Description |
| :- | :- | :- |
| `data` | array | Array of payment link objects |
| `has_more` | boolean | Whether more results are available |
| `next_cursor` | string | Cursor for next page (use as `starting_after`) |

## Examples

### List All

```bash theme={null}
curl https://api.withgale.com/api/v2/payment-links \
  -H "Authorization: Bearer glm_test_YOUR_API_KEY"
```

### Filter by Status

```bash theme={null}
curl "https://api.withgale.com/api/v2/payment-links?status=paid&limit=50" \
  -H "Authorization: Bearer glm_test_YOUR_API_KEY"
```

### Filter by Customer

```bash theme={null}
curl "https://api.withgale.com/api/v2/payment-links?customer_email=jane@example.com" \
  -H "Authorization: Bearer glm_test_YOUR_API_KEY"
```

## Errors

| Status Code | Error Code | Description |
| :- | :- | :- |
| 400 | `invalid_request` | Invalid query parameters |
| 401 | `unauthorized` | Invalid or missing API key |

## Related

* [Create Payment Link](/api-reference/endpoint/create-payment-link)
* [Get Payment Link](/api-reference/endpoint/get-payment-link)
* [Cancel Payment Link](/api-reference/endpoint/cancel-payment-link)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.