> ## 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.

# addFundsToLedger

> ⚠️ WARNING: Sandbox Only Method. Pleaee do not include this in production flows

Add simulated funds to a test company's ledger before continuing a funded payroll scenario. The company must already have an active funding source.

### Required inputs:
- `companyId`: The ID of the sandbox company.
- `amount`: A numeric amount to add to the ledger. Use a positive amount appropriate for your test scenario.

### Response:
A successful request returns `success: true` and `message: Funds added successfully.

### Notes:
- When linking with plaid, balances are checked periodically and before running payroll. If balance-related sandbox errors persist please contact support.
- Each successful call adds funds again. Retry only to increase the balance.



## OpenAPI

````yaml POST /sandbox/addFundsToLedger
openapi: 3.1.0
info:
  title: Default module
  description: |
    Webhook events emitted when a company's KYB status is created or changes.

    Rollfi sends these requests to the webhook URL configured for the client.
    Consumers should return a successful 2xx response after accepting the event.
  version: 1.0.0
servers: []
security: []
tags:
  - name: Admin Portal
  - name: TimeOff Admin
  - name: TimeTracking Admin
  - name: TimeOff User
  - name: TimeTracking User
  - name: TimeTracking Reports
  - name: TimeOff Reports
  - name: Pay Schedule Webhooks
  - name: Pay Period Webhooks
  - name: Employee Bank Account Webhooks
  - name: Employee KYC Webhooks
  - name: Company Bank Account Webhooks
  - name: Company Webhooks
  - name: Employee Status Webhooks
  - name: Sandbox
paths:
  /sandbox/addFundsToLedger:
    post:
      tags:
        - Sandbox
      summary: addFundsToLedger
      description: >-
        ⚠️ WARNING: Sandbox Only Method. Pleaee do not include this in
        production flows


        Add simulated funds to a test company's ledger before continuing a
        funded payroll scenario. The company must already have an active funding
        source.


        ### Required inputs:

        - `companyId`: The ID of the sandbox company.

        - `amount`: A numeric amount to add to the ledger. Use a positive amount
        appropriate for your test scenario.


        ### Response:

        A successful request returns `success: true` and `message: Funds added
        successfully.


        ### Notes:

        - When linking with plaid, balances are checked periodically and before
        running payroll. If balance-related sandbox errors persist please
        contact support.

        - Each successful call adds funds again. Retry only to increase the
        balance.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  default: addFundsToLedger
                companyId:
                  type: string
                  format: uuid
                  description: The ID of the sandbox company with an active funding source.
                amount:
                  type: number
                  format: double
                  description: >-
                    The amount to add to the current and available ledger
                    balances. Use a positive amount for positive testing.
              required:
                - method
                - companyId
                - amount
            example:
              method: addFundsToLedger
              companyId: 8b2f4a91-6c35-4d7e-9a10-2f83c5e6b074
              amount: 10000
      responses:
        '200':
          description: >-
            The ledger funding result or an error response. Check the response
            body rather than relying on the HTTP status alone.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  error:
                    type:
                      - object
                      - string
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
              examples:
                '1':
                  summary: Success
                  value:
                    success: true
                    message: Funds added successfully.
                '2':
                  summary: No active funding source
                  value:
                    error:
                      code: 400
                      message: No active funding source found for the company
          headers: {}
      deprecated: false
      security: []

````

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