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

# Get Transactions

> Retrieves a paginated list of transactions with optional filtering.

Retrieve a paginated list of your transactions with optional filtering by status and date range.

## Example Request

```bash theme={null}
curl -X GET "https://api.rolla.xyz/api/v1/external/transactions?page=1&pageSize=20&status=completed" \
  -H "X-API-Key: your_api_key_here"
```

## Query Parameters

| Parameter   | Type    | Description                                        |
| ----------- | ------- | -------------------------------------------------- |
| `page`      | integer | Page number (default: 1)                           |
| `pageSize`  | integer | Results per page (default: 20, max: 100)           |
| `status`    | string  | Filter by status: `pending`, `completed`, `failed` |
| `startDate` | string  | Start date filter (ISO 8601 format)                |
| `endDate`   | string  | End date filter (ISO 8601 format)                  |

## Example Response

```json theme={null}
{
  "status": 200,
  "success": true,
  "message": "Transactions retrieved successfully",
  "data": {
    "transactions": [
      {
        "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "transaction_type": "withdrawal",
        "status": "completed",
        "description": "Vendor payment",
        "external_reference": "ref-abc123",
        "fee_amount": 53,
        "source_amount": 500000,
        "destination_amount": 499947,
        "source_currency": "NGN",
        "destination_currency": "NGN",
        "created_at": "2024-01-15T10:30:00.000Z",
        "updated_at": "2024-01-15T10:30:45.000Z"
      }
    ],
    "totalCount": 150,
    "page": 1,
    "pageSize": 20,
    "totalPages": 8
  }
}
```

<Tip>
  Use date range filters to export transaction data for specific periods. Combine with status filter to find failed transactions that may need to be retried.
</Tip>


## OpenAPI

````yaml GET /transactions
openapi: 3.1.0
info:
  title: Rolla Developer API
  description: >-
    API for programmatic transaction management on the Rolla platform. Monetary
    `amount` fields use the smallest unit of the referenced currency unless an
    endpoint says otherwise (e.g. NGN = kobo, USD = cents, where **100 cents =
    USD 1.00**).
  version: 1.0.0
servers:
  - url: https://api.rolla.xyz/api/v1/external
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /transactions:
    get:
      summary: Get Transactions
      description: Retrieves a paginated list of transactions with optional filtering.
      operationId: getTransactions
      parameters:
        - name: page
          in: query
          description: 'Page number (default: 1)'
          schema:
            type: integer
            default: 1
        - name: pageSize
          in: query
          description: 'Number of results per page (default: 20)'
          schema:
            type: integer
            default: 20
        - name: status
          in: query
          description: Filter by transaction status
          schema:
            type: string
            enum:
              - pending
              - completed
              - failed
        - name: startDate
          in: query
          description: Filter transactions from this date (ISO 8601 format)
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: Filter transactions until this date (ISO 8601 format)
          schema:
            type: string
            format: date
      responses:
        '200':
          description: Transactions retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 200
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Transactions retrieved successfully
                  transactions:
                    type: array
                    items:
                      $ref: '#/components/schemas/Transaction'
                  totalCount:
                    type: integer
                    description: Total number of transactions
                    example: 150
                  page:
                    type: integer
                    description: Current page number
                    example: 1
                  pageSize:
                    type: integer
                    description: Results per page
                    example: 20
                  totalPages:
                    type: integer
                    description: Total number of pages
                    example: 8
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Transaction:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Transaction identifier
        transaction_type:
          type: string
          enum:
            - deposit
            - withdrawal
            - swap
          description: Transaction type
        status:
          type: string
          enum:
            - pending
            - completed
            - failed
            - rejected
            - sent
            - processing
          description: Transaction status
        description:
          type: string
          description: Transaction description
        external_reference:
          type: string
          nullable: true
          description: External reference ID
        fee_amount:
          type: number
          description: >-
            Fee charged for this transaction. On a `fee` transaction this is `0`
            — the fee value is carried as that row's
            source_amount/destination_amount, so totalling fee_amount across
            transactions does not double-count it.
        fee_transaction_id:
          type: string
          format: uuid
          description: >-
            Where the fee is charged to a different account rather than deducted
            from this transaction, the id of the separate transaction it was
            booked as. Omitted when no such transaction exists.
        fee_reference:
          type: string
          description: >-
            Reference of that fee transaction, in the form `FEE-XXXXXXXX`.
            Omitted when no separate fee transaction exists.
          example: FEE-9J76UADV
        related_transaction_id:
          type: string
          format: uuid
          description: >-
            On a `fee` transaction, the id of the transaction the fee was
            charged for — the reverse of fee_transaction_id. Omitted on
            transactions that are not fees.
        related_reference:
          type: string
          description: >-
            Reference of that originating transaction. Omitted on transactions
            that are not fees.
        source_amount:
          type: number
          description: >-
            Amount debited from the source wallet. Normally amount + fee for a
            payout, but equal to the amount when the fee is charged to a
            separate account. Never derive the fee from this — read fee_amount.
        destination_amount:
          type: number
          description: Amount credited to the destination wallet
        source_currency:
          type: string
          description: Currency of the source wallet
        destination_currency:
          type: string
          description: Currency of the destination wallet
        created_at:
          type: string
          format: date-time
          description: Transaction creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Rolla API key

````