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

# Get Statement

> Retrieve account statement with transaction history

## Path Parameters

<ParamField path="merchantId" type="string" required>
  Merchant ID
</ParamField>

## Query Parameters

<ParamField query="id" type="string">
  Specific statement ID
</ParamField>

<ParamField query="entity" type="string">
  Filter by entity type

  Allowed values: `payout_merchant_note`, `payout_deposit`, `payout_transaction`, `payout_data_qualification`, `payin_transaction`, `payin_transaction_split`, `payin_transaction_creditcard`, `payin_transaction_creditcard_fee`, `payin_transaction_creditcard_split`, `payin_transaction_creditcard_installment`, `payin_transaction_creditcard_installment_fee`, `payin_transaction_creditcard_installment_split`, `payin_transaction_creditcard_installment_parent_split`, `payin_transaction_creditcard_parent_split_fee`, `payin_withdrawal`, `payin_transaction_refund`, `payin_transaction_rolling_reserve`, `payout_pix_reversal`,
</ParamField>

<ParamField query="category_id" type="string">
  Category IDs separated by comma

  Example: `1,8,9`
</ParamField>

<ParamField query="use_for_billing" type="string">
  Filter by billing usage
</ParamField>

<ParamField query="created_after" type="string">
  Initial creation date (format: YYYY-MM-DD)

  Example: `2024-01-01`
</ParamField>

<ParamField query="created_before" type="string">
  Final creation date (format: YYYY-MM-DD)

  Example: `2024-01-31`
</ParamField>

<ParamField query="occurrence_after" type="string">
  Initial occurrence date (format: YYYY-MM-DD)

  Example: `2024-01-01`
</ParamField>

<ParamField query="occurrence_before" type="string">
  Final occurrence date (format: YYYY-MM-DD)

  Example: `2024-01-31`
</ParamField>

<ParamField query="recipient_id" type="string">
  Recipient ID
</ParamField>

<ParamField query="currency" type="string">
  Currency

  Allowed values: `USD`, `AUD`, `EUR`, `BRL`, `GBP`, `CAD`, `CHF`
</ParamField>

<Warning>
  **Required**: Must provide `created_after`/`created_before` OR `occurrence_after`/`occurrence_before` OR `id`
</Warning>

<ParamField query="page" type="integer">
  Page number
</ParamField>

<ParamField query="per_page" type="integer">
  Quantity of items per page
</ParamField>

## Response Headers

<ResponseField name="x-next-page" type="string">
  Next page number
</ResponseField>

<ResponseField name="x-page" type="string">
  Current page number
</ResponseField>

<ResponseField name="x-per-page" type="string">
  Total items per page
</ResponseField>

<ResponseField name="x-prev-page" type="string">
  Previous page number
</ResponseField>

<ResponseField name="x-total" type="string">
  Total count of records
</ResponseField>

<ResponseField name="x-value" type="string">
  Boolean indicating if results exist
</ResponseField>

<ResponseField name="x-total-pages" type="string">
  Total pages
</ResponseField>

## Response Body

