# Search Transaction

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v0/transactions/search:
    post:
      summary: Search Transaction
      deprecated: false
      description: >-
        :::highlight purple 📌

        Use this API to search and retrieve transaction records associated with
        your merchant account. Supports pagination and sorting to help you
        efficiently query and monitor payment transactions within your
        application.

        :::
      tags:
        - Payment Gateway/APIs - Payment Gateway /Payment
      parameters:
        - name: offset
          in: query
          description: ''
          required: false
          example: '0'
          schema:
            type: string
        - name: limit
          in: query
          description: ''
          required: false
          example: '1000'
          schema:
            type: string
        - name: orderBy
          in: query
          description: ''
          required: false
          example: id
          schema:
            type: string
        - name: direction
          in: query
          description: ''
          required: false
          example: DESC
          schema:
            type: string
        - name: Authorization
          in: header
          description: Token generated with your Access key and secret key
          required: true
          example: Bearer FgRkY5765702145869544866OAXTT
          schema:
            type: string
        - name: merchantAccessKey
          in: header
          description: The access key generated for your account
          required: true
          example: ZJjAg195FnUlR1535
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: >-
                Request object for fetching transaction details using multiple
                filters.
              properties:
                transactionIds:
                  type: array
                  description: >-
                    List of EnKash transaction IDs to fetch specific
                    transactions.
                  items:
                    type: string
                  examples:
                    - - TXN123456
                      - TXN789012
                parentTransactionId:
                  type: string
                  description: >-
                    Parent transaction identifier associated with the
                    transaction.
                  examples:
                    - PTXN123456
                merchantOrderId:
                  type: string
                  description: Merchant's unique order reference ID.
                  examples:
                    - MORD_001
                merchantUniqueId:
                  type: integer
                  description: Unique identifier assigned to the merchant.
                  examples:
                    - 141
                amountFrom:
                  type: number
                  description: Minimum transaction amount for filtering.
                  examples:
                    - 10.5
                amountTo:
                  type: number
                  description: Maximum transaction amount for filtering.
                  examples:
                    - 5000
                status:
                  type: string
                  description: Transaction status filter.
                  examples:
                    - SUCCESS
                settlementStatus:
                  type: string
                  description: Settlement status filter.
                  examples:
                    - SETTLED
                type:
                  type: string
                  description: Transaction type filter.
                  examples:
                    - SALE
                merchantDetailId:
                  type: string
                  description: Unique identifier for merchant configuration (MID).
                  examples:
                    - MD1LU8ZG5RUUUZZA
                bankTransactionId:
                  type: string
                  description: >-
                    Transaction reference ID received from the bank or payment
                    gateway.
                  examples:
                    - BANKTXN987654321
                requestSource:
                  type: string
                  description: Source from which the transaction was initiated.
                  examples:
                    - API
                consentTransaction:
                  type: boolean
                  description: Indicates whether the transaction is consent-based.
                  examples:
                    - true
                paymentMode:
                  type: string
                  description: Payment mode used for the transaction.
                  examples:
                    - UPI
                paymentToken:
                  type: string
                  description: Token associated with the payment transaction.
                  examples:
                    - TOKEN123456789
                productCode:
                  type: string
                  description: Product category associated with the transaction.
                  examples:
                    - DEFAULT
                chargesFrom:
                  type: number
                  description: >-
                    Minimum transaction charges for filtering. Value must be
                    greater than or equal to 0.
                  examples:
                    - 1
                chargesTo:
                  type: number
                  description: >-
                    Maximum transaction charges for filtering. Value must be
                    greater than or equal to 0.
                  examples:
                    - 100
                customerEmail:
                  type: string
                  description: Customer email address associated with the transaction.
                  examples:
                    - customer@example.com
                customerPhone:
                  type: string
                  description: Customer mobile number associated with the transaction.
                  examples:
                    - '9876543210'
                pgCode:
                  type: string
                  description: Payment gateway code used for processing the transaction.
                  examples:
                    - RAZORPAY
                enkashPgCode:
                  type: string
                  description: Internal EnKash payment gateway code.
                  examples:
                    - EK_PG_001
                txnDateFrom:
                  type: string
                  description: >-
                    Start transaction date-time for filtering. Format:
                    yyyy-MM-dd HH:mm:ss (IST).
                  examples:
                    - '2024-01-01 00:00:00'
                txnDateTo:
                  type: string
                  description: >-
                    End transaction date-time for filtering. Format: yyyy-MM-dd
                    HH:mm:ss (IST).
                  examples:
                    - '2024-12-31 23:59:59'
                createdFrom:
                  type: string
                  description: >-
                    Start date-time for filtering based on transaction creation
                    time. Format: yyyy-MM-dd HH:mm:ss (IST).
                  examples:
                    - '2024-01-01 00:00:00'
                createdTo:
                  type: string
                  description: >-
                    End date-time for filtering based on transaction creation
                    time. Format: yyyy-MM-dd HH:mm:ss (IST).
                  examples:
                    - '2024-12-31 23:59:59'
                lastModifiedFrom:
                  type: string
                  description: >-
                    Start date-time for filtering based on last modification
                    time. Format: yyyy-MM-dd HH:mm:ss (IST).
                  examples:
                    - '2024-01-01 00:00:00'
                lastModifiedTo:
                  type: string
                  description: >-
                    End date-time for filtering based on last modification time.
                    Format: yyyy-MM-dd HH:mm:ss (IST).
                  examples:
                    - '2024-12-31 23:59:59'
                productId:
                  type: string
                  description: Internal product identifier.
                  examples:
                    - PG001
              x-apidog-orders:
                - transactionIds
                - parentTransactionId
                - merchantOrderId
                - merchantUniqueId
                - amountFrom
                - amountTo
                - status
                - settlementStatus
                - type
                - merchantDetailId
                - bankTransactionId
                - requestSource
                - consentTransaction
                - paymentMode
                - paymentToken
                - productCode
                - chargesFrom
                - chargesTo
                - customerEmail
                - customerPhone
                - pgCode
                - enkashPgCode
                - txnDateFrom
                - txnDateTo
                - createdFrom
                - createdTo
                - lastModifiedFrom
                - lastModifiedTo
                - productId
              examples:
                - transactionIds:
                    - TXN123456
                  parentTransactionId: PTXN123456
                  merchantOrderId: MORD_001
                  merchantUniqueId: 141
                  amountFrom: 10.5
                  amountTo: 5000
                  status: SUCCESS
                  settlementStatus: SETTLED
                  type: SALE
                  merchantDetailId: MD1LU8ZG5RUUUZZA
                  bankTransactionId: BANKTXN987654321
                  requestSource: API
                  consentTransaction: true
                  paymentMode: UPI
                  paymentToken: TOKEN123456789
                  productCode: DEFAULT
                  chargesFrom: 1
                  chargesTo: 100
                  customerEmail: customer@example.com
                  customerPhone: '9876543210'
                  pgCode: RAZORPAY
                  enkashPgCode: EK_PG_001
                  txnDateFrom: '2024-01-01 00:00:00'
                  txnDateTo: '2024-12-31 23:59:59'
                  createdFrom: '2024-01-01 00:00:00'
                  createdTo: '2024-12-31 23:59:59'
                  lastModifiedFrom: '2024-01-01 00:00:00'
                  lastModifiedTo: '2024-12-31 23:59:59'
                  productId: PG001
            example:
              transactionIds:
                - TXN123456
              parentTransactionId: PTXN123456
              merchantOrderId: MORD_001
              merchantUniqueId: 141
              amountFrom: 10.5
              amountTo: 5000
              status: SUCCESS
              settlementStatus: SETTLED
              type: SALE
              merchantDetailId: MD1LU8ZG5RUUUZZA
              bankTransactionId: BANKTXN987654321
              requestSource: API
              consentTransaction: true
              paymentMode: UPI
              paymentToken: TOKEN123456789
              productCode: DEFAULT
              chargesFrom: 1
              chargesTo: 100
              customerEmail: customer@example.com
              customerPhone: '9876543210'
              pgCode: DEFAULT
              enkashPgCode: CPPA011
              txnDateFrom: '2024-01-01 00:00:00'
              txnDateTo: '2024-12-31 23:59:59'
              createdFrom: '2024-01-01 00:00:00'
              createdTo: '2024-12-31 23:59:59'
              lastModifiedFrom: '2024-01-01 00:00:00'
              lastModifiedTo: '2024-12-31 23:59:59'
              productId: PG001
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  response_code:
                    type: integer
                    description: Application-level status code. 0 indicates success.
                  response_message:
                    type: string
                    description: High-level status description.
                  payload:
                    type: object
                    properties:
                      recordsCount:
                        type: integer
                        description: Total number of records matching the search criteria.
                      data:
                        type: array
                        description: List of transaction records.
                        items:
                          type: object
                          properties:
                            transactionId:
                              type: string
                              description: System-generated unique transaction identifier.
                            created:
                              type: string
                              description: >-
                                Transaction creation timestamp. Format:
                                yyyy-MM-dd HH:mm:ss (IST).
                            merchantOrderId:
                              type: string
                              description: Merchant's unique order reference ID.
                            type:
                              type: string
                              description: Transaction type.
                              enum:
                                - SALE
                                - REFUND
                            finalAmount:
                              type: number
                              description: >-
                                Final amount charged to the customer including
                                applicable charges.
                            surcharge:
                              type: number
                              description: >-
                                Convenience fee or surcharge applied to the
                                transaction.
                            surchargeGst:
                              type: number
                              description: GST applied on the surcharge amount.
                            amount:
                              type: number
                              description: Original transaction amount.
                            currency:
                              type: string
                              description: Transaction currency.
                            status:
                              type: string
                              description: Current transaction status.
                            requestSource:
                              type: string
                              description: Source from which the transaction was initiated.
                            customerInfo:
                              type: object
                              properties:
                                email:
                                  type: string
                                  description: Masked customer email address.
                                phoneNumber:
                                  type: string
                                  description: Masked customer mobile number.
                                authenticatorEnabled:
                                  type: boolean
                                  description: >-
                                    Indicates whether additional customer
                                    authentication was enabled.
                              required:
                                - email
                                - phoneNumber
                                - authenticatorEnabled
                              x-apidog-orders:
                                - email
                                - phoneNumber
                                - authenticatorEnabled
                            paymentDetailBean:
                              type: object
                              description: Payment mode specific details.
                              properties:
                                paymentMode:
                                  type: string
                                  description: Payment mode used for the transaction.
                                cardScheme:
                                  type: string
                                  description: Card scheme used for card transactions.
                                bankName:
                                  type: string
                                  description: Bank associated with the payment instrument.
                                paymentType:
                                  type: string
                                  description: Type of payment instrument used.
                              x-apidog-orders:
                                - paymentMode
                                - cardScheme
                                - bankName
                                - paymentType
                            bankResponse:
                              type: object
                              description: >-
                                Raw response received from the bank or payment
                                gateway.
                              x-apidog-orders: []
                              properties: {}
                            bankCard:
                              type: boolean
                              description: >-
                                Indicates whether the transaction was performed
                                using a bank card.
                            txnDate:
                              type: string
                              description: >-
                                Transaction timestamp. Format: yyyy-MM-dd
                                HH:mm:ss (IST).
                            settlementTransaction:
                              type: object
                              description: Settlement transaction details.
                              x-apidog-orders: []
                              properties: {}
                            settlementPayout:
                              type: object
                              description: Settlement payout details.
                              x-apidog-orders: []
                              properties: {}
                            merchantName:
                              type: string
                              description: Merchant display name.
                            productCode:
                              type: string
                              description: >-
                                Product category associated with the
                                transaction.
                          required:
                            - transactionId
                            - created
                            - merchantOrderId
                            - type
                            - finalAmount
                            - amount
                            - currency
                            - status
                            - customerInfo
                            - paymentDetailBean
                            - bankCard
                            - txnDate
                            - merchantName
                            - productCode
                          x-apidog-orders:
                            - transactionId
                            - created
                            - merchantOrderId
                            - type
                            - finalAmount
                            - surcharge
                            - surchargeGst
                            - amount
                            - currency
                            - status
                            - requestSource
                            - customerInfo
                            - paymentDetailBean
                            - bankResponse
                            - bankCard
                            - txnDate
                            - settlementTransaction
                            - settlementPayout
                            - merchantName
                            - productCode
                    required:
                      - recordsCount
                      - data
                    x-apidog-orders:
                      - recordsCount
                      - data
                required:
                  - response_code
                  - response_message
                  - payload
                x-apidog-orders:
                  - response_code
                  - response_message
                  - payload
              example: |
                ```json
                {
                  "response_code": 0,
                  "response_message": "Success",
                  "payload": {
                    "recordsCount": 22821,
                    "data": [
                      {
                        "transactionId": "EK1780601998352EeNom",
                        "created": "2026-06-05 01:09:58",
                        "merchantOrderId": "260605HXURY3L7P0MOA9253CFM1",
                        "type": "SALE",
                        "finalAmount": 27999,
                        "surcharge": 0,
                        "surchargeGst": 0,
                        "amount": 27999,
                        "currency": "INR",
                        "status": "PENDING_WITH_BANK",
                        "requestSource": "API",
                        "customerInfo": {
                          "email": "adilchXXXXXXXXXXXXl.com",
                          "phoneNumber": "99XXXXXX39",
                          "authenticatorEnabled": false
                        },
                        "paymentDetailBean": {
                          "paymentMode": "CREDIT_CARD",
                          "cardScheme": "VISA",
                          "bankName": "IDFC",
                          "paymentType": "NEW_CARD"
                        },
                        "bankResponse": {},
                        "bankCard": false,
                        "txnDate": "2026-06-05 01:10:00",
                        "settlementTransaction": {},
                        "settlementPayout": {},
                        "merchantName": "VIRTUAL WALLET SYSTEMS PRIVATE LIMITED",
                        "productCode": "DEFAULT"
                      },
                      {
                        "transactionId": "EK1780601887451AbCdE",
                        "created": "2026-06-05 00:55:12",
                        "merchantOrderId": "ORD260605ABC123456",
                        "type": "SALE",
                        "finalAmount": 5000,
                        "surcharge": 0,
                        "surchargeGst": 0,
                        "amount": 5000,
                        "currency": "INR",
                        "status": "SUCCESS",
                        "requestSource": "CHECKOUT",
                        "customerInfo": {
                          "email": "john.doeXXXX@gmail.com",
                          "phoneNumber": "98XXXXXX21",
                          "authenticatorEnabled": true
                        },
                        "paymentDetailBean": {
                          "paymentMode": "UPI",
                          "bankName": "HDFC BANK",
                          "paymentType": "UPI_COLLECT"
                        },
                        "bankResponse": {},
                        "bankCard": false,
                        "txnDate": "2026-06-05 00:55:20",
                        "settlementTransaction": {},
                        "settlementPayout": {},
                        "merchantName": "Priyanka Tech",
                        "productCode": "DEFAULT"
                      },
                      {
                        "transactionId": "EK1780601776123XyZ89",
                        "created": "2026-06-05 00:40:55",
                        "merchantOrderId": "EK23938420i",
                        "type": "SALE",
                        "finalAmount": 1500,
                        "surcharge": 25,
                        "surchargeGst": 4.5,
                        "amount": 1470.5,
                        "currency": "INR",
                        "status": "FAILED",
                        "requestSource": "API",
                        "customerInfo": {
                          "email": "customerXXXX@yahoo.com",
                          "phoneNumber": "73XXXXXX45",
                          "authenticatorEnabled": false
                        },
                        "paymentDetailBean": {
                          "paymentMode": "NET_BANKING",
                          "bankName": "ICICI BANK",
                          "paymentType": "NET_BANKING"
                        },
                        "bankResponse": {},
                        "bankCard": false,
                        "txnDate": "2026-06-05 00:41:03",
                        "settlementTransaction": {},
                        "settlementPayout": {},
                        "merchantName": "Jnana Inventive Private Limited",
                        "productCode": "DEFAULT"
                      },
                      {
                        "transactionId": "EK1780601665987LmNoP",
                        "created": "2026-06-05 00:25:41",
                        "merchantOrderId": "RENT260605001",
                        "type": "SALE",
                        "finalAmount": 18000,
                        "surcharge": 0,
                        "surchargeGst": 0,
                        "amount": 18000,
                        "currency": "INR",
                        "status": "SUCCESS",
                        "requestSource": "SDK",
                        "customerInfo": {
                          "email": "tenantXXXX@gmail.com",
                          "phoneNumber": "88XXXXXX67",
                          "authenticatorEnabled": false
                        },
                        "paymentDetailBean": {
                          "paymentMode": "DEBIT_CARD",
                          "cardScheme": "RUPAY",
                          "bankName": "SBI",
                          "paymentType": "SAVED_CARD"
                        },
                        "bankResponse": {},
                        "bankCard": true,
                        "txnDate": "2026-06-05 00:25:50",
                        "settlementTransaction": {},
                        "settlementPayout": {},
                        "merchantName": "ABC Realty Services",
                        "productCode": "RENTAL"
                      },
                      {
                        "transactionId": "EK1780601554123QwErT",
                        "created": "2026-06-05 00:10:15",
                        "merchantOrderId": "GST260605009",
                        "type": "REFUND",
                        "finalAmount": 250,
                        "surcharge": 0,
                        "surchargeGst": 0,
                        "amount": 250,
                        "currency": "INR",
                        "status": "SUCCESS",
                        "requestSource": "API",
                        "customerInfo": {
                          "email": "businessXXXX@company.com",
                          "phoneNumber": "77XXXXXX89",
                          "authenticatorEnabled": false
                        },
                        "paymentDetailBean": {
                          "paymentMode": "WALLET",
                          "bankName": "PAYTM",
                          "paymentType": "WALLET"
                        },
                        "bankResponse": {},
                        "bankCard": false,
                        "txnDate": "2026-06-05 00:10:25",
                        "settlementTransaction": {},
                        "settlementPayout": {},
                        "merchantName": "XYZ Enterprises",
                        "productCode": "GST"
                      }
                    ]
                  }
                }
                ```
          headers: {}
          x-apidog-name: Success
      security: []
      x-apidog-folder: Payment Gateway/APIs - Payment Gateway /Payment
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-23491291-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
