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

# Create a Custom Payout

> Creates a custom payout for the affiliate — an amount of the project's own for the days it covers, outside the monthly payouts. It is `pending` right away and is never sent automatically: it must be sent from the dashboard. Note 1: custom payouts must be enabled for the project. Note 2: this endpoint is only accessible with a secret API key.



## OpenAPI

````yaml post /affiliates/{affiliate_id}/payouts
openapi: 3.0.0
info:
  title: WinWinKit API
  description: An API for interacting with WinWinKit.
  version: '1.0'
  contact:
    name: WinWinKit
    url: https://winwinkit.com
    email: support@winwinkit.com
servers:
  - url: https://api.winwinkit.com
    description: Production
security: []
tags:
  - name: Users
    description: User endpoints
  - name: Claim Actions
    description: Claim actions endpoints
  - name: Rewards Actions
    description: Rewards actions endpoints
  - name: Analytics
    description: Analytics endpoints
  - name: Affiliates
    description: Affiliates endpoints
paths:
  /affiliates/{affiliate_id}/payouts:
    post:
      tags:
        - Affiliates
      summary: Create a Custom Payout
      description: >-
        Creates a custom payout for the affiliate — an amount of the project's
        own for the days it covers, outside the monthly payouts. It is `pending`
        right away and is never sent automatically: it must be sent from the
        dashboard. Note 1: custom payouts must be enabled for the project. Note
        2: this endpoint is only accessible with a secret API key.
      operationId: createAffiliatePayout
      parameters:
        - name: affiliate_id
          required: true
          in: path
          description: The id of the affiliate to pay.
          schema:
            type: string
        - name: x-api-key
          in: header
          description: The secret API key.
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AffiliateCustomPayoutCreateRequest'
      responses:
        '201':
          description: The payout has been created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AffiliatePayoutResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '403':
          description: >-
            Custom payouts are not enabled for the project, or the operation id
            has already been used.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '404':
          description: The affiliate is not an approved affiliate of the project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '422':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '429':
          description: The rate limit for this endpoint has been exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
components:
  schemas:
    AffiliateCustomPayoutCreateRequest:
      type: object
      properties:
        amount:
          type: integer
          example: 25000
          minimum: 1000
          maximum: 1000000
          description: >-
            The amount to pay the affiliate, in USD cents — from 1000 ($10) to
            1000000 ($10,000)
        description:
          type: string
          example: Launch campaign video
          minLength: 10
          maxLength: 200
          description: >-
            What the payout is for, from 10 to 200 characters. Shown to the
            affiliate
        period_start:
          type: string
          format: date
          example: '2026-09-01'
          description: >-
            The first day the payout covers, YYYY-MM-DD — from the first day of
            last month
        period_end:
          type: string
          format: date
          example: '2026-09-15'
          description: >-
            The last day the payout covers, YYYY-MM-DD — on or after
            `period_start`, and no later than the last day of next month. The
            same day as `period_start` for a single day
        operation_id:
          type: string
          nullable: true
          example: 821fae4b5-0123-4567-9152-5297086a161c
          description: >-
            An optional operation id that ensures the same payout won't be
            created again
      required:
        - amount
        - description
        - period_start
        - period_end
    AffiliatePayoutResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/AffiliatePayoutResponseData'
      required:
        - data
    ErrorsResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorObject'
      description: Errors Response
      required:
        - errors
    AffiliatePayoutResponseData:
      type: object
      properties:
        payout:
          description: The payout
          allOf:
            - $ref: '#/components/schemas/AffiliatePayout'
      required:
        - payout
    ErrorObject:
      type: object
      properties:
        code:
          type: string
        status:
          type: integer
        message:
          type: string
        source:
          type: string
          nullable: true
      description: Error Object
      required:
        - code
        - status
        - message
        - source
    AffiliatePayout:
      type: object
      properties:
        id:
          type: string
          example: 7c9e6679-7425-40de-944b-e07fc1f90ae7
          description: The payout id
        affiliate_id:
          type: string
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
          description: The id of the affiliate the payout is to
        type:
          type: string
          enum:
            - performance
            - custom
          example: custom
          description: >-
            What the payout is: `performance` collects what the affiliate earned
            in a calendar month; `custom` is an amount the project set itself
        status:
          type: string
          enum:
            - upcoming
            - holding
            - pending
            - processing
            - sent
            - completed
            - failed
            - cancelled
          example: pending
          description: >-
            Where the payout is: `upcoming` and `holding` still collect or wait
            out refunds, `pending` is ready to be sent, `processing` is on its
            way, `completed` has been paid, `failed` goes back to pending,
            `cancelled` will not be paid
        amount:
          type: integer
          example: 25000
          description: The amount, in USD cents
        description:
          type: string
          nullable: true
          example: Launch campaign video
          description: >-
            What a `custom` payout is for, as the project put it. Null for
            `performance` payouts
        period_start:
          type: string
          format: date
          example: '2026-09-01'
          description: The first day the payout covers, in UTC
        period_end:
          type: string
          format: date
          nullable: true
          example: '2026-09-15'
          description: >-
            The last day the payout covers, in UTC. Null while an `upcoming`
            payout is still collecting
        created_at:
          type: string
          format: date-time
          example: '2026-09-29T10:15:00.000Z'
          description: When the payout was created
        completed_at:
          type: string
          format: date-time
          nullable: true
          example: null
          description: When the payout was paid. Null until it is
      required:
        - id
        - affiliate_id
        - type
        - status
        - amount
        - description
        - period_start
        - period_end
        - created_at
        - completed_at

````