> For the complete documentation index, see [llms.txt](https://docs.txn.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.txn.io/payment-links/expiring-payment-link.md).

# Expiring payment link

<mark style="color:green;">`POST`</mark> `/api/public/v1/payment_links/:id/expiration`

Immediately expires a payment link, transitioning its status to `expired`. Only payment links with status `created` or `pending` can be expired.

**Headers**

| Name          | Value                      |
| ------------- | -------------------------- |
| Content-Type  | `application/vnd.api+json` |
| Authorization | `Bearer <api_key>`         |

**Path Parameters**

| Name | Value            |
| ---- | ---------------- |
| id   | Payment link ID. |

**Response Body**

<table><thead><tr><th>Name</th><th width="97">Type</th><th>Description</th></tr></thead><tbody><tr><td>data.id</td><td>string</td><td>Payment link ID.</td></tr><tr><td>data.type</td><td>string</td><td>Always <code>paymentLinks</code>.</td></tr><tr><td>data.attributes.amount</td><td>string</td><td>Payment amount displayed to the end user.</td></tr><tr><td>data.attributes.currency</td><td>string</td><td>Currency of the payment amount.</td></tr><tr><td>data.attributes.accountCurrency</td><td>string</td><td>Merchant account currency used for settlement or funding.</td></tr><tr><td>data.attributes.network</td><td>string</td><td>Network code selected by the end user. <code>null</code> if not yet selected.</td></tr><tr><td>data.attributes.networkName</td><td>string</td><td>Human-readable network name. <code>null</code> if not yet selected.</td></tr><tr><td>data.attributes.reference</td><td>string</td><td>Your internal correlation key, as set at creation.</td></tr><tr><td>data.attributes.hostedPageUrl</td><td>string</td><td>URL of the Txn-hosted page.</td></tr><tr><td>data.attributes.status</td><td>string</td><td>Always <code>expired</code> after a successful call.</td></tr><tr><td>data.attributes.approvalStatus</td><td>string</td><td>Approval workflow status for payout payment links subject to an approval rule. <code>null</code> otherwise.</td></tr><tr><td>data.attributes.expiresAt</td><td>string</td><td>ISO 8601 timestamp of when the payment link expired.</td></tr><tr><td>data.attributes.createdAt</td><td>string</td><td>ISO 8601 timestamp of when the payment link was created.</td></tr><tr><td>data.attributes.paymentType</td><td>string</td><td><code>Invoice</code> or <code>Payout</code>.</td></tr><tr><td>data.attributes.paymentMethods[]</td><td>array</td><td>Payment methods that were available on the hosted page.</td></tr><tr><td>data.attributes.successRedirectUrl</td><td>string</td><td>Success redirect URL. <code>null</code> if not set.</td></tr><tr><td>data.attributes.unsuccessRedirectUrl</td><td>string</td><td>Unsuccessful redirect URL. <code>null</code> if not set.</td></tr><tr><td>data.relationships.target.data</td><td>object</td><td>ID and type of the child invoice or payout. <code>null</code> if none was triggered before expiry.</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="HTTP 200" %}

```json
{
  "data": {
    "id": "e33e1727-1eba-4581-bfd5-ded60713a5b8",
    "type": "paymentLinks",
    "attributes": {
      "amount": "50.00",
      "currency": "EUR",
      "accountCurrency": "EUR",
      "network": null,
      "networkName": null,
      "reference": "docs-example-pl-payout-001",
      "hostedPageUrl": "https://sandbox.txn.io/redirect?payment_link_id=e33e1727-1eba-4581-bfd5-ded60713a5b8&request_type=payment_link_hosted_page&zone=eu",
      "status": "expired",
      "approvalStatus": null,
      "expiresAt": "2026-05-17T10:07:53.269Z",
      "createdAt": "2026-05-17T10:07:43.353Z",
      "paymentType": "Payout",
      "successRedirectUrl": null,
      "unsuccessRedirectUrl": null,
      "paymentMethods": [
        "on_chain"
      ]
    },
    "relationships": {
      "target": {
        "data": null
      }
    }
  },
  "meta": {},
  "jsonapi": {
    "version": "1.0"
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.txn.io/payment-links/expiring-payment-link.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
