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

# Actualizar pago a proveedor

> Actualiza un pago a proveedor existente y devuelve el detalle persistido. Requiere Idempotency-Key.



## OpenAPI

````yaml /api-reference/openapi.json put /api/v1/supplier-payments/{payment_id}
openapi: 3.1.0
info:
  title: La Pyme API
  description: >-
    Resources and workflows for purchases, sales, inventory, contacts, products,
    reports, and settings.
  version: 1.0.0
  contact:
    name: La Pyme Support
    email: hola@lapyme.com.ar
  license:
    name: Proprietary
    url: https://lapyme.com.ar/terminos
servers:
  - url: https://api.lapyme.com.ar
    description: Servidor de producción
security:
  - bearerAuth: []
tags:
  - name: API
    description: Public API operations for La Pyme integrations.
paths:
  /api/v1/supplier-payments/{payment_id}:
    put:
      tags:
        - API
      summary: Actualizar pago a proveedor
      description: >-
        Actualiza un pago a proveedor existente y devuelve el detalle
        persistido. Requiere Idempotency-Key.
      operationId: updateApiSupplierPayment
      parameters:
        - name: payment_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Idempotency-Key
          in: header
          description: Clave estable para deduplicar reintentos de la misma operación.
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiSupplierPaymentUpdateRequest'
      responses:
        '200':
          description: Pago actualizado exitosamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSupplierPaymentUpdateResponse'
        '400':
          description: Solicitud inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Solicitud inválida
                      retryable: false
                      details: []
        '401':
          description: API key faltante o inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: API key faltante o inválida
                      retryable: false
                      details: []
        '403':
          description: Scopes insuficientes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Scopes insuficientes
                      retryable: false
                      details: []
        '404':
          description: Pago no encontrado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Pago no encontrado
                      retryable: false
                      details: []
        '409':
          description: Conflicto de idempotencia
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Conflicto de idempotencia
                      retryable: false
                      details: []
        '429':
          description: Límite de solicitudes excedido para la organización
          headers:
            Retry-After:
              description: Segundos a esperar antes de volver a intentar la solicitud.
              schema:
                type: string
                example: '30'
            X-RateLimit-Limit:
              description: Límite de la ventana activa.
              schema:
                type: string
                example: '5000'
            X-RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa.
              schema:
                type: string
                example: '0'
            X-RateLimit-Reset:
              description: Segundos restantes hasta el reset de la ventana activa.
              schema:
                type: string
                example: '30'
            RateLimit-Limit:
              description: Límite de la ventana activa en formato estándar.
              schema:
                type: string
                example: '5000'
            RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa en formato estándar.
              schema:
                type: string
                example: '0'
            RateLimit-Reset:
              description: >-
                Segundos hasta el reset de la ventana activa en formato
                estándar.
              schema:
                type: string
                example: '30'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: RATE_LIMITED
                  value:
                    request_id: req_rate_limit_1
                    error:
                      type: rate_limit_error
                      code: RATE_LIMITED
                      message: >-
                        The organization request limit was reached. Try again
                        later.
                      retryable: true
                      details: []
        '500':
          description: Error interno del servidor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Error interno del servidor
                      retryable: false
                      details: []
