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

# List Xero Payments API

> List payments already booked in Xero for a Breezing transaction. Check this before submitting a payment to avoid duplicate Xero entries.



## OpenAPI

````yaml GET /xero/payments
openapi: 3.1.0
info:
  title: Breezing Public API
  version: 1.0.0
  description: >-
    Crypto accounting API for programmatic access and AI agents. Authenticate
    with an API key using the Authorization header: `Bearer brz_...`
servers:
  - url: https://api.breezing.io/v1
security:
  - BearerAuth: []
paths:
  /xero/payments:
    get:
      tags:
        - Xero
      summary: List payments already booked on Xero for a transaction
      description: >-
        List every payment and bank transaction previously booked in Xero for
        one Breezing transaction via the "Submit payment on Xero" flow
        (dashboard button or POST /xero/payments), newest first.


        Call this BEFORE POST /xero/payments: that endpoint is NOT idempotent,
        and re-submitting a transaction that already has entries here books
        duplicate entries in Xero.


        Reads Breezing's own booking records; no Xero API call is made, so this
        works even while the Xero connection is expired (entries deleted
        directly in Xero will still be listed). Returns 404 if the transaction
        does not exist.
      parameters:
        - schema:
            type: string
            description: >-
              Organization ID. Use GET /v1/companies to discover available
              org/company pairs.
            example: '1'
          required: true
          description: >-
            Organization ID. Use GET /v1/companies to discover available
            org/company pairs.
          name: orgId
          in: query
        - schema:
            type: string
            description: >-
              Company ID. Use GET /v1/companies to discover available companies
              and their access levels.
            example: '1'
          required: true
          description: >-
            Company ID. Use GET /v1/companies to discover available companies
            and their access levels.
          name: companyId
          in: query
        - schema:
            type: string
            description: >-
              Breezing transaction ID whose booked Xero entries to list. This is
              the database id from GET /transactions, not the blockchain hash.
            example: '12345'
          required: true
          description: >-
            Breezing transaction ID whose booked Xero entries to list. This is
            the database id from GET /transactions, not the blockchain hash.
          name: trxId
          in: query
      responses:
        '200':
          description: Booked payments retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/XeroBookedPayment'
                required:
                  - success
                  - data
        '400':
          description: Invalid trxId
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '403':
          description: >-
            API key has no access to this company, has read-only access where
            write was required, or the company subscription is inactive
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '404':
          description: Transaction not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
      security:
        - BearerAuth: []
components:
  schemas:
    XeroBookedPayment:
      type: object
      properties:
        id:
          type: integer
          description: Booked entry ID
        trxId:
          type: integer
          description: Breezing transaction ID the entry was booked for
        walletId:
          type: integer
          nullable: true
          description: Wallet the transaction belongs to
        type:
          type: string
          description: >-
            What was booked: "Invoice payment" for a payment applied to an
            invoice, otherwise the line description of the spend/receive money
            bank transaction (main amount, fee, or net gain/loss leg).
        operation:
          type: string
          nullable: true
          description: >-
            Bank transaction direction: "spend" or "receive". Invoice payments
            always record the default "spend"; use `type` to tell the two kinds
            apart.
        invoiceName:
          type: string
          description: >-
            Invoice contact name and reference (empty for standalone bank
            transactions).
        invoiceId:
          type: string
          description: >-
            Xero invoice ID the payment was applied to (empty for standalone
            bank transactions).
        amount:
          type: string
          description: Fiat amount booked, as a decimal string.
        currency:
          type: string
          description: Currency of the amount.
        xeroPaymentId:
          type: string
          description: >-
            ID of the created Xero object: PaymentID for invoice payments,
            BankTransactionID for spend/receive money bank transactions.
        createdAt:
          type: number
          description: When the entry was booked (unix ms).
      required:
        - id
        - trxId
        - walletId
        - type
        - operation
        - invoiceName
        - invoiceId
        - amount
        - currency
        - xeroPaymentId
        - createdAt

````