> ## 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.

# Create processor correction

> Record a dated refund, chargeback or charge correction against a payment or settlement. Requires Idempotency-Key. Same payload replays; changed payload conflicts with HTTP 409. Fees and withholdings use reported amounts only.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/processor-corrections
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/processor-corrections:
    post:
      tags:
        - API
      summary: Create processor correction
      description: >-
        Record a dated refund, chargeback or charge correction against a payment
        or settlement. Requires Idempotency-Key. Same payload replays; changed
        payload conflicts with HTTP 409. Fees and withholdings use reported
        amounts only.
      operationId: createApiProcessorCorrection
      parameters:
        - 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:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                customerPaymentId:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                paymentSplitId:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                settlementId:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                creditNoteId:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                bankAccountId:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                bankDelta:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                chargeSource:
                  type: string
                  enum:
                    - payment
                    - settlement
                eventKind:
                  type: string
                  enum:
                    - refund
                    - chargeback
                    - fee_correction
                    - withholding_correction
                occurredAt:
                  type: string
                  format: date
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                principalAmount:
                  default: 0
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                feeDelta:
                  default: 0
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                withholdingDeltas:
                  default: []
                  maxItems: 32
                  type: array
                  items:
                    type: object
                    properties:
                      taxKind:
                        $ref: '#/components/schemas/ApiSharedEnum78c05c0fb9'
                      deductionType:
                        default: tax_withholding
                        type: string
                        enum:
                          - tax_withholding
                          - tax_perception
                      jurisdiction:
                        type: string
                        maxLength: 60
                      amount:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                    required:
                      - taxKind
                      - deductionType
                      - amount
                    additionalProperties: false
                integrationSource:
                  type: string
                  minLength: 1
                  maxLength: 120
                integrationId:
                  type: string
                  minLength: 1
                  maxLength: 255
              required:
                - eventKind
                - occurredAt
                - principalAmount
                - feeDelta
                - withholdingDeltas
              additionalProperties: false
      responses:
        '201':
          description: Committed resource or replay
          content:
            application/json:
              schema:
                type: object
                required:
                  - request_id
                  - data
                properties:
                  request_id:
                    type: string
                  data:
                    $schema: https://json-schema.org/draft/2020-12/schema
                    type: object
                    properties:
                      object:
                        type: string
                        const: processor_correction
                      id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    required:
                      - object
                      - id
                    additionalProperties: false
        '400':
          description: Request could not be completed
          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: Request could not be completed
                      retryable: false
                      details: []
        '401':
          description: Request could not be completed
          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: Request could not be completed
                      retryable: false
                      details: []
        '403':
          description: Request could not be completed
          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: Request could not be completed
                      retryable: false
                      details: []
        '404':
          description: Request could not be completed
          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: Request could not be completed
                      retryable: false
                      details: []
        '409':
          description: Idempotency or state conflict
          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: Idempotency or state conflict
                      retryable: false
                      details: []
        '422':
          description: Request could not be completed
          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: Request could not be completed
                      retryable: false
                      details: []
        '429':
          description: Request could not be completed
          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: Request could not be completed
                      retryable: false
                      details: []
        '503':
          description: Request could not be completed
          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: Request could not be completed
                      retryable: false
                      details: []
components:
  schemas:
    ApiSharedEnum78c05c0fb9:
      type: string
      enum:
        - iibb
        - vat
        - income_tax
        - suss
        - stamps
    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:
                type: object
                properties:
                  field:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  metadata:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type:
                        - string
                        - number
                        - boolean
                        - 'null'
                required:
                  - code
                  - message
                additionalProperties: false
          required:
            - type
            - code
            - message
            - retryable
            - details
          additionalProperties: false
      required:
        - request_id
        - error
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Incluí tu API key en el header Authorization con el prefijo Bearer.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.