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

# Query Batch Status

> Query the status of a payout batch by batch ID

Query the status of a payout batch using the batch ID returned from the execute payout endpoint. The batch status can be pending, complete, or failed.


## OpenAPI

````yaml POST /v1#payouts_query_batch
openapi: 3.0.0
info:
  title: SHARE Protocol API
  description: Micropayments, revenue sharing and distribution.
  version: 1.0.0
  contact:
    name: Formless
    url: https://www.formless.xyz
servers:
  - url: https://share-ddn.formless.xyz
    description: Production server
security: []
paths:
  /v1#payouts_query_batch:
    post:
      tags:
        - Payouts
      summary: Query Payout Batch Status
      description: Query the status of a payout batch by batch ID
      operationId: payouts_query_batch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  default: '2.0'
                id:
                  type: string
                  default: '1'
                method:
                  type: string
                  enum:
                    - payouts
                  default: payouts
                params:
                  type: object
                  required:
                    - batch_id
                  properties:
                    batch_id:
                      type: string
                      default: 89de4f6d-a8e5-4808-9c29-ebac29dec4cb
                      description: Batch ID to query status for
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutsBatchQueryResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    PayoutsBatchQueryResponse:
      type: object
      required:
        - jsonrpc
        - id
        - result
      properties:
        jsonrpc:
          type: string
          enum:
            - '2.0'
        id:
          type: string
        result:
          oneOf:
            - $ref: '#/components/schemas/PayoutsBatchDetails'
            - $ref: '#/components/schemas/PayoutsError'
    PayoutsBatchDetails:
      type: object
      required:
        - payout_batch_id
        - status
        - submitter
      properties:
        payout_batch_id:
          type: string
          description: The batch ID
        status:
          type: string
          enum:
            - pending
            - complete
            - failed
          description: Current status of the batch
        submitter:
          type: string
          description: Unique ID of the user who submitted the batch
        timestamp:
          type: object
          description: When the batch was created
        details:
          type: object
          description: >-
            Batch details object containing contract_address, network_id,
            amount_usd, etc.
        activity_details:
          type: object
          description: >-
            Activity information for the payout (isrc_code, upc_code, month,
            year, day, etc.)
        successful_txns:
          type: integer
          description: Number of successful transactions (present when status is complete)
        incomplete_txns:
          type: integer
          description: Number of incomplete transactions (present when status is complete)
        completion_percentage:
          type: number
          description: Completion percentage (present when status is complete)
        total_amount_paid_usd:
          type: number
          description: Total amount paid in USD (present when status is complete)
        message:
          type: string
          description: Status message (present when status is complete or failed)
        failure:
          type: string
          description: Failure reason (present when status is failed)
    PayoutsError:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - failed
          description: Status indicating failure
        message:
          type: string
          description: Error message describing what went wrong
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token with Unique ID identification

````