---
title: "Invalidate a specific Link if it is pending"
method: POST
path: "/api/v1/links/{referenceId}/invalidate-if-pending"
tags: ["Links"]
---

# Invalidate a specific Link if it is pending

`POST /api/v1/links/{referenceId}/invalidate-if-pending`

Invalidate a specific payment link if it is pending. If the link is not pending, it will return a success response.

## Path parameters

- `referenceId` string, required

## Response `201`

Link invalidated successfully

- object
  - `data` object
    - `referenceId` string
    - `id` string
    - `total` string
    - `currency` string
    - `paymentMethod` string
    - `status` string
    - `completedAt` string, nullable
    - `createdAt` string
    - `updatedAt` string
    - `url` string
    - `webhookUrl` string
    - `redirectionUrl` string
    - `linkExpiresIn` string — Duration until the payment link expires
  - `message` string

## Changes

- **2026-09-03** `76e77f7f7fef` — 1 info
  - added the optional property `data/reversable` to the response with the `201` status

[Change history](https://skmtc.dev/thewayl/apis/wayl-api/changes/api/v1/links/:referenceId/invalidate-if-pending/post.md)

---

[API](https://skmtc.dev/thewayl/apis/wayl-api.md) · [All operations](https://skmtc.dev/thewayl/apis/wayl-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/thewayl/wayl-api/revisions/ee660efc8daf/schema)
