> ## Documentation Index
> Fetch the complete documentation index at: https://developer.vetcove.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a payment link

> Updates an existing payment link by its ID.



## OpenAPI

````yaml put /ext/v2/payment-links/{payment_link_id}/
openapi: 3.1.0
info:
  description: ''
  title: NinjaAPI
  version: 2.0.0
servers:
  - url: https://connect.vetcove.com/
security: []
paths:
  /ext/v2/payment-links/{payment_link_id}/:
    put:
      tags:
        - Payment Methods
      summary: Update a payment link
      description: Updates an existing payment link by its ID.
      operationId: payment_links_update
      parameters:
        - description: The ID of the payment link to update
          in: path
          name: payment_link_id
          required: true
          schema:
            description: The ID of the payment link to update
            title: Payment Link Id
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalPaymentLinkUpdateSchema'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalPaymentLinkDetailSchema'
          description: OK
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalPaymentLinkCreateErrorSchema'
          description: Unprocessable Content
      security:
        - ExternalAPIAuth: []
components:
  schemas:
    ExternalPaymentLinkUpdateSchema:
      description: Schema for the PaymentLinksUpdateExternalAPIController request body
      properties:
        callback_urls:
          anyOf:
            - $ref: '#/components/schemas/PaymentLinkCallbackUrlsSchema'
            - type: 'null'
          description: >-
            Callback URLs for redirecting after payment completion or
            cancellation.
        connect_metadata:
          anyOf:
            - type: object
            - type: 'null'
          description: Metadata to be set by the client on the payment link.
          title: Connect Metadata
        custom_text:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            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.
          title: Custom Text
      title: ExternalPaymentLinkUpdateSchema
      type: object
    ExternalPaymentLinkDetailSchema:
      description: Additional fields for list/detail views
      properties:
        callback_urls:
          anyOf:
            - $ref: '#/components/schemas/PaymentLinkCallbackUrlsSchema'
            - type: 'null'
          description: >-
            Callback URLs for redirecting after payment completion or
            cancellation.
        client_payment_ids:
          default: []
          description: >-
            The ID's of the client payments associated with this payment link,
            if any payments have been made.
          items:
            type: integer
          title: Client Payment Ids
          type: array
        clinic_client_id:
          description: The ID of the client this payment link is for.
          title: Clinic Client Id
          type: integer
        clinic_id:
          description: The ID of the clinic this payment link is for.
          title: Clinic Id
          type: integer
        connect_metadata:
          anyOf:
            - type: object
            - type: 'null'
          description: Metadata to be set by the client on the payment link.
          title: Connect Metadata
        custom_text:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            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.
          title: Custom Text
        entity_ids:
          description: >-
            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]).
          items:
            type: integer
          title: Entity Ids
          type: array
        expires_on:
          description: The timestamp at which this payment link will expire.
          format: date-time
          title: Expires On
          type: string
        id:
          description: The unique identifier for the payment link.
          title: Id
          type: integer
        is_deleted:
          default: false
          description: Whether this payment link has been deleted.
          title: Is Deleted
          type: boolean
        is_expired:
          description: Whether this payment link has expired.
          title: Is Expired
          type: boolean
        kind:
          $ref: '#/components/schemas/PaymentLinkKind'
          description: The kind of entity to be included in this payment link.
        url:
          description: The URL for the payment link.
          title: Url
          type: string
      required:
        - clinic_id
        - entity_ids
        - kind
        - id
        - clinic_client_id
        - expires_on
        - is_expired
        - url
      title: ExternalPaymentLinkDetailSchema
      type: object
    ExternalPaymentLinkCreateErrorSchema:
      properties:
        error:
          description: Details for why this operation could not be completed
          title: Error
          type: string
      required:
        - error
      title: ExternalPaymentLinkCreateErrorSchema
      type: object
    PaymentLinkCallbackUrlsSchema:
      description: Schema for payment link callback URLs
      properties:
        on_cancel:
          anyOf:
            - type: string
            - type: 'null'
          description: Redirect URL when payment is cancelled
          title: On Cancel
        on_success:
          anyOf:
            - type: string
            - type: 'null'
          description: Redirect URL after successful payment completion
          title: On Success
      title: PaymentLinkCallbackUrlsSchema
      type: object
    PaymentLinkKind:
      enum:
        - INVOICE
        - ESTIMATE
        - APPOINTMENT
        - CARE_PLAN
        - CARE_PLAN_PAYMENT_METHOD_UPDATE
      title: PaymentLinkKind
      type: string
  securitySchemes:
    ExternalAPIAuth:
      scheme: bearer
      type: http

````