---
title: "Cancel a payment link"
method: DELETE
path: "/gateway/payment-links/{id}"
tags: ["Payment Links"]
---

# Cancel a payment link

`DELETE /gateway/payment-links/{id}`

## Request

- Base URL: `https://api.agentaos.ai/api/v1`
- URL: `https://api.agentaos.ai/api/v1/gateway/payment-links/{id}`
- Auth: API key in header `x-api-key`

Deactivates the link. Existing checkouts already in progress are unaffected; no new checkout can be started from it afterward. This is a state change, not a delete: the link and its payment history stay readable.

## Path parameters

- `id` string, uuid, required

## Response `200`

The link was cancelled.

- SuccessResponse
  - `success` true, required

## Other responses

- `401`: Missing or invalid `x-api-key`.
- `403`: The key is valid but the resource belongs to a different organization.
- `404`: Resource not found (or not visible to your key; the two are not distinguished).
- `409`: The resource was modified concurrently, or the action doesn't apply to its current state.

---

[API](https://skmtc.dev/agentaos/apis/agentaos-gateway-api.md) · [All operations](https://skmtc.dev/agentaos/apis/agentaos-gateway-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentaos/apis/agentaos-gateway-api/revisions/3a8ad3c6b965?raw)
