# Mint a hosted pay-page link for an invoice

`POST /api/v1/invoices/{id}/pay-link`

The token in the URL is the whole authorization for viewing and paying that invoice, and it expires after 30 days. Treat the URL as a credential.

Needs the `invoices:write` scope, or a full-access key.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | required |  |

## Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | optional | A unique value for this operation, chosen by you. A retry with the same key and the same body returns the first response instead of running again. The same key with a different body answers 409 `idempotency_key_reused`; a key whose first request is still running answers 409 `idempotency_in_progress`. |

## Responses

### 201

Signed pay link.

JSON Schema:

```json
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "expires_at": {
          "type": "string"
        }
      },
      "required": [
        "url",
        "expires_at"
      ]
    },
    "_agent": {
      "type": "object",
      "properties": {
        "summary": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "ok"
          ]
        },
        "next_actions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "summary",
        "status",
        "next_actions",
        "warnings"
      ]
    },
    "api_version": {
      "type": "string",
      "example": "2026-07-01"
    }
  },
  "required": [
    "data",
    "_agent",
    "api_version"
  ]
}
```
