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

# Cancel a Payout

Cancel a payout that has not yet completed. Items in
`processing` or `completed` state are unaffected;
items still `queued` or `pending_claim` are cancelled
and their funds returned to your Consul wallet.


## OpenAPI

````yaml post /payouts/{id}/cancel
openapi: 3.0.3
info:
  title: Consul API
  version: 0.0.1
servers: []
security: []
paths:
  /payouts/{id}/cancel:
    post:
      operationId: CancelPayout
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payout'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
components:
  schemas:
    Payout:
      additionalProperties: false
      properties:
        completed_at:
          format: date-time
          type: string
        created_at:
          format: date-time
          type: string
        currency:
          $ref: '#/components/schemas/Currency'
        failure_reason:
          type: string
        id:
          type: string
        item_breakdown:
          $ref: '#/components/schemas/PayoutItemBreakdown'
        status:
          $ref: '#/components/schemas/PayoutStatus'
        total_amount:
          format: decimal
          type: string
        total_items:
          format: int64
          type: integer
      required:
        - id
        - total_items
        - total_amount
        - currency
        - status
        - item_breakdown
        - created_at
      type: object
    ErrorModel:
      additionalProperties: false
      properties:
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          example: Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          example: https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          example: 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.
          example: Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          example: https://example.com/errors/example
          format: uri
          type: string
      type: object
    Currency:
      enum:
        - USDC
        - USDT
        - USD
        - BRL
        - ARS
        - COP
        - MXN
        - CAD
        - EUR
      type: string
    PayoutItemBreakdown:
      additionalProperties: false
      properties:
        cancelled:
          format: int64
          type: integer
        completed:
          format: int64
          type: integer
        failed:
          format: int64
          type: integer
        pending_claim:
          format: int64
          type: integer
        processing:
          format: int64
          type: integer
      required:
        - processing
        - pending_claim
        - completed
        - failed
        - cancelled
      type: object
    PayoutStatus:
      enum:
        - processing
        - completed
        - failed
        - cancelled
      type: string
    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

````