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

# Search Transactions

> Search for transactions using various filter criteria.

## Endpoint

`GET /search`

Search for transactions based on criteria.

## Query Parameters

| Name   | Description                                                              | Allowed Values                               |
| :----- | :----------------------------------------------------------------------- | :------------------------------------------- |
| status | Filter transactions by status.                                           | `created`, `successful`, `failed`, `expired` |
| medium | Filter by payment medium.                                                | `mobile money`, `orange money`               |
| start  | Start date (YYYY-MM-DD) for filtering initiated transactions.            | Date format                                  |
| end    | End date (YYYY-MM-DD) for filtering initiated transactions.              | Date format                                  |
| amt    | Exact amount to filter by.                                               | Integer                                      |
| limit  | Maximum number of results (default 10).                                  | 1 to 100                                     |
| sort   | Sort order: `asc` or `desc`. Defaults to descending (most recent first). | `asc`, `desc`                                |

<Note>Invalid query parameter values are ignored.</Note>


## OpenAPI

````yaml /en/api-reference/openapi.json GET /search
openapi: 3.1.0
info:
  title: Fapshi Payment API
  description: >-
    API for generating payment links, direct payments, transaction monitoring,
    payouts, and more.
  version: 1.0.0
servers:
  - url: https://sandbox.fapshi.com
security:
  - apiAuth: []
    apiKey: []
paths:
  /search:
    get:
      summary: Search Transactions
      description: Search transactions by various filters.
      parameters:
        - name: status
          in: query
          schema:
            type: string
            enum:
              - created
              - successful
              - failed
              - expired
          description: Filter by transaction status.
        - name: medium
          in: query
          schema:
            type: string
            enum:
              - mobile money
              - orange money
          description: Filter by payment medium.
        - name: start
          in: query
          schema:
            type: string
            format: date
          description: Start date (YYYY-MM-DD).
        - name: end
          in: query
          schema:
            type: string
            format: date
          description: End date (YYYY-MM-DD).
        - name: amt
          in: query
          schema:
            type: integer
          description: Exact amount to filter.
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
          description: Maximum number of results.
        - name: sort
          in: query
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
          description: Sort order.
      responses:
        '200':
          description: Filtered list of transactions
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Transaction'
        4XX:
          description: Invalid query parameters or error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Transaction:
      type: object
      properties:
        transId:
          type: string
          description: Transaction ID of the payment.
        status:
          type: string
          enum:
            - CREATED
            - PENDING
            - SUCCESSFUL
            - FAILED
            - EXPIRED
          description: Transaction status
        medium:
          type: string
          enum:
            - mobile money
            - orange money
            - fapshi
          description: Payment method
        serviceName:
          type: string
          description: Name of the service in use
        transType:
          type: string
          enum:
            - Collection
            - Payout
          description: Type of transaction
        amount:
          type: integer
          description: Transaction amount
        revenue:
          type: integer
          description: Amount received when Fapshi fees have been deducted
        payerName:
          type: string
          description: Client name
        email:
          type: string
          format: email
          description: Client email
        redirectUrl:
          type: string
          format: uri
          description: URL to redirect after payment
        externalId:
          type: string
          description: The transaction ID on your application
        userId:
          type: string
          description: ID of the client on your application
        webhook:
          type: string
          format: uri
          description: The webhook you defined for your service
        reason:
          type: string
          description: Typically appears when a payout via fapshi fails
        financialTransId:
          type: string
          description: Transaction ID with the payment operator
        dateInitiated:
          type: string
          format: date
          description: Date when the payment was initiated
        dateConfirmed:
          type: string
          format: date
          description: Date when the payment was made
    Error:
      type: object
      properties:
        message:
          type: string
          description: Error message.
  securitySchemes:
    apiAuth:
      type: apiKey
      in: header
      name: apiuser
    apiKey:
      type: apiKey
      in: header
      name: apikey

````