<!-- canonical: https://docs.costplus.io/api-reference/payment-links/getPaymentLink -->

> Retrieve the details of a payment link, including all associated orders grouped by status.
# Get a payment link

Retrieve the details of a payment link, including all associated orders grouped by status.

## Endpoint

```
GET /paymentlinks/{id}
```

## Authentication

HTTP Basic — use your API key as the username with an empty password.

```bash
curl -u YOUR_API_KEY: https://api.costplus.online/v1/paymentlinks/{id}/
```

## Parameters

| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | `id` | string | yes | The payment link ID (returned when the link was created) |

## Responses

### 200 — The payment link

```json
{
  "id": "e6eecc6a-47c5-4948-bcc0-d8b73f5c55a1",
  "merchant_order_id": "invoice-1234",
  "amount": 995,
  "currency": "EUR",
  "description": "Invoice #1234",
  "expiration_period": "P30D",
  "payment_url": "https://api.costplus.online/paymentlinks/e6eecc6a-47c5-4948-bcc0-d8b73f5c55a1/",
  "status": "completed",
  "reason": "Completed",
  "completed": "2026-01-15T12:05:30.123456+00:00",
  "completed_order_id": "3bb663cc-2a20-400d-8bf6-18d9695d0c66",
  "orders": {
    "error": [
      "0d79014c-0aaa-4fd6-87c5-c8cfa5f5ac69"
    ],
    "completed": [
      "3bb663cc-2a20-400d-8bf6-18d9695d0c66"
    ]
  },
  "created": "2026-01-15T12:00:00.000000Z",
  "modified": "2026-01-15T12:05:35.654321Z"
}
```

### 401 — Invalid or missing API key

### 403 — No authorization for the requested resource

## cURL

```bash
curl -u YOUR_API_KEY: \
  https://api.costplus.online/v1/paymentlinks/e6eecc6a-47c5-4948-bcc0-d8b73f5c55a1/
```
