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

# Get Contractor Payments

> Retrieve a contractor payment by contractorPaymentID, or list payments for a company, optionally filtered by contractorID.

This endpoint serves two usages on the same path. Pass `companyID` and `contractorPaymentID` to retrieve a single contractor payment. Omit `contractorPaymentID` to list payments for a company; you can optionally pass `contractorID` (and `status` or `paymentGroupID`) to filter that list.

When `contractorPaymentID` is present, list filters such as `contractorID` are ignored.

## Returns

Returns response status and the contractor payment (or a paginated list of contractor payments).

| attribute | type | description |
| - | - | - |
| success | boolean | Response status |
| data | object or array | Contractor Payment object, or an array of contractor payments when listing |
| errors | array | If `success` is false, errors contains a list of error objects: `message` (string, error message), `status` (number, HTTP response code), `code` (number, error code - see [Error codes](https://docs.zeal.com/reference/introduction/error-codes)) |


## OpenAPI

````yaml openapi/zeal-api.json get /contractorPayment
openapi: 3.1.0
info:
  title: zeal-api
  version: '1.0'
servers:
  - url: https://api.zeal.com
security:
  - sec0: []
paths:
  /contractorPayment:
    get:
      summary: Get Contractor Payments
      operationId: retrieve-contractor-payments
      parameters:
        - name: companyID
          in: query
          description: Company ID of the employer
          required: true
          schema:
            type: string
        - name: contractorPaymentID
          in: query
          description: >-
            ID of the contractor payment to retrieve. When present, the endpoint
            returns that single payment and list filters (`contractorID`,
            `status`, `paymentGroupID`) are ignored.
          schema:
            type: string
        - name: contractorID
          in: query
          description: >-
            When listing payments (omit `contractorPaymentID`), filter to this
            contractor. Ignored when `contractorPaymentID` is present.
          schema:
            type: string
        - name: status
          in: query
          description: >-
            Filter by status of contractor payment. Provide one of the following
            statuses: `pending`, `pre-processed`, `processed`
          schema:
            type: string
            enum:
              - pending
              - pre-processed
              - processed
        - name: paymentGroupID
          in: query
          description: Filter by contractor payment group
          schema:
            type: string
        - name: start_at
          in: query
          description: The pagination cursor to start at
          schema:
            type: string
        - name: limit
          in: query
          description: Limit the amount of data returned
          schema:
            type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                List of pending payments:
                  summary: Pending payments have no paymentGroupID yet
                  value:
                    success: true
                    data:
                      - contractorPaymentID: 24ce6cb4144bac8a33e13223b2b462
                        status: pending
                        disbursement_status: pending
                        first_name: erlich
                        middle_name: 'null'
                        last_name: bachman
                        companyID: fcce6cc41440ac8a33e13223bbb462
                        contractorID: cbce6cc414403c8a33e43223bbb469
                        approval_required: false
                        approved: false
                        pay_date: '2023-10-01'
                        amount: 100
                        triggered: false
                        triggered_at: null
                        customerAccountID: null
                        metadata:
                          example: example
                    meta:
                      next: >-
                        https://api.zeal.com/contractorPayment?startAt=24ce6cb4144bac8a33e13223b2b4b&limit=10
                      previous: null
                Single payment after pre-process:
                  summary: paymentGroupID is present after the payment is grouped
                  value:
                    success: true
                    data:
                      contractorPaymentID: 24ce6cb4144bac8a33e13223b2b462
                      status: pre-processed
                      disbursement_status: pending
                      first_name: erlich
                      middle_name: 'null'
                      last_name: bachman
                      companyID: fcce6cc41440ac8a33e13223bbb462
                      contractorID: cbce6cc414403c8a33e43223bbb469
                      approval_required: false
                      approved: false
                      pay_date: '2023-10-01'
                      amount: 100
                      paymentGroupID: 8808c9c05afd407393d25b8de7f55a23
                      triggered: false
                      triggered_at: null
                      customerAccountID: null
                      metadata:
                        example: example
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value:
                    success: false
                    errors:
                      - message: Employee or Contractor ID is not formatted correctly
                        code: 17
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                    default: true
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: Employee or Contractor ID is not formatted correctly
                        code:
                          type: integer
                          example: 17
                          default: 0
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer

````

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