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

# Update Payment

> Update an existing payment



## OpenAPI

````yaml PUT /v1/payments/{paymentId}
openapi: 3.1.0
info:
  title: Blinksale API
  description: Official API for Blinksale - A modern invoicing solution
  version: 1.0.0
  contact:
    name: Blinksale Support
    url: https://blinksale.com/contact
    email: support@blinksale.com
servers:
  - url: https://app.blinksale.test/api
    description: Development server
  - url: https://blinksale.avenues.dev/api
    description: Staging server
  - url: https://app.blinksale.com/api
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Organizations
    description: Operations for managing organizations
  - name: Profile
    description: Operations for managing user profiles
  - name: Clients
    description: Operations for managing clients
  - name: Contacts
    description: Operations for managing client contacts
  - name: Estimates
    description: Operations for managing estimates
  - name: Invoices
    description: Operations for managing invoices
  - name: Payments
    description: Operations for managing payments
  - name: Recurring Invoices
    description: Operations for managing recurring invoices
  - name: Taxes
    description: Operations for managing tax rates
  - name: Units
    description: Operations for managing units of measurement
  - name: Saved Items
    description: Operations for managing saved items/products
  - name: Enums
    description: Operations for retrieving enumeration values
paths:
  /v1/payments/{paymentId}:
    put:
      tags:
        - Payments
      summary: Update payment
      description: Updates an existing payment
      operationId: updatePayment
      parameters:
        - name: paymentId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The ID of the payment to update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - amount
              properties:
                amount:
                  type: number
                  format: float
                  example: 1000
                payment_date:
                  type: string
                  format: date
                  nullable: true
                  example: '2023-06-25'
                is_settled:
                  type: boolean
                  example: true
                notes:
                  type: string
                  nullable: true
                  example: Payment via bank transfer
      responses:
        '200':
          description: Payment updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Payment updated successfully
                  data:
                    $ref: '#/components/schemas/Payment'
        '400':
          description: Update failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Payment not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Payment:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 01jtbf0c9zaraqx3swthf88n5y
        organization_id:
          type: string
          format: uuid
          example: 01jtbf0c9zaraqx3swthf88n5y
        invoice_id:
          type: string
          format: uuid
          example: 01jtbf0c9zaraqx3swthf88n5y
        amount:
          type: number
          format: float
          example: 500
        is_settled:
          type: boolean
          example: true
        payment_date:
          type: string
          format: date
          example: '2023-06-25'
        notes:
          type: string
          nullable: true
          example: 'Payment via check #12345'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - success
        - message
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          example: An error occurred
        errors:
          type: object
          description: Validation errors by field
          example:
            email:
              - The email field is required.
    ValidationError:
      type: object
      required:
        - success
        - message
        - errors
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          example: Validation error
        errors:
          type: object
          description: Validation errors by field
          example:
            email:
              - The email field must be a valid email address.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Access token obtained from the /v1/auth/login endpoint

````