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

# Void a payroll

> Voids a `reported` payroll: Hammock cancels its pull and returns its reimbursements to
`pending`. After `voidable_until` this returns a `payroll_not_voidable` error and Hammock
support resolves the payroll with you.




## OpenAPI

````yaml /openapi.yaml post /payrolls/{id}/void
openapi: 3.1.0
info:
  title: Hammock Partner API
  version: '2026-12-01'
  summary: Offer Hammock benefits inside your payroll product.
  description: |
    Preview of the Hammock Partner API. Nothing in this document is live yet:
    object shapes and endpoints may change before release.
  contact:
    name: Hammock
    email: support@usehammock.co
servers:
  - url: https://api.usehammock.co
    description: Live
  - url: https://api.sandbox.usehammock.co
    description: Sandbox
security:
  - bearerAuth: []
tags:
  - name: Employers
    description: The companies you offer Hammock benefits to.
  - name: Pay schedules
    description: >-
      How often an employer pays its employees, and the lock date of each pay
      period.
  - name: Employees
    description: An employer's roster, kept in sync by you.
  - name: Benefits
    description: The benefits an employer offers for a plan year.
  - name: Elections
    description: What an employee chose in the hosted enrollment flow.
  - name: Deductions
    description: >-
      Standing instructions for what to withhold and contribute on each
      paycheck.
  - name: Reimbursements
    description: One-time amounts to pay an employee through payroll.
  - name: Employer contributions
    description: >-
      One-time employer contributions made outside payroll, for year-end
      reporting.
  - name: Payrolls
    description: Payrolls you report to Hammock, with what was withheld and paid.
  - name: Pulls
    description: ACH debits from an employer's bank account.
  - name: Events
    description: A record of everything that changed.
  - name: Webhook endpoints
    description: Where Hammock delivers events.
  - name: Test helpers
    description: Sandbox-only endpoints that skip hosted flows and waiting periods.
