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

# Reverse an inbound PIX Automatico settlement debit

> Reverses the prior settlement debit (or releases a still-pending hold) on a negative SPI return (section 5.4.3, the plugin is the SGCT server). The reverse is parameterizable and disabled by default. Returns the SGCT reversal-operation id (idOperacaoSgct).



## OpenAPI

````yaml /en/openapi/v3-current/pix.yaml delete /v1/pix-automatico/settlements/inbound/debit/{endToEndId}
openapi: 3.1.0
info:
  description: Brazilian PIX Direct (DICT + SPI) plugin API.
  title: plugin-br-pix-jd
  version: 1.0.0
servers: []
security:
  - BearerAuth: []
paths:
  /v1/pix-automatico/settlements/inbound/debit/{endToEndId}:
    delete:
      tags:
        - PIX Automatico
      summary: Reverse an inbound PIX Automatico settlement debit
      description: >-
        Reverses the prior settlement debit (or releases a still-pending hold)
        on a negative SPI return (section 5.4.3, the plugin is the SGCT server).
        The reverse is parameterizable and disabled by default. Returns the SGCT
        reversal-operation id (idOperacaoSgct).
      operationId: reverseInboundPixAutomaticoSettlement
      parameters:
        - description: >-
            Bearer access token (the financial-ingress gate; the handler fails
            closed with PIX-0082 when absent).
          in: header
          name: Authorization
          schema:
            description: >-
              Bearer access token (the financial-ingress gate; the handler fails
              closed with PIX-0082 when absent).
            examples:
              - Bearer eyJ...
            type: string
        - description: >-
            Idempotency key (= the endToEndId of the transaction). Mandatory per
            section 5.4.
          in: header
          name: Chave-Idempotencia
          required: true
          schema:
            description: >-
              Idempotency key (= the endToEndId of the transaction). Mandatory
              per section 5.4.
            examples:
              - E11111111202409181500y6j6mt9l1pi
            type: string
        - description: Unique payment-instruction id (32-char), the natural key.
          in: path
          name: endToEndId
          required: true
          schema:
            description: Unique payment-instruction id (32-char), the natural key.
            examples:
              - E11111111202409181500y6j6mt9l1pi
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReverseDebitBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReverseDebitResponse'
          description: OK
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
components:
  schemas:
    ReverseDebitBody:
      additionalProperties: true
      properties:
        codigoErro:
          description: >-
            Error code (the section 8.7 generic SPI domain; NOT the section 5.3
            motivoRejeicao set).
          examples:
            - AB03
          type: string
        descCodigoErro:
          description: Error description (1000-char).
          examples:
            - Liquidacao da transacao interrompida devido a timeout no SPI.
          type: string
        endToEndId:
          description: Unique payment-instruction id (32-char; matches the path param).
          examples:
            - E11111111202409181500y6j6mt9l1pi
          type: string
        stJdPiProc:
          description: >-
            Negative-return classification (1=processing error, 2=JDPI
            validation error, 3=SPI-returned error).
          examples:
            - 3
          format: int64
          type: integer
      required:
        - endToEndId
        - stJdPiProc
        - codigoErro
      type: object
    ReverseDebitResponse:
      additionalProperties: false
      properties:
        dtHrOperacaoSgct:
          description: SGCT operation timestamp (UTC).
          examples:
            - '2024-09-20T04:02:00.021Z'
          type: string
        endToEndId:
          description: Unique payment-instruction id (32-char).
          examples:
            - E11111111202409181500y6j6mt9l1pi
          type: string
        idOperacaoSgct:
          description: SGCT reversal-operation id (a GUID).
          examples:
            - 58F752C5-6376-3252-8305-A2DE3A8525D4
          type: string
      required:
        - endToEndId
        - idOperacaoSgct
        - dtHrOperacaoSgct
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````