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

# Advanced Transaction Search with Pagination

> Searches for transactions using expanded filters such as transactionId, gatewayTransactionId, bin, authCodes, product and campaign filters. For broad range searches (for pulling large dataset) where only the date range is provided, a maximum of 7 days is allowed, i.e dateFrom must equal dateTo. There is also a rate limit of 40 requests per minute on this endpoint for broad range searches. Transactions that are refunded / chargedback / have associated alerts will not themselves be updated. Instead, there is a new refund / chargeback / alert transaction that can be linked to the original transaction by way of the 'originalTransactionId' field. These transactions are identifiable by their 'applicationId'. 200=Refund 201=Chargeback 202=CB Alert (RDR/Ethoca)



## OpenAPI

````yaml /api-reference/mitigation-api/paysight_mitigation_api.yaml post /api/mitigation/transactions
openapi: 3.0.0
info:
  title: Paysight Mitigation API
  version: 1.0.0
  description: >-
    API for handling mitigation-related customer service operations such as
    search and refund
servers:
  - url: https://test.paysight.io
    description: Test Server
security:
  - ApiKeyAuth: []
paths:
  /api/mitigation/transactions:
    post:
      tags:
        - API for Chargeback Mitigation Providers
      summary: Advanced Transaction Search with Pagination
      description: >-
        Searches for transactions using expanded filters such as transactionId,
        gatewayTransactionId, bin, authCodes, product and campaign filters. For
        broad range searches (for pulling large dataset) where only the date
        range is provided, a maximum of 7 days is allowed, i.e dateFrom must
        equal dateTo. There is also a rate limit of 40 requests per minute on
        this endpoint for broad range searches. Transactions that are refunded /
        chargedback / have associated alerts will not themselves be updated.
        Instead, there is a new refund / chargeback / alert transaction that can
        be linked to the original transaction by way of the
        'originalTransactionId' field. These transactions are identifiable by
        their 'applicationId'. 200=Refund 201=Chargeback 202=CB Alert
        (RDR/Ethoca)
      parameters:
        - $ref: '#/components/parameters/ClientId'
        - $ref: '#/components/parameters/UserEmail'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionsSearchRequest'
      responses:
        '200':
          description: List of matching transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionsSearchResponse'
components:
  parameters:
    ClientId:
      name: ClientId
      in: header
      required: true
      description: >-
        Your Paysight Tenant/Client Id. This is the id of the parent company
        listed in https://app.paysight.io/management/companies. Alternatively,
        this will be provided by Paysight
      schema:
        type: string
    UserEmail:
      name: UserEmail
      in: header
      required: true
      description: The email address of the party or group making the request
      schema:
        type: string
  schemas:
    TransactionsSearchRequest:
      type: object
      required:
        - pageNumber
      description: Pagination filter. Set to 1 by default or omit on initial request.
      properties:
        pageNumber:
          type: integer
          description: The current page number for results
        limit:
          type: integer
          description: >-
            The maxium number of results to return per page. Default is 100.
            Maxiumum is 1000.
        emails:
          type: array
          description: Filter transactions by one or more customer emails
          items:
            type: string
        orderIds:
          type: array
          description: Filter by one or more order IDs
          items:
            type: integer
        transactionIds:
          type: array
          description: Filter by transaction UUIDs
          items:
            type: string
            format: uuid
        gatewayTransactionIds:
          type: array
          description: Gateway-specific transaction identifiers
          items:
            type: string
        bin:
          type: string
          description: Bank Identification Number (first 6 digits)
        last4:
          type: string
          description: Last 4 digits of card
        firstName:
          type: string
          description: Customer first name
        lastName:
          type: string
          description: Customer last name
        authCodes:
          type: array
          description: Authorization codes
          items:
            type: string
        currency:
          type: string
          description: Currency code (e.g., USD)
        dateFrom:
          type: string
          format: date
          description: Start of transaction date range
        dateTo:
          type: string
          format: date
          description: End of transaction date range
        descriptorContains:
          type: string
          description: Substring search on the descriptor
        sandbox:
          type: boolean
          description: If true, only return sandbox transactions
        applicationIds:
          type: array
          items:
            type: integer
          description: Filter by application ID
        productIds:
          type: array
          items:
            type: integer
          description: Filter by product ID
        campaignIds:
          type: array
          items:
            type: integer
          description: Filter by campaign ID
        merchantAccountIds:
          type: array
          items:
            type: integer
          description: Filter by specific merchant account IDs
        companyIds:
          type: array
          items:
            type: integer
          description: Filter by company IDs
        amounts:
          type: array
          items:
            type: number
          description: Filter by specific transaction amounts
        subscriptionIds:
          type: array
          items:
            type: integer
          description: Filter by subscription IDs
        includeUpdated:
          type: boolean
          description: >-
            If true, will also return transactions that were captured during
            that period, even if authorized in a previous period. Note this does
            not affect refunds. A separate transaction will be returned for
            refund with a reference to the original transaction that was
            refunded.
    TransactionsSearchResponse:
      type: object
      description: The response payload for transaction search endpoint
      properties:
        success:
          type: boolean
          description: True if request succeeded
        message:
          type: string
          description: Response message for context
        count:
          type: integer
          description: Total number of records returned
        pageNumber:
          type: integer
          description: The page number of results
        moreResults:
          type: boolean
          description: True if there are more pages of data
        transactions:
          type: array
          description: Array of matching transactions
          items:
            $ref: '#/components/schemas/Transaction'
    Transaction:
      type: object
      description: Full transaction object returned in transaction search
      properties:
        gateway:
          type: string
          description: Gateway provider name (e.g., NMI)
        transactionId:
          type: string
          description: Unique identifier for the transaction
        orderId:
          type: integer
          description: Internal order ID
        sent:
          type: string
          format: date-time
          description: Timestamp when the transaction was sent
        email:
          type: string
          description: Customer email address
        sandbox:
          type: boolean
          description: Indicates if this transaction occurred in sandbox mode
        applicationId:
          type: integer
          description: ID of the application used to process the transaction
        status:
          type: string
          description: Human-readable transaction status
        statusId:
          type: integer
          description: Internal status code
        success:
          type: boolean
          description: Indicates whether the transaction was successfully charged
        completed:
          type: string
          format: date-time
          description: Timestamp when the transaction was completed/updated
        currency:
          type: string
          description: Transaction currency (e.g., USD)
        amount:
          type: number
          description: Transaction amount
        mid:
          type: string
          description: Merchant Identification Number (MID)
        descriptor:
          type: string
          description: Descriptor shown on bank statement
        customerId:
          type: integer
          description: Internal ID of the customer
        authCode:
          type: string
          description: Authorization code for the transaction
        gatewayTransactionId:
          type: string
          description: Identifier assigned by the payment gateway
        firstName:
          type: string
          description: First name of the customer
        lastName:
          type: string
          description: Last name of the customer
        bin:
          type: string
          description: First six digits of the credit card
        last4:
          type: string
          description: Last four digits of the credit card
        refunded:
          type: boolean
          description: Indicates if the transaction has been refunded
        refundable:
          type: boolean
          description: Indicates if the transaction is eligible for refund
        hasAlert:
          type: boolean
          description: Indicates if an alert is associated with this transaction
        chargedBack:
          type: boolean
          description: Indicates if the transaction was charged back
        originalTransactionId:
          type: string
          description: ID of the original transaction to which this transaction relates
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Your Paysight API key

````