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

# Get a PIX transaction status

> Resolves one transaction's status. This is the operation that closes the loop after a payment: an outbound SPI order answers 201 or 202 with nothing settled, and the verdict arrives here.

The path id is resolved in three steps, in order: by JDPI request id (idReqJdPi), then — only when the value parses as a UUID — by local transaction id, and finally, when neither matched, by a LIVE lookup at JDPI (§8.4.2). Those branches do not answer the same thing. A local hit returns the status the reconciler last persisted; a live hit is a projection of JD's own processing status, is the only branch that populates jdpiStatus, and projects JD status 9 to EXECUTED. So a transaction this plugin never persisted can still answer 200 here, and a status read live is not evidence that a local row exists.

Read-only: it neither commits nor releases the held amount — the background reconciler does that on its own tick, so a PENDING answer means "not decided yet", not "stuck". Refusals: 400 PIX-0061 when transactionId is empty; and on the live branch, JDPI's own outcome — 404 PIX-1027 when JD does not know the id either, 503 PIX-1050 when JDPI is unreachable — so a failure here names the dependency instead of hiding behind a generic error.



## OpenAPI

````yaml /en/openapi/v3-current/pix.yaml get /v1/transactions/{transactionId}
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/transactions/{transactionId}:
    get:
      tags:
        - Transactions
      summary: Get a PIX transaction status
      description: >-
        Resolves one transaction's status. This is the operation that closes the
        loop after a payment: an outbound SPI order answers 201 or 202 with
        nothing settled, and the verdict arrives here.


        The path id is resolved in three steps, in order: by JDPI request id
        (idReqJdPi), then — only when the value parses as a UUID — by local
        transaction id, and finally, when neither matched, by a LIVE lookup at
        JDPI (§8.4.2). Those branches do not answer the same thing. A local hit
        returns the status the reconciler last persisted; a live hit is a
        projection of JD's own processing status, is the only branch that
        populates jdpiStatus, and projects JD status 9 to EXECUTED. So a
        transaction this plugin never persisted can still answer 200 here, and a
        status read live is not evidence that a local row exists.


        Read-only: it neither commits nor releases the held amount — the
        background reconciler does that on its own tick, so a PENDING answer
        means "not decided yet", not "stuck". Refusals: 400 PIX-0061 when
        transactionId is empty; and on the live branch, JDPI's own outcome — 404
        PIX-1027 when JD does not know the id either, 503 PIX-1050 when JDPI is
        unreachable — so a failure here names the dependency instead of hiding
        behind a generic error.
      operationId: getTransactionStatus
      parameters:
        - description: The transaction id (local UUID or JDPI request id).
          in: path
          name: transactionId
          required: true
          schema:
            description: The transaction id (local UUID or JDPI request id).
            examples:
              - d1f9c0a2-...
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionStatusResponse'
          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:
    TransactionStatusResponse:
      additionalProperties: false
      properties:
        amount:
          description: Transaction amount in centavos.
          examples:
            - 10050
          format: int64
          type: integer
        description:
          description: Payment description.
          examples:
            - Invoice 42
          type: string
        endToEndId:
          description: The SPI end-to-end id.
          examples:
            - E1234567890
          type: string
        errorCode:
          description: JDPI error code (live branch).
          examples:
            - ''
          type: string
        errorMessage:
          description: JDPI error message (live branch).
          examples:
            - ''
          type: string
        flow:
          description: Numeric eTransactionFlow.
          examples:
            - 2
          format: int64
          type: integer
        id:
          description: The transaction id (or JDPI tx id on the live branch).
          examples:
            - d1f9c0a2-...
          type: string
        jdpiRequestId:
          description: The JDPI request id.
          examples:
            - REQ-123
          type: string
        jdpiStatus:
          description: Raw JDPI eProcessingStatus (live branch only).
          examples:
            - 9
          format: int64
          type: integer
        payee:
          $ref: '#/components/schemas/PartyResponse'
          description: The payee party.
        payer:
          $ref: '#/components/schemas/PartyResponse'
          description: The payer party.
        status:
          description: eTransactionStatus name.
          examples:
            - EXECUTED
          type: string
      required:
        - id
        - status
        - amount
      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
    PartyResponse:
      additionalProperties: false
      properties:
        accountDigit:
          description: The party's account check digit.
          examples:
            - '7'
          type: string
        accountId:
          description: The party's CRM account id.
          examples:
            - acc-123
          type: string
        accountNumber:
          description: The party's account number.
          examples:
            - '123456'
          type: string
        accountType:
          description: >-
            Numeric JDPI tpConta (0=Conta Corrente, 1=Conta Salario, 2=Conta
            Poupanca, 3=Conta de Pagamento, 4=Conta PI).
          examples:
            - 0
          format: int64
          type: integer
        branch:
          description: The party's agency/branch.
          examples:
            - '0001'
          type: string
        document:
          description: The party's document (CPF/CNPJ).
          examples:
            - '12345678909'
          type: string
        ispb:
          description: The party's participant ISPB.
          examples:
            - '12345678'
          type: string
        key:
          description: The party's PIX key.
          examples:
            - foo@bar.com
          type: string
        keyType:
          description: Numeric eKeyType.
          examples:
            - 2
          format: int64
          type: integer
        name:
          description: The party's holder name.
          examples:
            - Jane Doe
          type: string
      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

````