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

# Self Serve Create Payment Batch

> Creates a DRAFT TokenPayroll batch with contributor and wallet-split rows from approved Toku-contractor crypto invoices.

Not available to API keys yet. It will need `payments:write`.

## OpenAPI

````yaml api-reference/openapi.json POST /hris/self-serve-create-payment-batch
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /hris/self-serve-create-payment-batch:
    post:
      operationId: selfServeCreatePaymentBatch
      summary: Self Serve Create Payment Batch
      description: >-
        Creates a DRAFT TokenPayroll batch with contributor and wallet-split
        rows from approved Toku-contractor crypto invoices.


        Not available to API keys yet. It will need `payments:write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SelfServeCreatePaymentBatchRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SelfServeCreatePaymentBatchResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    SelfServeCreatePaymentBatchRequest:
      type: object
      properties:
        invoiceIDs:
          type: array
          items:
            type: string
            format: uuid
          minItems: 1
        payDate:
          type: string
          format: date-time
        batchName:
          type: string
          maxLength: 100
      required:
        - invoiceIDs
    SelfServeCreatePaymentBatchResponse:
      type: object
      properties:
        payrollID:
          type: string
        batchName:
          type: string
        totalAmount:
          type: string
        currency:
          type: string
        contributorCount:
          type: integer
        contributors:
          type: array
          items:
            type: object
            properties:
              roleInOrgID:
                type: string
              contractorName:
                type: string
              contractorEmail:
                type: string
              walletAddress:
                type: string
              chain:
                type: string
              amount:
                type: string
              currency:
                type: string
              invoiceID:
                type: string
              invoiceNumber:
                type: string
              walletSplits:
                type: array
                items:
                  type: object
                  properties:
                    walletID:
                      type: string
                    label:
                      type: string
                    address:
                      type: string
                    chain:
                      type: string
                    percentage:
                      type: string
                    amount:
                      type: string
                  required:
                    - walletID
                    - label
                    - address
                    - chain
                    - percentage
                    - amount
            required:
              - roleInOrgID
              - contractorName
              - contractorEmail
              - walletAddress
              - chain
              - amount
              - currency
              - invoiceID
              - invoiceNumber
              - walletSplits
        payDate:
          type: string
        state:
          type: string
      required:
        - payrollID
        - batchName
        - totalAmount
        - currency
        - contributorCount
        - contributors
        - payDate
        - state
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
