# Read payer instructions

Read payer instructions

`GET https://api.cadmospay.com/app/v1/gateway/checkout/{token}`

Use the link token from createLink. Your backend can present these instructions in its own checkout. This read needs no bearer token. The route allows 30 reads per minute per IP. Keep the checkout token out of logs. Refresh after a partial payment. Use the signed webhook or authenticated settlements feed to confirm a credit.

## Authentication

This endpoint accepts requests without a bearer token.

## Example requests

```bash
curl --fail-with-body "https://api.cadmospay.com/app/v1/gateway/checkout/${CHECKOUT_TOKEN:?Set CHECKOUT_TOKEN}"
```

```javascript
const { CHECKOUT_TOKEN } = process.env;
if (!CHECKOUT_TOKEN) {
  throw new Error("Set CHECKOUT_TOKEN");
}

const url = new URL("https://api.cadmospay.com/app/v1/gateway/checkout/{token}".replace("{token}", encodeURIComponent(CHECKOUT_TOKEN)));
const response = await fetch(url, {
  method: "GET",
  redirect: "error",
});
console.log(response.status, await response.json());
```

```python
from http.client import HTTPSConnection
import os

conn = HTTPSConnection("api.cadmospay.com", timeout=30)
path = f"/app/v1/gateway/checkout/{os.environ['CHECKOUT_TOKEN']}"
conn.request("GET", path)
response = conn.getresponse()
print(response.status, response.read().decode())
conn.close()
```

## Parameters

- `token` (string, path, required, pattern ^[A-Za-z0-9_-]{43}$). Checkout secret returned as token by createLink.

## Responses

### 200

Current payer-facing options. A paid fixed order has empty cryptoRoutes and methods.

[Checkout](https://cadmospay.com/developers/schemas/checkout.md)

```json
{
  "kind": "order",
  "description": "Example order",
  "ownerDisplayName": "Example merchant",
  "receiverAddress": "0x0000000000000000000000000000000000000042",
  "rhinoAddresses": [],
  "status": "unpaid",
  "grossReceivedUsd": "0.00",
  "amountUsd": "100.00",
  "leftUsd": "100.00",
  "paid": false,
  "cryptoRoutes": [
    {
      "coin": "USDC",
      "chain": "ARBITRUM",
      "network": "Arbitrum",
      "depositAddress": "0x0000000000000000000000000000000000000042",
      "minUsd": null
    },
    {
      "coin": "USDT",
      "chain": "ARBITRUM",
      "network": "Arbitrum",
      "depositAddress": "0x0000000000000000000000000000000000000042",
      "minUsd": null
    }
  ],
  "methods": [
    {
      "code": "whish",
      "title": "Whish",
      "iconUrl": null,
      "countries": [
        "lb"
      ],
      "currency": "USD",
      "minUsd": "5",
      "maxUsd": "500",
      "whatsappNumber": "12025550123",
      "chatUrl": "https://wa.me/12025550123?text=Pay%20ABC123",
      "payUsd": "101.00"
    }
  ]
}
```

### 404

The link is unavailable. Remove any previously displayed instructions.

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

### 410

GATEWAY_LINK_EXPIRED or GATEWAY_LINK_CLOSED. Stop displaying all instructions.

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

### 429

Over a limit. Wait and retry.

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

### 503

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)
