# Read a link

Read a payment link

`GET https://api.cadmospay.com/machine/v1/gateway/links`

What the link received, and on a link with an amount whether it is paid. A webhook is one payment: read the link to learn whether the order is paid. Limit: 120 reads a minute, shared with the settlements list.

## Authentication

`Authorization: Bearer <accessToken>`

The `accessToken` from `POST /v1/external-auth/token`, valid 15 minutes.

## Example requests

```bash
curl --fail-with-body 'https://api.cadmospay.com/machine/v1/gateway/links' \
  -H "Authorization: Bearer ${CADMOS_ACCESS_TOKEN:?Set CADMOS_ACCESS_TOKEN}" \
  --get \
  --data-urlencode "uuid=${REQUEST_ID:?Set REQUEST_ID}"
```

```javascript
const { CADMOS_ACCESS_TOKEN, REQUEST_ID } = process.env;
if (!CADMOS_ACCESS_TOKEN || !REQUEST_ID) {
  throw new Error("Set CADMOS_ACCESS_TOKEN and REQUEST_ID");
}

const url = new URL("https://api.cadmospay.com/machine/v1/gateway/links");
url.searchParams.set("uuid", REQUEST_ID);
const response = await fetch(url, {
  method: "GET",
  redirect: "error",
  headers: {
    Authorization: "Bearer " + CADMOS_ACCESS_TOKEN,
  },
});
console.log(response.status, await response.json());
```

```python
from http.client import HTTPSConnection
from urllib.parse import urlencode
import os

conn = HTTPSConnection("api.cadmospay.com", timeout=30)
path = "/machine/v1/gateway/links"
path += "?" + urlencode({"uuid": os.environ["REQUEST_ID"]})
headers = {
    "Authorization": "Bearer " + os.environ["CADMOS_ACCESS_TOKEN"],
}
conn.request("GET", path, headers=headers)
response = conn.getresponse()
print(response.status, response.read().decode())
conn.close()
```

## Parameters

- `uuid` (string, query, required, pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$). The link's uuid.

## Responses

### 200

The link.

[Link](https://cadmospay.com/developers/schemas/link.md)

```json
{
  "uuid": "0b6f5a8e-1c2d-4e3f-9a8b-7c6d5e4f3a2b",
  "status": "active",
  "checkoutUrl": "https://cadmospay.com/checkout/example_checkout_token_for_documentation_00",
  "receiverAddress": "0x0000000000000000000000000000000000000042",
  "externalReference": "order-42",
  "localMethods": [],
  "paymentReference": null,
  "amountUsd": "100.00",
  "countedUsd": "0.00",
  "leftUsd": "100.00",
  "paid": false,
  "kind": "order",
  "description": "Order #42",
  "createdAt": "2026-11-17T09:00:00.000Z",
  "receipts": []
}
```

### 401

No token, or a token that is expired or not for this route: sign in again.

[Error](https://cadmospay.com/developers/schemas/error.md)

### 403

Your identity is not allowed this route, or has no business wallet.

[Error](https://cadmospay.com/developers/schemas/error.md)

### 404

`GATEWAY_LINK_NOT_FOUND`: no link of yours has this uuid.

[Error](https://cadmospay.com/developers/schemas/error.md)

### 422

The request does not match this contract: `VALIDATION_ERROR` lists each field and the rule it broke. An amount outside $0.50 to $1,000,000 is refused here too.

[Error](https://cadmospay.com/developers/schemas/error.md)

### 429

Over a limit. Wait and retry.

[Error](https://cadmospay.com/developers/schemas/error.md)

### 5XX

A Cadmos service failed or did not answer (`{ "message": "Service Error" }`). Retry; retry a create with the same `requestId`.

[Error](https://cadmospay.com/developers/schemas/error.md)