<ResponseField name="array" type="array">
  Array of statement entries

  <Expandable title="Statement Entry">
    <ResponseField name="id" type="integer">
      Statement ID
    </ResponseField>

    <ResponseField name="entity" type="string">
      Entity type

      Possible values: `payout_merchant_note`, `payout_deposit`, `payout_transaction`, `payout_data_qualification`, `payin_transaction`, `payin_transaction_split`, `payin_transaction_creditcard`, `payin_transaction_creditcard_fee`, `payin_transaction_creditcard_split`, `payin_transaction_creditcard_installment`, `payin_transaction_creditcard_installment_fee`, `payin_transaction_creditcard_installment_split`, `payin_transaction_creditcard_installment_parent_split`, `payin_transaction_creditcard_parent_split_fee`, `payin_withdrawal`, `payin_transaction_refund`, `payin_transaction_rolling_reserve`, `payout_pix_reversal`,
    </ResponseField>

    <ResponseField name="entity_id" type="integer">
      Entity identifier
    </ResponseField>

    <ResponseField name="impact_balance" type="string">
      How transaction impacts balance (e.g., `available`, `reserve`, `both`)
    </ResponseField>

    <ResponseField name="category" type="object">
      Category information

      <Expandable title="Category">
        <ResponseField name="id" type="integer | null">
          Category ID
        </ResponseField>

        <ResponseField name="name" type="string">
          Category name
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="amount" type="number">
      Transaction amount (positive for credit, negative for debit)
    </ResponseField>

    <ResponseField name="available_balance" type="number | null">
      Available balance after transaction
    </ResponseField>

    <ResponseField name="balance" type="number | null">
      Total balance after transaction
    </ResponseField>

    <ResponseField name="reserve_balance" type="number | null">
      Reserve balance after transaction
    </ResponseField>

    <ResponseField name="invoice" type="string | null">
      Invoice reference
    </ResponseField>

    <ResponseField name="description" type="string | null">
      Transaction description
    </ResponseField>

    <ResponseField name="occurrence_at" type="string">
      When the transaction occurred (ISO 8601 format)
    </ResponseField>

    <ResponseField name="created_at" type="string">
      When the statement entry was created (ISO 8601 format)
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 OK theme={null}
  [
    {
      "id": 12345,
      "entity": "payin_transaction",
      "entity_id": 67890,
      "impact_balance": "available",
      "category": {
        "id": 1,
        "name": "PIX Payment"
      },
      "amount": 100.50,
      "available_balance": 1500.00,
      "balance": 1500.00,
      "reserve_balance": 0.00,
      "invoice": "INV-12345",
      "description": "Payment received",
      "occurrence_at": "2024-01-15T10:30:00-03:00",
      "created_at": "2024-01-15T10:30:00-03:00"
    },
    {
      "id": 12346,
      "entity": "payin_transaction_creditcard_fee",
      "entity_id": 67890,
      "impact_balance": "available",
      "category": {
        "id": 8,
        "name": "PIX Fee"
      },
      "amount": -2.50,
      "available_balance": 1497.50,
      "balance": 1497.50,
      "reserve_balance": 0.00,
      "invoice": null,
      "description": "PIX transaction fee",
      "occurrence_at": "2024-01-15T10:30:00-03:00",
      "created_at": "2024-01-15T10:30:00-03:00"
    }
  ]
  ```

  ```json 400 Bad Request theme={null}
  {
    "error": "Invalid parameters"
  }
  ```

  ```json 500 Internal Server Error theme={null}
  {
    "error": "Internal server error"
  }
  ```
</ResponseExample>

## Transaction Categories

The statement includes various transaction categories. Use the category ID when filtering:

| ID | Name                          | Description                            |
| -- | ----------------------------- | -------------------------------------- |
| 1  | PIX Payment                   | PIX payment received                   |
| 2  | PIX Reversal                  | PIX payment reversal                   |
| 3  | TED Payment                   | TED transfer payment                   |
| 4  | TED Reversal                  | TED transfer reversal                  |
| 5  | Transfer Between WE Accounts  | Internal transfers between WE accounts |
| 6  | Transfer                      | General transfers                      |
| 7  | Boleto Payment                | Boleto payment received                |
| 8  | PIX Fee                       | PIX transaction fee                    |
| 9  | Boleto Fee                    | Boleto transaction fee                 |
| 10 | TED Fee                       | TED transfer fee                       |
| 11 | Merchant Note Settlement      | Settlement entry                       |
| 12 | Merchant Note Tax             | Tax entry                              |
| 13 | Merchant Note Generic         | Generic merchant note                  |
| 14 | Transfer Fee                  | Transfer transaction fee               |
| 15 | Others                        | Other transactions                     |
| 16 | Rolling Reserve               | Rolling reserve                        |
| 17 | Credit Card Transaction       | Credit card payment                    |
| 18 | Credit Card Fee               | Credit card fee                        |
| 51 | Merchant Note Judicial Freeze | Judicial freeze                        |
| 52 | PIX Refund                    | PIX refund                             |
| 53 | Markup                        | Markup fee                             |
| 54 | Current Balance               | Current balance                        |
| 55 | Conversion Fee                | Conversion Fee                         |

**Example**: To filter PIX-related transactions (payments and fees), use: `?category_id=1,8`
