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

# Create a Payout Batch

> Create a batch of payouts to multiple users. Each payout in the batch is processed independently with its own idempotency key. The batch itself can also have an idempotency key to prevent duplicate batch submissions. All payouts in a batch must have `fund=true`.



## OpenAPI

````yaml /v2.yaml post /v2/payout-batches
openapi: 3.1.0
info:
  title: dots api
  version: '1.0'
  summary: Dots Payout API
  description: Scalable and Flexible Payouts Infrastructure
  contact:
    name: Kartikye Mittal
    url: https://dots.dev
    email: info@dots.dev
  license:
    name: MIT
    url: https://opensource.org/license/mit/
servers:
  - url: https://api.dots.dev/api
    description: Production
security:
  - api_key: []
tags:
  - name: accounts-payable
    description: Accounts Payable Routes
  - name: apps
    description: App Routes
  - name: flows
    description: Flow routes
  - name: organizations
    description: Organization Routes
  - name: payment-customers
    description: Payment Customer Routes
  - name: payments
    description: Payment Routes
  - name: payout-batches
    description: Payout Batch Routes
  - name: payout-links
    description: Payout Link Routes
  - name: payout-requests
    description: Payout Request Routes
  - name: payouts
    description: Payout Routes
  - name: transactions
    description: Transaction Routes
  - name: transfer-batches
    description: Transfer Batch routes
  - name: transfers
    description: Transfer routes
  - name: users
    description: User routes
paths:
  /v2/payout-batches:
    post:
      tags:
        - payout-batches
      summary: Create a Payout Batch
      description: >-
        Create a batch of payouts to multiple users. Each payout in the batch is
        processed independently with its own idempotency key. The batch itself
        can also have an idempotency key to prevent duplicate batch submissions.
        All payouts in a batch must have `fund=true`.
      operationId: create-payout-batch
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request to create a batch of payouts
              properties:
                items:
                  type: array
                  description: List of individual payouts to create in the batch.
                  minItems: 1
                  maxItems: 5000
                  items:
                    $ref: '#/components/schemas/payout-batch-request-item'
                idempotency_key:
                  type: string
                  format: uuid
                  description: >-
                    UUID that will be used to idempotently handle the batch
                    request. Batches with existing idempotency keys will be
                    rejected.
                metadata:
                  type:
                    - string
                    - object
                  description: >-
                    Set of key-value pairs that you can attach to the batch.
                    This can be useful for storing additional information about
                    the batch in a structured format.
              required:
                - items
            examples:
              Example:
                value:
                  items:
                    - user_id: a169451c-8525-4352-b8ca-070dd449a1a5
                      amount: 1000
                      platform: paypal
                      idempotency_key: b2c3d4e5-f6g7-h8i9-j0k1-l2m3n4o5p6q7
                      fund: true
                      tax_exempt: false
                      metadata:
                        invoice_id: INV-123
                    - user_id: b269451c-9625-5452-c9db-171ee559b2b6
                      amount: 2500
                      platform: ach
                      account_id: c369451c-a725-6552-d0ec-272ff669c3c7
                      idempotency_key: c3d4e5f6-g7h8-i9j0-k1l2-m3n4o5p6q7r8
                      fund: true
                      tax_exempt: false
                  metadata:
                    batch_type: weekly_payouts
                    week: 2024-01
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payout-batch-response'
                description: The created payout batch.
components:
  schemas:
    payout-batch-request-item:
      title: payout-batch-request-item
      type: object
      description: Individual payout item in a batch request
      allOf:
        - $ref: '#/components/schemas/payout-create-request'
        - required:
            - idempotency_key
            - fund
    payout-batch-response:
      title: payout-batch-response
      type: object
      description: Basic payout batch response
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the payout batch.
        created:
          type: string
          format: date-time
          description: Timestamp when the batch was created.
        idempotency_key:
          type: string
          format: uuid
          description: The idempotency key provided when creating the batch.
        status:
          type: string
          enum:
            - created
            - processing
            - paying_out
            - completed
          description: Current status of the batch processing.
        metadata:
          type:
            - string
            - object
          description: The metadata attached to the batch.
      required:
        - id
        - created
        - status
    payout-create-request:
      title: payout-create-request
      type: object
      description: Base schema for creating a payout
      properties:
        user_id:
          type: string
          format: uuid
          description: ID of the `user` who you are creating the payout for.
        amount:
          type: integer
          exclusiveMinimum: 0
          description: Amount in cents to payout the user.
        platform:
          type: string
          enum:
            - paypal
            - venmo
            - ach
            - bank_transfer
            - cash_app
            - default
          description: Platform that you are paying out the `user` through.
        account_id:
          type: string
          format: uuid
          description: >-
            The bank account ID you are paying to. Required for `ach` and
            `intl_bank`.
        fund:
          type: boolean
          description: >-
            Creates a transfer for the amount to the user before creating the
            payout. The funds are returned to the App Wallet if the payout does
            not succeed. Please ensure that you are handling transfer failure
            webhooks when using this option.
        tax_exempt:
          type: boolean
          description: >-
            Payouts marked as `tax_exempt` will not be counted towards the 1099
            threshold. Can be `true` only if `fund` is `true`.
        idempotency_key:
          type: string
          format: uuid
          description: >-
            UUID that will be used to idempotently handle requests. Transfers
            with existing idempotency keys will be rejected.
        metadata:
          description: >-
            Set of key-value pairs that you can attach to an object. This can be
            useful for storing additional information about the object in a
            structured format.
          type:
            - string
            - object
        payout_fee_party:
          type: string
          enum:
            - user
            - platform
          description: >-
            Overrides the setting for which party will pay fees on this payout.
            This takes precedence over the default for your application.
      required:
        - user_id
        - amount
        - platform
  securitySchemes:
    api_key:
      type: http
      scheme: basic

````