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

# Create payroll

> Create a payroll to pay company workers. When using API key
authentication, an `Idempotency-Key` header is required.




## OpenAPI

````yaml /api-reference/openapi.yaml post /api/company/payroll/create
openapi: 3.1.0
info:
  title: Bitwage Partner API
  version: '2.0'
  description: |
    The Bitwage Partner API allows you to integrate Bitwage payroll and payment
    functionality into your own application. You can manage users, companies,
    distributions, payroll, and more.
  contact:
    name: Development Team
    email: developers@bitwage.com
    url: https://www.bitwage.com/support
  license:
    name: Copyright Bitwage, Inc. All rights reserved.
    url: https://www.bitwage.com/policies/#terms
servers:
  - url: https://api.sandbox.bitwage.com
    description: Sandbox
  - url: https://api2.bitwage.com
    description: Production
security:
  - api_key: []
  - oauth: []
tags:
  - name: Authorization
    description: OAuth 2.0 authorization code flow endpoints.
  - name: Users
    description: Create and manage user accounts.
  - name: User Documents
    description: Upload and manage user KYC documents.
  - name: User Payers
    description: Manage external payers (employers/clients) for users.
  - name: User Distributions
    description: Manage payment distribution destinations for users.
  - name: User Funding
    description: Manage funding (virtual bank) accounts for users.
  - name: Companies
    description: Create and manage company accounts, UBO, KYC/KYB.
  - name: Company Workers
    description: Invite and manage company workers.
  - name: Company Recipients
    description: Manage company recipients (workers and vendors).
  - name: Company Payroll
    description: Create and manage payrolls.
  - name: Merchant
    description: Crypto pay-in and BTC checkout endpoints.
  - name: Wallets
    description: Request and view wallets for payroll funding.
  - name: Webhooks
    description: Webhook event schemas sent by Bitwage.
paths:
  /api/company/payroll/create:
    post:
      tags:
        - Company Payroll
      summary: Create payroll
      description: |
        Create a payroll to pay company workers. When using API key
        authentication, an `Idempotency-Key` header is required.
      operationId: createPayroll
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayrollCreateRequest'
      responses:
        '200':
          description: Payroll created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayrollCreateResponse'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      schema:
        type: string
      description: >-
        Unique key for idempotent requests. Recommended for all write
        operations.
  schemas:
    PayrollCreateRequest:
      type: object
      required:
        - company_id
        - to_pay
      properties:
        company_id:
          type: string
        to_pay:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/PayrollPaymentItem'
        funding_method:
          type: string
          description: Funding method override. Uses company default if not provided.
        funding_currency:
          type: string
          description: Funding currency for crypto payments.
        currency:
          type: string
          description: Payroll denomination currency.
        external_id:
          type: string
          description: Your external reference ID for this payroll.
    PayrollCreateResponse:
      type: object
      properties:
        payroll_id:
          type: string
        fees:
          type: number
          format: double
        volume_input_in_input_currency:
          type: number
          format: double
        total_input_in_input_currency:
          type: number
          format: double
        quote:
          $ref: '#/components/schemas/PayrollQuote'
    PayrollPaymentItem:
      type: object
      required:
        - amount_fiat
      properties:
        amount_fiat:
          type: number
          format: double
          description: Payment amount in fiat currency.
        user_id:
          type: string
          description: Recipient user ID. One of `user_id` or `company_id` is required.
        company_id:
          type: string
          description: Recipient company ID. One of `user_id` or `company_id` is required.
        country:
          type: string
        is_premium:
          type: boolean
          default: false
        invoice_id:
          type: string
        description:
          type: string
        category:
          type: string
        external_payment_id:
          type: string
    PayrollQuote:
      type: object
      properties:
        quote_id:
          type: string
        valid_from:
          type: string
          format: date-time
        valid_to:
          type: string
          format: date-time
        rate:
          type: number
          format: double
        funding_currency:
          type: string
        funding_amount:
          type: number
          format: double
        funding_details:
          $ref: '#/components/schemas/FundingDetails'
    FundingDetails:
      type: object
      properties:
        address:
          type: string
          description: Crypto address for funding.
        network:
          type: string
          description: Blockchain network.
  securitySchemes:
    api_key:
      type: http
      scheme: basic
      description: |
        API key authentication. Include your access token as:
        `Authorization: Basic <ACCESS_TOKEN>`
    oauth:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.bitwage.com/authorize
          tokenUrl: https://api2.bitwage.com/oauth2/token
          scopes:
            c_company_detail: Company Detail
            c_company_worker_list: Company Worker List
            c_company_worker_invitations_list: Company Worker Invitation List
            c_company_workers_invite: Company Workers Invite
            c_company_workers_pay: Company Workers Pay
            u_user_create: User Create
            u_user_update: User Update
            u_user_update_doc: User Update Document
            u_user_payer_create: User Payer Create
            u_user_payer_update: User Payer Update
            u_user_invoice_create: User Invoice Create
            u_user_invoice_delete: User Invoice Delete
            u_user_detail: User Detail
            u_user_document_list: User Document List
            u_user_payer_detail: User Payer Detail
            u_user_payer_list: User Payer List
            u_user_bank_details: User Bank Details
            u_user_invoice_detail: User Invoice Detail
            u_user_invoice_list: User Invoice List
            u_user_distribution_detail: User Distribution Detail
            u_user_distribution_list: User Distribution List
            u_user_distribution_create: User Distribution Create
            u_user_distribution_update: User Distribution Update
            u_user_kyc_initiate: User Initiate KYC

````