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

# Approve and disburse a payroll batch

> Reserves the full amount plus fees from the wallet and submits every valid
beneficiary payment. Send exactly one of:

- `code`: a current TOTP code or an unused recovery code of the account owner; or
- `mandateId` with `externalApproval` (API keys only): approve under an API approval
mandate the owner armed from the dashboard. The mandate must be bound to the calling
key, the batch must have been created with that key, and the batch must fit the
mandate's ceilings. `externalApproval` names who approved the payroll in your
product: `approverName`, `approverEmail` or `approverId`, `approvedAt`, `reference`.

Returns 402 with the shortfall when the wallet cannot cover the batch, and 403 when a
mandate does not cover it.



## OpenAPI

````yaml /openapi.json post /payroll/batches/{id}/approve
openapi: 3.0.0
info:
  description: |-
    Hyparrow payment gateway API. Authenticate server-to-server
    requests with your API key credentials.
  title: Hyparrow API
  termsOfService: https://hyparrow.cloud/terms
  contact:
    name: Hyparrow Support
    email: support@hyparrow.com
  version: '1.0'
servers:
  - url: https://api.hyparrow.cloud/api/v1
    description: Production
  - url: https://sandbox.hyparrow.cloud/api/v1
    description: Sandbox - simulated providers, test keys only, no real money
security: []
paths:
  /payroll/batches/{id}/approve:
    post:
      tags:
        - Payroll
      summary: Approve and disburse a payroll batch
      description: >-
        Reserves the full amount plus fees from the wallet and submits every
        valid

        beneficiary payment. Send exactly one of:


        - `code`: a current TOTP code or an unused recovery code of the account
        owner; or

        - `mandateId` with `externalApproval` (API keys only): approve under an
        API approval

        mandate the owner armed from the dashboard. The mandate must be bound to
        the calling

        key, the batch must have been created with that key, and the batch must
        fit the

        mandate's ceilings. `externalApproval` names who approved the payroll in
        your

        product: `approverName`, `approverEmail` or `approverId`, `approvedAt`,
        `reference`.


        Returns 402 with the shortfall when the wallet cannot cover the batch,
        and 403 when a

        mandate does not cover it.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
          ApiSecretAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      description: >-
        Your API key, sent in the "X-API-Key" header. Every endpoint needs the
        key and the secret together; a request carrying only one of the pair is
        rejected with 401.
      type: apiKey
      name: X-API-Key
      in: header
    ApiSecretAuth:
      description: >-
        Your API secret, sent in the "X-API-Secret" header alongside the API key
        on every request.
      type: apiKey
      name: X-API-Secret
      in: header

````