# List orders for a link

**GET** `/payment-links/{link_id}/orders`

Base URL: `https://api-sbx.pre.globalgetnet.com/dpy/payment-link/v1`

Lists the payment orders for a link. Returns the X-Total-Count header.

## Header parameters

- `Authorization` (string, required)
  Bearer Token (JWT). x-seller-id, country, and tenant are extracted from the token.

## Path parameters

- `link_id` (string, required)
  UUID v4 of the payment link

## Query parameters

- `created_at_start` (string)
- `created_at_end` (string)
- `first_name` (string)
- `last_name` (string)
- `document_number` (string)
- `customer` (string)
- `page` (integer)
- `limit` (integer)
- `sort` (string)
- `sort_type` (string)
- `status` (string)

## Responses

### 200

List of orders

- `order_id` (string<uuid>)
- `link_id` (string<uuid>)
- `currency` (string)
  ISO 4217 code (3 letters). Main ones: BRL, ARS, CLP, MXN, EUR, UYU, USD, COP, PEN
- `amount` (integer)
- `reference_code` (string)
- `checkout_id` (string)
- `customer` (object)
  - `first_name` (string, required)
  - `last_name` (string, required)
  - `name` (string, required)
  - `email` (string<email>, required)
  - `document_type` (string)
  - `document_number` (string)
  - `phone_number` (string)
  - `billing_address` (object)
    - `street` (string)
    - `number` (string)
    - `complement` (string)
    - `district` (string)
    - `city` (string)
    - `state` (string)
    - `country` (string)
    - `postal_code` (string)
    - `reference` (string)
- `shipping` (object)
  - `first_name` (string)
  - `name` (string)
  - `email` (string<email>)
  - `phone_number` (string)
  - `shipping_amount` (integer)
    Shipping cost in cents
  - `address` (object)
    - `street` (string)
    - `number` (string)
    - `complement` (string)
    - `district` (string)
    - `city` (string)
    - `state` (string)
    - `country` (string)
    - `postal_code` (string)
    - `reference` (string)
- `status` ("paid" | "pending" | "approved" | "refunded" | "denied" | "authentication_denied")
- `history` (object[])
- `created_at` (string<date-time>)
- `updated_at` (string<date-time>)

Example:

```json
[
  {
    "order_id": "7b22a6b5-d24d-4d6e-90e5-5b06cf41d0a1",
    "link_id": "9e5dcedc-1e5f-4e85-9b64-4d0b43d98c82",
    "currency": "BRL",
    "amount": 9990,
    "reference_code": "Pagamento do serviço prestado",
    "checkout_id": "checkout_abc123",
    "customer": {
      "first_name": "João",
      "last_name": "da Silva",
      "name": "João da Silva",
      "email": "customer@email.com.br",
      "document_type": "CPF",
      "document_number": "12345678912",
      "phone_number": "5551999887766",
      "billing_address": {
        "street": "Av. Brasil",
        "number": "1000",
        "complement": "Sala 1",
        "district": "São Geraldo",
        "city": "Porto Alegre",
        "state": "RS",
        "country": "Brasil",
        "postal_code": "90230060",
        "reference": "string"
      }
    },
    "shipping": {
      "first_name": "João",
      "name": "João da Silva",
      "email": "customer@email.com.br",
      "phone_number": "5551999887766",
      "shipping_amount": 3000,
      "address": {
        "street": "Av. Brasil",
        "number": "1000",
        "complement": "Sala 1",
        "district": "São Geraldo",
        "city": "Porto Alegre",
        "state": "RS",
        "country": "Brasil",
        "postal_code": "90230060",
        "reference": "string"
      }
    },
    "status": "paid",
    "history": [
      {}
    ],
    "created_at": "2026-03-27T12:00:00Z",
    "updated_at": "2026-03-27T12:05:00Z"
  }
]
```

### 400

Bad request - validation error

- `error_code` (string)
- `message` (string)
- `details` (object[])
  - `message` (string)
  - `path` (string)
- `status_code` (integer)

Example:

```json
{
  "error_code": "guid_error",
  "message": "x-seller-id must be a valid guid",
  "details": [
    {
      "message": "string",
      "path": "string"
    }
  ],
  "status_code": 400
}
```

### 404

Not found

- `error_code` (string)
- `message` (string)
- `status_code` (integer)

Example:

```json
{
  "error_code": "payment_link_not_found",
  "message": "Payment Link not found",
  "status_code": 422
}
```

### 422

Unprocessable entity

- `error_code` (string)
- `message` (string)
- `status_code` (integer)

Example:

```json
{
  "error_code": "payment_link_not_found",
  "message": "Payment Link not found",
  "status_code": 422
}
```

### 500

Internal server error

- `error_code` (string)
- `message` (string)
- `status_code` (integer)

Example:

```json
{
  "error_code": "payment_link_not_found",
  "message": "Payment Link not found",
  "status_code": 422
}
```