invalidate_payment_link_if_pending
Cancel a payment link only if it's still pending; otherwise do nothing. Use to retire abandoned checkouts or withdraw mispriced links safely, without affecting already-paid orders.
Instructions
Cancel a payment link only if it is still pending; otherwise do nothing.
Use this to retire a checkout the buyer abandoned, or to withdraw a link you priced
wrong before anyone pays it. It is the safe version of `invalidate_payment_link`,
which cancels without checking status first.
A success response does NOT mean the link was cancelled — Wayl also answers with
success when the link was not pending and nothing happened. Do not report the order
as cancelled on the strength of this call alone; confirm with `get_payment_link`.
Cancellation is irreversible: nobody can pay through that URL afterwards and you
would have to issue a new link with a fresh reference ID. This never moves money —
to return money on an order that was already paid, use `create_refund`.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reference_id | Yes | Reference ID of the link to cancel. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||