> ## 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

> Searches for transactions using expanded filters such as transactionId, gatewayTransactionId, bin, authCodes, product and campaign filters.



## OpenAPI

````yaml /api-reference/admin-api/paysight_admin_api.yaml post /api/transactions/search
openapi: 3.0.0
info:
  title: Paysight Admin API
  version: 1.0.0
servers:
  - description: Test Server
    url: https://test.paysight.io
security:
  - ApiKeyAuth: []
paths:
  /api/transactions/search:
    post:
      tags:
        - Transactions
      summary: Advanced transaction search
      description: >-
        Searches for transactions using expanded filters such as transactionId,
        gatewayTransactionId, bin, authCodes, product and campaign filters.
      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
      description: Request body for transaction search with flexible filters
      properties:
        pageNumber:
          type: integer
          description: >-
            The current page number for results. Defaults to 1 when omitted or
            set to 0.
        limit:
          type: integer
          description: >-
            The maximum number of results to return per page. Default is 100.
            Maximum is 5000.
        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
        phoneNumbers:
          type: array
          description: >-
            Filter by one or more customer phone numbers. Each phone number must
            contain at least 6 characters.
          items:
            type: string
        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
        descriptorExactMatch:
          type: string
          description: Exact match search on the descriptor
        mid:
          type: string
          description: Filter by merchant ID (MID)
        sandbox:
          type: boolean
          description: If true, only return sandbox transactions
        shopIds:
          type: array
          items:
            type: integer
            format: int64
          description: Filter by shop IDs
        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
        affiliateIds:
          type: array
          items:
            type: integer
          description: Filter Affiliate (Traffic Source) Ids
        mostRecentFirst:
          type: boolean
          description: If true, results are sorted by most recent transactions first
        statusIds:
          type: array
          items:
            type: integer
          description: Paysight Status Ids
        dateCompleted:
          type: boolean
          description: >-
            If true, timestamp of completion is used for date range filtering
            instead of sent timestamp
        gatewayIds:
          type: array
          items:
            type: integer
          description: Filter by gateway IDs
        paymentNumbers:
          type: array
          items:
            type: integer
          description: Filter by subscription payment numbers
        attempts:
          type: array
          items:
            type: integer
          description: Filter by payment attempt numbers
        cardBrandIds:
          type: array
          items:
            type: integer
          description: Filter by card brand IDs
    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 completed
        completed:
          type: string
          format: date-time
          description: Timestamp when the transaction was completed
        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
          nullable: true
          description: ID of the original transaction if applicable
        application:
          type: string
          description: Application name
        applicationId2:
          type: integer
          description: Alternate application ID
        application2:
          type: string
          description: Alternate application name
        shopId:
          type: integer
          description: Shop ID
        storeName:
          type: string
          description: Name of the store
        storeDomain:
          type: string
          description: Domain of the store
        storeRootDomain:
          type: string
          description: Root domain of the store
        originalApplicationId:
          type: integer
          nullable: true
          description: Original application ID if retried
        originalApplication:
          type: string
          nullable: true
          description: Original application name if retried
        merchantAccountId:
          type: integer
          description: Associated merchant account ID
        midName:
          type: string
          description: Label for the MID
        companyId:
          type: integer
          description: Company ID
        company:
          type: string
          description: Company Name
        parentCompanyId:
          type: integer
          description: Parent company ID
        subId:
          type: integer
          description: Associated subscription ID
        refundSourceId:
          type: integer
          description: ID representing source of refund request
        alertTypeId:
          type: integer
          description: Alert type ID if triggered by alert
        alertSourceId:
          type: integer
          description: Alert source ID
        submitOrderId:
          type: integer
          description: Order ID in the submit flow
        alertSource:
          type: string
          description: Alert source description
        alertType:
          type: string
          description: Alert type description
        refundSource:
          type: string
          description: Refund source name
        binCountry:
          type: string
          description: Country associated with card BIN
        ipCountry:
          type: string
          description: Country inferred from IP address
        campaignId:
          type: integer
          description: Campaign ID
        campaign:
          type: string
          description: Campaign name
        affiliateId:
          type: integer
          description: Affiliate / Traffic Source ID
        affiliate:
          type: string
          description: Affiliate / Traffic Source name
        productId:
          type: integer
          description: Product ID
        product:
          type: string
          description: Product name
        paymentNumber:
          type: integer
          description: >-
            Payment number in subscription series. Also referred to as Billing
            Cycle. A user will only move to a subsequent payment number if the
            previous payment was successful. For example, if a user is on
            payment number 2 and the payment fails, the user will not move to
            payment number 3 until the payment number 2 is successful.
        attempt:
          type: integer
          description: >-
            Number of billing attempts. Attempt 1 = natural attempt, Attempt 2 =
            retry 1, etc.
        containsSalesStrategy:
          type: boolean
          description: Indicates if the eCommerce order contained a sales strategy / upsell
        bin8:
          type: string
          description: >-
            First 8 digits of the credit card. This is currently not fully
            populated for all transactions but will be in the future.
        eci:
          type: string
          description: >-
            For 3DS secured transactions, this is the Electronic Commerce
            Indicator value, which indicates the 3DS status. Otherwise null.
        networkTokenized:
          type: boolean
          description: Indicates if the transaction was network tokenized
        chargebackFee:
          type: number
          description: Fee associated with chargeback if transaction is a chargeback
        cardBrandId:
          type: integer
          description: >-
            Card Brand Identifier. 1=Visa, 2=Mastercard, 3=Discover, 4=Amex,
            5=Chase, 6=JCB
        cardBrand:
          type: string
          description: Card Brand, e.g Visa, Mastercard
        applePay:
          type: boolean
          description: Indicates if the payment method used was Apple Pay
        googlePay:
          type: boolean
          description: Indicates if the payment method used was Google Pay
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your Paysight API key. You can find it in your Paysight account at
        https://app.paysight.io/settings/account

````