paths:
  /payrolls/{id}/void:
    parameters:
      - $ref: '#/components/parameters/Id'
    post:
      tags:
        - Payrolls
      summary: Void a payroll
      description: >
        Voids a `reported` payroll: Hammock cancels its pull and returns its
        reimbursements to

        `pending`. After `voidable_until` this returns a `payroll_not_voidable`
        error and Hammock

        support resolves the payroll with you.
      operationId: voidPayroll
      parameters:
        - $ref: '#/components/parameters/HammockVersion'
        - $ref: '#/components/parameters/IdempotencyKey'
      responses:
        '200':
          description: The voided payroll.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payroll'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    Id:
      name: id
      in: path
      required: true
      schema:
        type: string
    HammockVersion:
      name: Hammock-Version
      in: header
      description: >-
        The API version to use for this request. Defaults to the version pinned
        to your API key.
      schema:
        type: string
      example: '2026-12-01'
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      description: >-
        A unique value, up to 255 characters, that makes the request safe to
        retry for 24 hours.
      schema:
        type: string
        maxLength: 255
      example: 4f1c6a52-9d0e-4b7a-8a51-2f6f1c1b9e77
  schemas:
    Payroll:
      type: object
      required:
        - id
        - object
        - employer
        - external_id
        - type
        - pay_period
        - pay_date
        - status
        - totals
        - deductions
        - reimbursements
        - metadata
        - livemode
        - created
      properties:
        id:
          type: string
          examples:
            - pay_6Mn2Bv8cXz4L
        object:
          type: string
          const: payroll
        employer:
          type: string
          examples:
            - empr_1Qx8Zt2eZvKYlo2C
        external_id:
          type: string
          examples:
            - payroll_2027_03_19
        type:
          type: string
          enum:
            - regular
            - off_cycle
        pay_schedule:
          type:
            - string
            - 'null'
          examples:
            - ps_7Hn3Kd9sLq2W
        pay_period:
          $ref: '#/components/schemas/DateRange'
        pay_date:
          type: string
          format: date
          examples:
            - '2027-03-19'
        status:
          $ref: '#/components/schemas/PayrollStatus'
        voidable_until:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the ACH pull starts and the payroll can no longer be voided.
            `null` once it has passed or the payroll is voided.
          examples:
            - '2027-03-19T13:00:00Z'
        pull:
          type:
            - string
            - 'null'
          description: The pull that funds this payroll, when it moves money.
          examples:
            - pull_3Vb7Nm1qWe5R
        totals:
          type: object
          required:
            - employee_amount
            - employer_amount
            - reimbursement_amount
            - currency
          properties:
            employee_amount:
              type: integer
              examples:
                - 15000
            employer_amount:
              type: integer
              examples:
                - 5000
            reimbursement_amount:
              type: integer
              examples:
                - 12500
            currency:
              type: string
              const: usd
        deductions:
          type: array
          items:
            $ref: '#/components/schemas/PayrollDeduction'
        reimbursements:
          type: array
          description: IDs of the reimbursements this payroll paid.
          items:
            type: string
          examples:
            - - reimb_8Wq3Zr6tHy1D
        voided_at:
          type:
            - string
            - 'null'
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        metadata:
          $ref: '#/components/schemas/Metadata'
        livemode:
          type: boolean
        created:
          type: string
          format: date-time
          examples:
            - '2027-03-17T19:30:00Z'
    DateRange:
      type: object
      required:
        - start_date
        - end_date
      properties:
        start_date:
          type: string
          format: date
          examples:
            - '2027-03-01'
        end_date:
          type: string
          format: date
          examples:
            - '2027-03-15'
    PayrollStatus:
      type: string
      enum:
        - reported
        - funding
        - completed
        - voided
        - failed
      description: >
        `reported`: received, and voidable until `voidable_until`. `funding`:
        the ACH pull has

        started. `completed`: the pull settled and contributions are in
        employees' accounts.

        `voided`: you voided it. `failed`: the pull was returned by the
        employer's bank.
    PayrollDeduction:
      type: object
      required:
        - deduction
        - employee
        - benefit_type
        - expected_employee_amount
        - employee_amount
        - expected_employer_amount
        - employer_amount
        - variance
      properties:
        deduction:
          type: string
          examples:
            - ded_2Lp9Xc4vNm7K
        employee:
          type: string
          examples:
            - emp_5Tg7Rw2nBx8P
        benefit_type:
          $ref: '#/components/schemas/BenefitType'
        expected_employee_amount:
          type: integer
          description: What the deduction called for on this pay date.
          examples:
            - 15000
        employee_amount:
          type: integer
          description: What you reported.
          examples:
            - 15000
        expected_employer_amount:
          type: integer
          examples:
            - 5000
        employer_amount:
          type: integer
          examples:
            - 5000
        variance:
          type: string
          enum:
            - none
            - under
            - over
            - not_reported
          description: >-
            How the reported amounts compare with the expected ones.
            `not_reported` means the deduction was active and you left it out.
    Metadata:
      type: object
      description: >-
        Up to 50 key-value pairs you can attach to an object. Keys are up to 40
        characters and values up to 500.
      additionalProperties:
        type: string
      examples:
        - plan: growth
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - message
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - idempotency_error
                - api_error
              description: The category of error.
            code:
              type: string
              description: A short, stable string identifying the specific error.
              examples:
                - payroll_not_voidable
            message:
              type: string
              description: >-
                A human-readable explanation. Don't parse it, and don't show it
                to end users.
            param:
              type:
                - string
                - 'null'
              description: >-
                The parameter the error relates to, using dot and bracket
                notation for nested fields.
              examples:
                - deductions[0].employee_amount
            doc_url:
              type: string
              format: uri
            request_id:
              type: string
              examples:
                - req_9Kd2Lm5nPq8R
    BenefitType:
      type: string
      enum:
        - hsa
        - health_fsa
        - limited_purpose_fsa
        - dependent_care_fsa
        - ichra
        - lsa
        - hra
        - cobra
        - wellness
  responses:
    Error:
      description: An error. The HTTP status and `error.type` say what kind.
      headers:
        Request-Id:
          description: Identifies this request. Include it when you contact support.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: invalid_request_error
              code: parameter_missing
              message: 'Missing required parameter: employer.'
              param: employer
              doc_url: https://docs.usehammock.co/api/errors#parameter_missing
              request_id: req_9Kd2Lm5nPq8R
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your secret API key, sent as `Authorization: Bearer hmk_test_...`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.