---
search:
  tags:
    - Payments
    - POST
seo:
  description: >-
    Owner only. credits is limited to 100 or 500 (i.e. $1.00 or $5.00 at 1…
    Reference for the POST /v1/payments/checkout endpoint in the agentsub
    Gateway API.
sidebar:
  label: Create a Link checkout session
  badge: POST
title: Create a Link checkout session
type: openapi-operation
---
Owner only. `credits` is limited to 100 or 500 (i.e. $1.00 or $5.00 at 1 credit = $0.01). Requires an `Idempotency-Key`.

`POST /v1/payments/checkout`

**Request body** (`application/json`, required)

- `agentId` (string, required)
- `credits` (integer, required)

Request body example:

```json
{
  "agentId": "string",
  "credits": 100
}
```

**Responses**

- `200` — Checkout session (hosted Link approval URL)
- `400` — \`invalid\_input\` or \`idempotency\_required\` payment error
- `403` — \`owner\_required\` when called with an agent token
- `503` — \`payment\_unavailable\`

Response example, 200:

```json
{}
```
