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

# Reject Commission

> Rejects a `pending` commission so it will not be paid out to the affiliate. Use this when a commission should not have been earned, for example because the referral turned out to be fraudulent or the purchase was cancelled. You can optionally pass a `reject_reason`, which is stored on the commission and returned in the `reject_reason` attribute while the commission is rejected. Only `pending` commissions can be rejected; `paid` commissions cannot be reverted through the API. A rejected commission can be moved back to `pending` with the unreject endpoint.



## OpenAPI

````yaml POST /v1/commissions/{id}/reject
openapi: 3.1.0
info:
  title: Reditus API - Commissions
  description: API specification for managing commissions in Reditus affiliate programs.
  version: 1.0.0
servers:
  - url: https://api.getreditus.com/api
security: []
paths:
  /v1/commissions/{id}/reject:
    post:
      summary: Reject Commission
      description: >-
        Rejects a `pending` commission so it will not be paid out to the
        affiliate. Use this when a commission should not have been earned, for
        example because the referral turned out to be fraudulent or the purchase
        was cancelled. You can optionally pass a `reject_reason`, which is
        stored on the commission and returned in the `reject_reason` attribute
        while the commission is rejected. Only `pending` commissions can be
        rejected; `paid` commissions cannot be reverted through the API. A
        rejected commission can be moved back to `pending` with the unreject
        endpoint.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Reditus id of the commission
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RejectCommissionRequest'
      responses:
        '200':
          description: Commission was rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommissionResponse'
        '404':
          description: Not Found - Commission not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseNotFound'
        '422':
          description: >-
            Unprocessable - Commission cannot be rejected from its current state
            (it is already rejected, or has been paid)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseUnprocessable'
      security:
        - BearerAuth: []
components:
  schemas:
    RejectCommissionRequest:
      type: object
      properties:
        reject_reason:
          type: string
          description: >-
            Optional free-text reason for rejecting the commission. Shown to
            your team in the Reditus dashboard and returned in the commission's
            `reject_reason` attribute.
          example: Fraudulent referral
    CommissionResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Commission'
    ErrorResponseNotFound:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
                example: Not Found
              details:
                type: string
                example: Commission not found
    ErrorResponseUnprocessable:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
                example: Unprocessable entity
              details:
                type: string
                example: Commission in state 'paid' cannot be rejected
    Commission:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        attributes:
          type: object
          properties:
            state:
              type: string
              description: 'Commission state: pending, rejected or paid'
            amount:
              type: integer
              description: Commission amount, in cents
            currency:
              type: string
              description: Three-letter ISO currency code of the amount
            partner_id:
              type: string
              description: ID of the partner the commission belongs to
            referral_id:
              type: string
              description: ID of the referral the commission originates from, if any
            reject_reason:
              type: string
              description: >-
                Reason the commission was rejected. Only present when state is
                rejected
            state_set_at:
              type: integer
            paid_at:
              type: integer
              description: Timestamp the commission was paid at, if paid
            created_at:
              type: integer
            updated_at:
              type: integer
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

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