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

# Generate a test settlement report

> Generate a test settlement report. Only available in test.

*scopes*:
  - admin:billing
  - admin:reports




## OpenAPI

````yaml /mintlify-docs/openapi/spec-billing.yaml post /accounts/{aid}/settlements/reports/generate-test-report
openapi: 3.0.0
info:
  title: Billing API
  contact:
    name: API Integration Support
    email: integration@dintero.com
  description: >
    # Changelog

    All notable changes to the API.


    ## 2025-12-15


    > **new** Add new endpoint to trigger generating settlement report in test.

    > - [POST
    /v1/accounts/{aid}/settlements/reports/generate-test-report](/api-reference/settlements/aid_settlement_generate_test_report)


    ## 2025-10-01


    > Extend billing subscription price definition with optional `price_model`

    > field. The field can be used to define how the price is applied

    > - [GET
    /v1/accounts/{aid}/billing/subscriptions](/billing-api/subscriptions/aid_billing_subscriptions_get)


    > Add support for filtering subscriptions by dimensions

    > - [GET
    /v1/accounts/{aid}/billing/subscriptions](/billing-api/subscriptions/aid_billing_subscriptions_get)


    ## 2024-12-20


    > Add support for filtering settlements by `item_created_at.gte`

    > and `item_created_at.lte`. The new filter enables getting list of
    settlement

    > by when they was created, the existing support for
    `created_at.gte`/`created_at.lte`

    > filters by when they was settled (`settled_at`)

    > - [GET
    /v1/accounts/{aid}/settlements](/api-reference/settlements/aid_settlements_list)


    ## 2024-06-01

    > Add pagination to report configuration listing

    > - [GET
    /v1/accounts/{aid}/settlements/reports/configuration](/api-reference/settlementsconfiguration/aid_settlement_report_config_list)


    ## 2023-04-01

    > **new** Add filter on `namespace` and `currency`

    > - [GET
    /v1/accounts/{aid}/billing/subscriptions](/billing-api/subscriptions/aid_billing_subscriptions_get)


    ## 2022-06-01


    > **new** Add filter on `payout_destination_id`

    > - [GET
    /v1/accounts/{aid}/settlements](/api-reference/settlements/aid_settlements_list)


    ## 2022-04-01


    > **new** Add possibility to delete report configurations

    > - [DELETE
    /v1/accounts/{aid}/settlements/reports/configuration/{configuration_id}](/api-reference/settlementsconfiguration/aid_settlement_report_config_delete)


    > **new** Add `destination_type: email` and support filter on
    `payout_destination_id` on settlement report configs

    > - [POST
    /v1/accounts/{aid}/settlements/reports/configuration](/api-reference/settlementsconfiguration/aid_settlement_report_config_create)

    > - [GET
    /v1/accounts/{aid}/settlements/reports/configuration](/api-reference/settlementsconfiguration/aid_settlement_report_config_list)

    > - [PUT
    /v1/accounts/{aid}/settlements/reports/configuration/{configuration_id}](/api-reference/settlementsconfiguration/aid_settlement_report_config_list)


    ## 2020-12-01


    > **new** Support filter user payout rules with `include_deleted` query
    parameter.

    > - [GET
    /v1/accounts/{aid}/billing/payout-rules?include_deleted=false](/billing-api/payoutrules/aid_billing_payout_rules_get)


    ## 2020-05-01


    > **[Payout Rules](#tag/payout.rules)**

    > Add new endpoint for managing Payout rules.
  version: LATEST
  license:
    name: UNLICENSED
    url: https://dintero.com
  x-logo:
    url: https://docs.dintero.com/img/dintero-dark-padded.svg
    altText: Dintero Logo
servers:
  - url: https://api.dintero.com/v1
security:
  - JWT: []
tags:
  - name: payout.rules
    x-displayName: Rules
    description: Manage payout rules
  - name: reports
    x-displayName: Reports
    description: Get billing reports
  - name: subscriptions
    x-displayName: Plans
    description: Get subscription plans
  - name: settlements
    x-displayName: Reports
    description: Get settlement reports
  - name: settlements.configuration
    x-displayName: Configuration
    description: Configure settlement reports
paths:
  /accounts/{aid}/settlements/reports/generate-test-report:
    post:
      tags:
        - settlements
      summary: aid_settlement_generate_test_report
      description: |
        Generate a test settlement report. Only available in test.

        *scopes*:
          - admin:billing
          - admin:reports
      operationId: aid_settlement_generate_test_report
      parameters:
        - $ref: '#/components/parameters/accountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestReportOptions'
      responses:
        '200':
          description: |
            No transactions to generate report. This can be if there are
            no new transaction events to generate report for.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestReportResponse'
        '201':
          description: Settlement report created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestReportResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      servers:
        - url: https://api.dintero.com/v1
components:
  parameters:
    accountId:
      name: aid
      description: |
        An id that uniquely identifies the account.
      in: path
      required: true
      schema:
        type: string
        format: ^[PT]{1}\d{8}$
        minLength: 9
        maxLength: 9
  schemas:
    TestReportOptions:
      type: object
      description: >
        Options to determine which transactions to include. If no options are
        included

        transactions from the last 7 days will be included.


        Only operations for a transaction that has not already been settled

        will be included.
      properties:
        transaction_ids:
          description: >
            Array of transaction IDs to include in the report. If a transaction
            has already been

            settled earlier it will be ignored. An empty array will be ignored.

            Should not be combined with `number_of_transactions` or
            `date_range`.
          type: array
          maxItems: 1000
          example:
            - T12345678.aaaabbbbccccddddeeee01
            - T12345678.aaaabbbbccccddddeeee02
          items:
            type: string
        number_of_transactions:
          description: >
            Number of transactions to include. Can be combined with
            `date_range`, but

            should not be combined with `transaction_ids`. Must be a positive
            integer.
          type: integer
          minimum: 1
          maximum: 10000
          example: 10
        date_range:
          description: >
            A date range to limit which transactions to include. Can be combined
            with

            `number_of_transactions`, but should not be combined with
            `transaction_ids`.


            `start_date` must be before `end_date`.
          type: object
          required:
            - start_date
            - end_date
          properties:
            start_date:
              type: string
              format: date
              example: '2025-12-01'
            end_date:
              type: string
              format: date
              example: '2025-12-07'
    TestReportResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
          properties:
            code:
              type: string
              description: The code used to identify the error/warning
            errors:
              type: array
              description: The nested error(s) encountered during validation
              items:
                type: object
            message:
              type: string
              description: The human readable description of the error/warning
  responses:
    BadRequest:
      description: Bad / Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Unexpected Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    JWT:
      type: http
      description: >
        Bearer authentication (token authentication) should be used for
        accessing the API.


        Use [Get Token](/api-reference/authenticate/aid_auths_oauth_token_post)
        to get an access token for client credentials.

        Pass the token in the request header:

            Authorization: Bearer {access_token}

        where the **access_token** is JSON Web Tokens (JWT).
      scheme: bearer
      bearerFormat: JWT

````