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

# Update a payment link



## OpenAPI

````yaml /openapi.json patch /api/v1/business/links/{id}
openapi: 3.0.0
info:
  title: Axra Public API
  description: Merchant and third-party developer API surface
  version: '2026-04-15'
  contact: {}
servers:
  - url: http://localhost:3001
    description: Local development
  - url: https://staging-api.useaxra.com
    description: Staging
  - url: https://api.useaxra.com
    description: Production
security: []
tags: []
paths:
  /api/v1/business/links/{id}:
    patch:
      tags:
        - Payment Links
      summary: Update a payment link
      operationId: BusinessPaymentsController_updateLink
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLinkDto'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/LinkResponseDto'
                required:
                  - success
                  - data
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorEnvelopeDto'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorEnvelopeDto'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorEnvelopeDto'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorEnvelopeDto'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorEnvelopeDto'
        '422':
          description: Unprocessable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorEnvelopeDto'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorEnvelopeDto'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorEnvelopeDto'
components:
  schemas:
    UpdateLinkDto:
      type: object
      properties:
        title:
          type: string
          example: My Payment Page
        description:
          type: string
          example: Pay for goods and services
        avatarUrl:
          type: string
          example: https://example.com/avatar.png
        accentColor:
          type: string
          example: '#6366f1'
        thankYouMessage:
          type: string
          example: Thank you for your payment!
        amountType:
          type: string
          example: flexible
          description: '"flexible" | "fixed" | "preset"'
        fixedAmount:
          type: number
          example: 49.99
        presetAmounts:
          example:
            - 5
            - 10
            - 25
            - 50
            - 100
          type: array
          items:
            type: string
        currency:
          type: string
          example: USD
        minAmount:
          type: number
          example: 1
        maxAmount:
          type: number
          example: 10000
        acceptsCard:
          type: boolean
          example: true
        acceptsCrypto:
          type: boolean
          example: false
        collectName:
          type: boolean
          example: true
        collectEmail:
          type: boolean
          example: true
        collectNote:
          type: boolean
          example: true
        isActive:
          type: boolean
          example: true
        config:
          type: object
          description: Church-specific config
    LinkResponseDto:
      type: object
      properties:
        id:
          type: string
        businessId:
          type: string
        slug:
          type: string
        title:
          type: string
        description:
          type: string
        amount:
          type: number
        currency:
          type: string
        type:
          type: string
          enum:
            - link
            - church
        isActive:
          type: boolean
        redirectUrl:
          type: string
        metadata:
          type: object
          additionalProperties: true
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - id
        - businessId
        - slug
        - title
        - amount
        - currency
        - type
        - isActive
        - createdAt
        - updatedAt
    HttpErrorEnvelopeDto:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          $ref: '#/components/schemas/HttpErrorBodyDto'
      required:
        - success
        - error
    HttpErrorBodyDto:
      type: object
      properties:
        code:
          type: string
          example: VALIDATION_ERROR
        message:
          type: string
          example: email must be an email
        statusCode:
          type: number
          example: 400
        errors:
          type: object
          description: >-
            Optional per-field validation messages (when present on the source
            exception)
          additionalProperties:
            type: array
            items:
              type: string
      required:
        - code
        - message
        - statusCode

````