---
title: "Cancel link"
method: DELETE
path: "/api/payments/{paymentId}"
tags: ["Generate or cancel"]
---

# Cancel link

`DELETE /api/payments/{paymentId}`

## Request

- Base URL: `https://sandbox-l.ppay.io`
- URL: `https://sandbox-l.ppay.io/api/payments/{paymentId}`
- Auth: HTTP bearer

Cancel a previously-generated link by supplying the unique paymentId which is returned to you in the payment response.

For more information, see the [documentation](https://developer.peachpayments.com/docs/cancel-link), and for sample calls, see the [public Postman collection](https://www.postman.com/peachpayments/peach-payments-public-workspace/request/8zmun8z/payment-links-public?action=share&creator=20323380&ctx=documentation&active-environment=13324425-10da86ae-9bc2-4124-8f55-f7255fa3ff55).

## Response `200`

Payment link successfully cancelled.

- MessageResponse: A generic response containing a human-readable message.
  - `message` string, required

## Other responses

- `401`: Request lacks valid authentication.
- `404`: The specified resource was not found.

---

[API](https://skmtc.dev/peachpayments/apis/payment-links.md) - [All operations](https://skmtc.dev/peachpayments/apis/payment-links/llms.txt) - [OpenAPI document](https://skmtc.dev/peachpayments/apis/payment-links/revisions/3a63dca6b297?raw)
