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

# List all payment links

` GET /payment-links `

List all payment links

## Servers

- ` https://platform-api.anyspend.com/api/v1 ` — Current server

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` apiKeyBearer `: ` http `

  - HTTP scheme: ` bearer `

  - API key passed as Bearer token. Keys start with `asp_`.

### Alternative 2

- ` apiKeyHeader `: ` apiKey `

  - Credential: ` X-API-Key ` in ` header `

  - API key passed via X-API-Key header.

## Parameters

### ` page ` (query, optional)

Page number

- ` value `: type ` integer `

  - default: ` 1 `

### ` limit ` (query, optional)

Items per page

- ` value `: type ` integer `

  - default: ` 20 `

  - maximum: ` 100 `

### ` search ` (query, optional)

- ` value `: type ` string `

### ` active ` (query, optional)

- ` value `: type ` string `

  - enum: ` ["true","false"] `

### ` sort ` (query, optional)

- ` value `: type ` string `

  - enum: ` ["created_at","updated_at","name","current_uses"] `

### ` order ` (query, optional)

- ` value `: type ` string `

  - enum: ` ["asc","desc"] `

## Responses

### ` 200 ` — List of payment links

Content type: ` application/json `

- ` value `: type ` object `

  - ` object `: type ` string `

  - ` data `: type ` array `

    - ` array item `: type ` object `

  - ` has_more `: type ` boolean `

  - ` total_count `: type ` integer `

  - ` url `: type ` string `

## Request examples

### cURL

```curl
curl -X GET 'https://platform-api.anyspend.com/api/v1/payment-links' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://platform-api.anyspend.com/api/v1/payment-links', {
  method: 'GET',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN"
  }
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.get('https://platform-api.anyspend.com/api/v1/payment-links', headers=headers)
print(response.json())
```