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

# addPaySchedule

> Sets up payment frequency and schedule for company employees.

🔹For more in depth details on how to set up a paySchedule, take a look at the [Payroll Guide](https://rollfi-monthly-semi-monthly.mintlify.app/docs/PayrollGuide)

### Compensation Frequencies
| Frequency | Use Case |
|-----------|----------|
| Weekly | Hourly workers, high turnover |
| BiWeekly | Most common for salaried |
| SemiMonthly | 15th and last day of month |
| Monthly | Executive/contractor payments |
| Quarterly | Sole proprietors/Small business owners |

----

### Monthly and Semi-Monthly Schedules
- To retrieve pay period startDates and endDates, use the `getMonthlySemitMonthlyPaySchedulDates` API
- The day employees are paid in Monthly and SemiMonthly pay schedules is flexible
- For SemiMonthly pay schedules use `payDateOptions` to set a pay day based on the distance from the payEndDate
- For Monthly pay schedules use `payDay`

### Quarterly Schedules
- The start and end date of each payPeriod are determined by the `payDate` in the request
- To begin a schedule including the current quarter, the payDate but be on or before Quarter end

### ⚠️ Warning:

- The **option** field, previously used to determine the payDay for Monthly and SemitMonthly paySchedules will be deprecated soon 

### Note:
- **payDate, payDay or payDateOptions** are **required** based on the pay schedule



## OpenAPI

````yaml post /payroll/addPaySchedule
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers: []
security:
  - basic: []
tags: []
paths:
  /payroll/addPaySchedule:
    post:
      tags: []
      summary: addPaySchedule
      description: >-
        Sets up payment frequency and schedule for company employees.


        🔹For more in depth details on how to set up a paySchedule, take a look
        at the [Payroll
        Guide](https://rollfi-monthly-semi-monthly.mintlify.app/docs/PayrollGuide)


        ### Compensation Frequencies

        | Frequency | Use Case |

        |-----------|----------|

        | Weekly | Hourly workers, high turnover |

        | BiWeekly | Most common for salaried |

        | SemiMonthly | 15th and last day of month |

        | Monthly | Executive/contractor payments |

        | Quarterly | Sole proprietors/Small business owners |


        ----


        ### Monthly and Semi-Monthly Schedules

        - To retrieve pay period startDates and endDates, use the
        `getMonthlySemitMonthlyPaySchedulDates` API

        - The day employees are paid in Monthly and SemiMonthly pay schedules is
        flexible

        - For SemiMonthly pay schedules use `payDateOptions` to set a pay day
        based on the distance from the payEndDate

        - For Monthly pay schedules use `payDay`


        ### Quarterly Schedules

        - The start and end date of each payPeriod are determined by the
        `payDate` in the request

        - To begin a schedule including the current quarter, the payDate but be
        on or before Quarter end


        ### ⚠️ Warning:


        - The **option** field, previously used to determine the payDay for
        Monthly and SemitMonthly paySchedules will be deprecated soon 


        ### Note:

        - **payDate, payDay or payDateOptions** are **required** based on the
        pay schedule
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: addPaySchedule
                paySchedule:
                  type: object
                  properties:
                    companyId:
                      type: string
                    workerType:
                      type: string
                      title: Enum
                    standardWorkingHours:
                      type: integer
                    compensationFrequency:
                      type: string
                      title: Enum
                      enum:
                        - Weekly
                        - BiWeekly
                        - SemiMonthly
                        - Monthly
                    payBeginDate:
                      type: string
                    payDateOptions:
                      type: string
                      enum:
                        - 7 days From payEndDate
                        - 6 days From payEndDate
                        - 5 days From payEndDate
                        - 4 days From payEndDate
                        - 3 days From payEndDate
                        - 2 days From payEndDate
                        - 1 days From payEndDate
                      description: Used for SemiMonthly payPeriods
                    payDate:
                      type: string
                      title: ''
                      description: Used for Weekly, BiWeekly, Quarterly payPeriods
                    payDay:
                      type: string
                      description: Used for Monthly payPeriods
                      enum:
                        - 15th and last day of the month
                    paymentMode:
                      type: string
                      title: Enum
                  required:
                    - companyId
                    - workerType
                    - standardWorkingHours
                    - compensationFrequency
                    - paymentMode
                    - payBeginDate
              required:
                - method
                - paySchedule
            examples:
              '1':
                value:
                  method: addPaySchedule
                  paySchedule:
                    companyId: AFB94AFD-D9EE-4018-A718-304D43702C9C
                    workerType: 1099-NEC
                    standardWorkingHours: 8
                    compensationFrequency: BiWeekly
                    payBeginDate: '2025-07-31'
                    payDate: '2025-08-04'
                    paymentMode: Self-Initiated
                summary: Weekly, BiWeekly
              '2':
                value:
                  method: addPaySchedule
                  paySchedule:
                    companyId: ECF1B47E-108F-45C0-A520-6A128A727B04
                    workerType: W2
                    standardWorkingHours: 8
                    compensationFrequency: SemiMonthly
                    payBeginDate: '2026-02-16'
                    payDateOptions: 5 days From payEndDate
                    paymentMode: Automatic
                summary: SemiMonthly
              '3':
                value:
                  method: addPaySchedule
                  paySchedule:
                    companyId: ECF1B47E-108F-45C0-A520-6A128A727B04
                    workerType: W2
                    standardWorkingHours: 8
                    compensationFrequency: Monthly
                    payBeginDate: '2026-02-16'
                    payDay: Last day of the month
                    paymentMode: Automatic
                summary: Monthly
              '4':
                value:
                  method: addPaySchedule
                  paySchedule:
                    companyId: A26B85B1-7203-4316-B087-006D0D17140C
                    workerType: 1099-NEC
                    compensationFrequency: Quarterly
                    paymentMode: Automatic
                    standardWorkingHours: 8
                    payDate: '2026-03-17'
                summary: Quarterly
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  paySchedule:
                    type: object
                    properties:
                      payScheduleId:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                    required:
                      - payScheduleId
                      - status
                      - message
                required:
                  - paySchedule
              examples:
                '1':
                  summary: Success
                  value:
                    paySchedule:
                      payScheduleId: 8457D59C-20B9-4B01-8B2F-7BD60C700DEB
                      status: Active
                      message: >-
                        The PaySchedule  for Blanda's LLC has been added
                        successfully
                '2':
                  summary: Exception
                  value:
                    error:
                      code: 400
                      message: PayDate format is not valid
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: integer
                        message:
                          type: string
                required:
                  - error
          headers: {}
      deprecated: false
      security:
        - basic: []
components:
  securitySchemes:
    basic:
      type: http
      scheme: basic

````