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

# Get by Customer ID

> API reference for fetching transactions by customer ID

Retrieves a paginated list of transactions for a specific customer with filtering options.

### Key Features:

* Returns all transactions associated with a customer ID
* Supports filtering by status, type, mode, currency, and date range
* Includes search functionality by transaction ID
* Provides pagination metadata
* Returns complete transaction details including merchant information

### Path Parameters:

* `customer_id`: The customer's unique identifier (UUID, required)

### Query Parameters:

* `search`: Search by transaction ID (partial or full match)
* `status`: Filter by transaction status (`PENDING`, `COMPLETED`, `FAILED`, `REVERSED`)
* `transaction_type`: Filter by type (`DEPOSIT`, `PAYOUT`, `INTERNAL TRANSFER`)
* `transaction_mode`: Filter by mode (`CREDIT`, `DEBIT`)
* `currency`: Filter by currency (`USDC`, `USDT`)
* `start_date`: Filter by start date (format: `YYYY-MM-DD`)
* `end_date`: Filter by end date (format: `YYYY-MM-DD`)
* `page`: Page number (default: 1)
* `limit`: Items per page (default: 20, max: 100)


## OpenAPI

````yaml GET /customers/transactions/by_customer_id/{customer_id}
openapi: 3.0.0
info:
  title: 'StableStack: API Service'
  description: "# Overview\n\n##  Introduction\n\nStableStack offers an API first, last mile payment orchestration + liquidity router built with stablecoins. Stablecoin layer integrated into your existing payment flow, with smart accounts and blockchain abstraction. Go between digital and fiat currencies in minutes.\n\n## Getting Help\n\nWe're excited to have you build with us! If you're integrating, we will set up a communication channel. This will enable our teams to easily collaborate and ensure you launch as quickly as possible.\n\nPlease reach out to us at\_[hello@stablestack.xyz](https://mailto:hello@stablestack.xyz)\_for any questions or concerns."
  version: 1.0.0
servers:
  - url: https://api-staging.stablestack.com/api
    description: StableStack API
security: []
tags:
  - name: customers
  - name: customers > kyc
  - name: payouts
  - name: banks
  - name: transactions
  - name: wallets
  - name: assets
  - name: swap
paths:
  /customers/transactions/by_customer_id/{customer_id}:
    get:
      tags:
        - transactions
      summary: Fetch transactions by customer ID
      description: >-
        Retrieves a paginated list of transactions for a specific customer with
        filtering options
      parameters:
        - name: x-api-key
          in: header
          schema:
            type: string
          required: true
          example: merchant_api_key_12345
        - name: customer_id
          in: path
          schema:
            type: string
            format: uuid
          required: true
          example: ddf723ee-5558-442d-b46f-4e3d42817448
        - name: search
          in: query
          schema:
            type: string
          required: false
          example: dummy_k2aijr1l6gdvpzdskv8hgq
        - name: status
          in: query
          schema:
            type: string
            enum:
              - PENDING
              - COMPLETED
              - FAILED
              - REVERSED
          required: false
          example: PENDING
        - name: transaction_type
          in: query
          schema:
            type: string
            enum:
              - DEPOSIT
              - PAYOUT
              - INTERNAL TRANSFER
          required: false
          example: DEPOSIT
        - name: transaction_mode
          in: query
          schema:
            type: string
            enum:
              - CREDIT
              - DEBIT
          required: false
          example: CREDIT
        - name: currency
          in: query
          schema:
            type: string
          required: false
          example: USD
        - name: start_date
          in: query
          schema:
            type: string
            format: date
          required: false
          example: '2025-03-03'
        - name: end_date
          in: query
          schema:
            type: string
            format: date
          required: false
          example: '2025-04-29'
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
          required: false
          example: 2
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
          required: false
          example: 20
      responses:
        '200':
          description: Transactions retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: array
                    items: 4f2fe7bc-1d87-43d2-bf0c-314cfbad11c4
                  pagination: 4d339e25-8364-4ebc-8bfe-d5a742fc7533
              examples:
                success:
                  value:
                    status: success
                    data:
                      - merchant_id: d9b40fe2-25a1-43b5-88aa-ab473004b782
                        id: c59c1766-4ab8-45e5-8de3-d0c842a31d61
                        sender_wallet_id: null
                        receiver_wallet_id: null
                        transaction_id: E6TH890JID
                        asset_code: busd
                        amount: '4.09723734'
                        reference_id: 8h8c1766-4ab8-45e5-8de3-d0c842a31d61
                        status: PENDING
                        created_at: '2025-04-29T10:15:04.974Z'
                        updated_at: '2025-04-29T14:53:25.820Z'
                        crypto_transaction_id: null
                        network: null
                        transaction_type: INTERNAL TRANSFER
                        transaction_mode: DEBIT
                        exchange_rate: '1.50'
                        withdrawal_recipient_name: null
                        fee: null
                        balance: '0.00000000'
                        reason: null
                        customer_id: ddf723ee-5558-442d-b46f-4e3d42817448
                        recipient_currency: null
                        recipient_country: null
                        bank_name: null
                        bank_code: null
                        address: null
                        bank_account: null
                    pagination:
                      total: 3
                      page: 1
                      limit: 10
                      totalPages: 1
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalidDate:
                  value:
                    status: error
                    message: Invalid date format. Please use YYYY-MM-DD
                    code: INVALID_DATE_FORMAT
        '404':
          description: Customer not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound:
                  value:
                    status: error
                    message: Customer not found
                    code: CUSTOMER_NOT_FOUND
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: error
        message:
          type: string
          example: Error message
        code:
          type: string
          example: ERROR_CODE

````