Query transaction history

POST /payment/query-transaction

Search and filter transaction history with various criteria. Supports pagination and multiple filter options.

application/json

Body Required

  • data object Required

    The actual request data to be processed

    Hide data attributes Show data attributes object
    • accountIds array[string]

      Filter by account IDs

    • status string

      Filter by transaction status

      Values are pending, processing, completed, failed, or cancelled.

    • type string

      Filter by transaction type

      Values are credit, debit, transfer, or refund.

    • currency string

      Filter by currency

    • dateFrom string(date)

      Start date for search

    • dateTo string(date)

      End date for search

    • minAmount number

      Minimum amount filter

    • maxAmount number

      Maximum amount filter

    • reference string

      Search by reference text

    • page integer

      Page number for pagination

      Minimum value is 1. Default value is 1.

    • limit integer

      Number of results per page

      Minimum value is 1, maximum value is 100. Default value is 20.

  • signature string Required

    ed25519 signature of the data, signed with user's private key

  • publicKey string Required

    User's derived public key for signature verification

  • timestamp integer Required

    Unix timestamp when the request was created (milliseconds)

  • nonce string Required

    Unique nonce to prevent replay attacks

Responses

  • 200 application/json

    Transaction query completed successfully

    Hide response attributes Show response attributes object
    • success boolean
    • transactions array[object]
      Hide transactions attributes Show transactions attributes object
      • id string

        Unique transaction identifier

      • type string

        Transaction type

        Values are credit, debit, transfer, or refund.

      • status string

        Transaction status

        Values are pending, processing, completed, failed, or cancelled.

      • amount number

        Transaction amount

      • currency string

        Transaction currency

      • sourceAccountId string

        Source account ID (for transfers/debits)

      • targetAccountId string

        Target account ID (for transfers/credits)

      • reference string

        Transaction reference

      • description string

        Transaction description

      • createdAt string(date-time)

        When transaction was created

      • completedAt string(date-time)

        When transaction was completed

      • failureReason string

        Reason for failure (if applicable)

    • pagination object
      Hide pagination attributes Show pagination attributes object
      • page integer

        Current page number

      • limit integer

        Results per page

      • totalPages integer

        Total number of pages

      • hasNext boolean

        Whether there are more pages

      • hasPrev boolean

        Whether there are previous pages

    • totalCount integer

      Total number of matching transactions

  • 400

    Invalid query parameters

  • 401

    Authentication failed

  • 429

    Rate limit exceeded

  • 500

    Internal server error

POST /payment/query-transaction
curl \
 --request POST 'https://pay-api-dev.aiic.nz/v1/payment/query-transaction' \
 --header "X-Public-Key: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"data":{"accountIds":["acc_123","acc_456"],"status":"pending","type":"credit","currency":"NZD","dateFrom":"2025-05-04","dateTo":"2025-05-04","minAmount":42.0,"maxAmount":42.0,"reference":"string","page":1,"limit":20},"signature":"base64-encoded-signature","publicKey":"base64-encoded-public-key","timestamp":1703123456789,"nonce":"abc123-def456-ghi789"}'
Request examples
{
  "data": {
    "accountIds": [
      "acc_123",
      "acc_456"
    ],
    "status": "pending",
    "type": "credit",
    "currency": "NZD",
    "dateFrom": "2025-05-04",
    "dateTo": "2025-05-04",
    "minAmount": 42.0,
    "maxAmount": 42.0,
    "reference": "string",
    "page": 1,
    "limit": 20
  },
  "signature": "base64-encoded-signature",
  "publicKey": "base64-encoded-public-key",
  "timestamp": 1703123456789,
  "nonce": "abc123-def456-ghi789"
}
Response examples (200)
{
  "success": true,
  "transactions": [
    {
      "id": "txn_abc123",
      "type": "credit",
      "status": "pending",
      "amount": 1000,
      "currency": "NZD",
      "sourceAccountId": "acc_123",
      "targetAccountId": "acc_456",
      "reference": "Payment for services",
      "description": "string",
      "createdAt": "2025-05-04T09:42:00Z",
      "completedAt": "2025-05-04T09:42:00Z",
      "failureReason": "string"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "totalPages": 8,
    "hasNext": true,
    "hasPrev": false
  },
  "totalCount": 150
}