# Update a payment link (/docs/api/payment-links/update-payment-link)

## Update a payment link

`POST https://runepay.co/api/v1/payment_links/{id}`

Changes `active`, `name` or `description`. Omitted fields keep their value.

Scope: `payment_links:write`

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `id` (required) | path | string | The object id. |
| `Idempotency-Key` | header | string | Makes a retry safe: the same key and body within 24 hours does not repeat the request. |

Body:

| Field | Type | Description |
| --- | --- | --- |
| `active` | boolean |  |
| `name` | string |  |
| `description` | string or null | null clears it. |

Example request body:

```json
{
  "active": false
}
```

Response `200`:

```json
{
  "id": "plink_01KA7D4E6F8G0H2J4K6M8N0P2Q",
  "object": "payment_link",
  "livemode": false,
  "active": false,
  "name": "Pro plan",
  "description": "One month of Pro",
  "amount": 1999,
  "min_amount": null,
  "max_amount": null,
  "currency": "USD",
  "success_url": "https://merchant.example/thanks",
  "metadata": {
    "plan": "pro"
  },
  "url": "https://runepay.co/pay/l/plink_01KA7D4E6F8G0H2J4K6M8N0P2Q",
  "created": 1767225600,
  "updated": 1767312000
}
```

Errors: 400, 401, 403, 404, 409, 413, 422, 500, 503, with the [error shape](/docs/api/errors).
