---
title: "Update a payment link"
method: PUT
path: "/ext/v2/payment-links/{payment_link_id}/"
tags: ["Payment Methods"]
---

# Update a payment link

`PUT /ext/v2/payment-links/{payment_link_id}/`

## Request

- Base URL: `https://connect.vetcove.com`
- URL: `https://connect.vetcove.com/ext/v2/payment-links/{payment_link_id}/`
- Auth: HTTP bearer

Updates an existing payment link by its ID.

## Path parameters

- `payment_link_id` integer, required: The ID of the payment link to update

## Request body

- ExternalPaymentLinkUpdateSchema: Schema for the PaymentLinksUpdateExternalAPIController request body
  - `callback_urls` PaymentLinkCallbackUrlsSchema: Schema for payment link callback URLs
    - `on_cancel` string, nullable: Redirect URL when payment is cancelled
    - `on_success` string, nullable: Redirect URL after successful payment completion
  - `connect_metadata` object, nullable: Metadata to be set by the client on the payment link.
  - `custom_text` string, nullable: Optional plain-text message for the payment link (max 500 characters). Send a string only — rich-text JSON is not accepted. The value is stored internally as rich text.

## Response `200`

OK

- ExternalPaymentLinkDetailSchema: Additional fields for list/detail views
  - `callback_urls` PaymentLinkCallbackUrlsSchema: Schema for payment link callback URLs
    - `on_cancel` string, nullable: Redirect URL when payment is cancelled
    - `on_success` string, nullable: Redirect URL after successful payment completion
  - `client_payment_ids` integer[]: The ID's of the client payments associated with this payment link, if any payments have been made.
  - `clinic_client_id` integer, required: The ID of the client this payment link is for.
  - `clinic_id` integer, required: The ID of the clinic this payment link is for.
  - `connect_metadata` object, nullable: Metadata to be set by the client on the payment link.
  - `custom_text` string, nullable: Optional plain-text message for the payment link. Notes written in the clinic app as rich text are flattened here; formatting and paragraph breaks are not preserved.
  - `entity_ids` integer[], required: IDs of entities to be paid based on the payment link kind: for INVOICE kind, provide one or more Invoice IDs (e.g., [123, 456]); for CARE_PLAN_PAYMENT_METHOD_UPDATE kind, provide exactly one Patient Care Plan ID (e.g., [456]).
  - `expires_on` string, date-time, required: The timestamp at which this payment link will expire.
  - `id` integer, required: The unique identifier for the payment link.
  - `is_deleted` boolean: Whether this payment link has been deleted.
  - `is_expired` boolean, required: Whether this payment link has expired.
  - `kind` 'INVOICE' | 'ESTIMATE' | 'APPOINTMENT' | 'CARE_PLAN' | 'CARE_PLAN_PAYMENT_METHOD_UPDATE', required
  - `url` string, required: The URL for the payment link.

## Other responses

- `422`: Unprocessable Content

---

[API](https://skmtc.dev/vetcove/apis/ninjaapi.md) - [All operations](https://skmtc.dev/vetcove/apis/ninjaapi/llms.txt) - [OpenAPI document](https://skmtc.dev/vetcove/apis/ninjaapi/revisions/4ceaed956e15?raw)