components:
  schemas:
    ApiSupplierPaymentUpdateRequest:
      type: object
      properties:
        supplier_id:
          type: string
          format: uuid
        point_of_sale_id:
          type: string
          format: uuid
        payment_date:
          type: string
        currency:
          $ref: '#/components/schemas/ApiSharedEnum6cfb146157'
        exchange_rate:
          type: number
          exclusiveMinimum: 0
        total_amount:
          type: integer
          exclusiveMinimum: 0
        settlement_currency:
          $ref: '#/components/schemas/ApiSharedEnum6cfb146157'
        settlement_total_amount:
          type: integer
          exclusiveMinimum: 0
        notes:
          type: string
        splits:
          type: array
          items:
            type: object
            properties:
              payment_method_id:
                type: string
                format: uuid
              amount:
                type: integer
                exclusiveMinimum: 0
              reference:
                type: string
              card_brand:
                type: string
              card_batch_number:
                type: string
              card_coupon_number:
                type: string
              card_installment_plan_code:
                type: string
              notes:
                type: string
              fee_amount:
                type: integer
                minimum: 0
              fee_percentage_applied:
                type: string
              fee_fixed_applied:
                type: integer
                minimum: 0
              net_amount:
                type: integer
                minimum: 0
              register_id:
                type: string
                format: uuid
              safe_id:
                type: string
                format: uuid
            required:
              - payment_method_id
              - amount
            additionalProperties: false
        applications:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObjectf91176efb5'
        journal_line_applications:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObjectdaa374f786'
        credit_journal_line_applications:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObjectdaa374f786'
        credit_target_applications:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/ApiSharedObjectf91176efb5'
              - $ref: '#/components/schemas/ApiSharedObjectdaa374f786'
        credit_note_applications:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObjectc2ed2476df'
        advance_applications:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObject6447103182'
        withholdings:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObject4faf4c3ad5'
      required:
        - supplier_id
        - point_of_sale_id
        - payment_date
        - currency
        - total_amount
        - splits
      additionalProperties: false
    ApiSupplierPaymentUpdateResponse:
      type: object
      properties:
        request_id:
          type: string
        data:
          $ref: '#/components/schemas/ApiSharedObject18422faad3'
        warnings:
          type: array
          items: {}
      required:
        - request_id
        - data
        - warnings
      additionalProperties: false
    ApiErrorEnvelope:
      type: object
      properties:
        request_id:
          type: string
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - api_error
                - authentication_error
                - authorization_error
                - business_error
                - external_dependency_error
                - idempotency_error
                - invalid_request_error
                - rate_limit_error
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            details:
              type: array
              items:
                $ref: '#/components/schemas/ApiSharedObjectc671832641'
          required:
            - type
            - code
            - message
            - retryable
            - details
          additionalProperties: false
      required:
        - request_id
        - error
      additionalProperties: false
    ApiSharedEnum6cfb146157:
      type: string
      enum:
        - PES
        - DOL
    ApiSharedObjectf91176efb5:
      type: object
      properties:
        purchase_id:
          type: string
          format: uuid
        applied_amount:
          type: integer
          exclusiveMinimum: 0
      required:
        - purchase_id
        - applied_amount
      additionalProperties: false
    ApiSharedObjectdaa374f786:
      type: object
      properties:
        journal_line_id:
          type: string
          format: uuid
        applied_amount:
          type: integer
          exclusiveMinimum: 0
      required:
        - journal_line_id
        - applied_amount
      additionalProperties: false
    ApiSharedObjectc2ed2476df:
      type: object
      properties:
        credit_purchase_id:
          type: string
          format: uuid
        applied_amount:
          type: integer
          exclusiveMinimum: 0
      required:
        - credit_purchase_id
        - applied_amount
      additionalProperties: false
    ApiSharedObject6447103182:
      type: object
      properties:
        advance_payment_id:
          type: string
          format: uuid
        applied_amount:
          type: integer
          exclusiveMinimum: 0
      required:
        - advance_payment_id
        - applied_amount
      additionalProperties: false
    ApiSharedObject4faf4c3ad5:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          $ref: '#/components/schemas/ApiSharedEnum111b0d070e'
        province_id:
          anyOf:
            - type: string
            - type: 'null'
        regimen:
          anyOf:
            - type: string
            - type: 'null'
        amount:
          type: integer
        rate:
          anyOf:
            - type: number
            - type: 'null'
        calculation_base:
          anyOf:
            - type: integer
            - type: 'null'
        certificate_number:
          type: string
      required:
        - type
        - amount
        - certificate_number
      additionalProperties: false
    ApiSharedObject18422faad3:
      type: object
      properties:
        supplier_payment:
          $ref: '#/components/schemas/ApiSharedObjectdd60033a21'
      required:
        - supplier_payment
      additionalProperties: false
    ApiSharedObjectc671832641:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        field:
          type: string
      required:
        - code
        - message
      additionalProperties: false
    ApiSharedEnum111b0d070e:
      type: string
      enum:
        - ganancias
        - iibb
        - iva
        - suss
        - seg_hig
    ApiSharedObjectdd60033a21:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          const: supplier
        status:
          $ref: '#/components/schemas/ApiSharedEnum65e97ceeee'
        contact_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        contact_name:
          anyOf:
            - type: string
            - type: 'null'
        payment_number:
          anyOf:
            - type: integer
            - type: 'null'
        formatted_payment_number:
          anyOf:
            - type: string
            - type: 'null'
        payment_date:
          type: string
        currency:
          $ref: '#/components/schemas/ApiSharedEnum6cfb146157'
        settlement_currency:
          anyOf:
            - $ref: '#/components/schemas/ApiSharedEnum6cfb146157'
            - type: 'null'
        settlement_total_amount:
          anyOf:
            - type: integer
            - type: 'null'
        exchange_rate:
          anyOf:
            - anyOf:
                - type: string
                - type: number
            - type: 'null'
        total_amount:
          type: integer
        balance:
          type: integer
        notes:
          anyOf:
            - type: string
            - type: 'null'
        created_at:
          type: string
          format: date-time
        created_by_name:
          anyOf:
            - type: string
            - type: 'null'
        splits:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObject63c2faf817'
        applications:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObject2cdf35e652'
        credit_applications:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObject2cdf35e652'
        journal_line_applications:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObject2cdf35e652'
        advance_applications:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObject2cdf35e652'
        withholdings:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObject4faf4c3ad5'
      required:
        - id
        - type
        - status
        - contact_id
        - contact_name
        - payment_number
        - formatted_payment_number
        - payment_date
        - currency
        - total_amount
        - balance
        - created_at
        - created_by_name
      additionalProperties: false
    ApiSharedEnum65e97ceeee:
      type: string
      enum:
        - active
        - voided
    ApiSharedObject63c2faf817:
      type: object
      properties:
        id:
          type: string
          format: uuid
        payment_method_id:
          type: string
          format: uuid
        payment_method_name:
          type: string
        amount:
          type: integer
        reference:
          anyOf:
            - type: string
            - type: 'null'
        card_brand:
          anyOf:
            - type: string
            - type: 'null'
        card_batch_number:
          anyOf:
            - type: string
            - type: 'null'
        card_coupon_number:
          anyOf:
            - type: string
            - type: 'null'
        card_installment_plan_code:
          anyOf:
            - type: string
            - type: 'null'
        notes:
          anyOf:
            - type: string
            - type: 'null'
        fee_amount:
          anyOf:
            - type: integer
            - type: 'null'
        fee_percentage_applied:
          anyOf:
            - type: string
            - type: 'null'
        fee_fixed_applied:
          anyOf:
            - type: integer
            - type: 'null'
        net_amount:
          anyOf:
            - type: integer
            - type: 'null'
        check_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        register_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        safe_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
      required:
        - payment_method_id
        - amount
      additionalProperties: false
    ApiSharedObject2cdf35e652:
      type: object
      properties:
        id:
          type: string
          format: uuid
        sale_id:
          type: string
          format: uuid
        invoice_sale_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        credit_sale_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        advance_payment_id:
          type: string
          format: uuid
        journal_line_id:
          type: string
          format: uuid
        applied_amount:
          type: integer
        formatted_invoice_number:
          anyOf:
            - type: string
            - type: 'null'
        credit_formatted_invoice_number:
          anyOf:
            - type: string
            - type: 'null'
        advance_formatted_payment_number:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - applied_amount
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Incluí tu API key en el header Authorization con el prefijo Bearer.

````