Check transaction status

POST /payment/check-transaction-state

Get the current status of a specific transaction. Returns detailed status information and any error details.

application/json

Body Required

  • data object Required

    The actual request data to be processed

    Hide data attribute Show data attribute object
    • transactionId string Required

      ID of the transaction to check

  • 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 status retrieved successfully

    Hide response attributes Show response attributes object
    • success boolean
    • transaction object
      Hide transaction attributes Show transaction 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)

  • 400

    Invalid transaction ID

  • 401

    Authentication failed

  • 404

    Transaction not found

  • 429

    Rate limit exceeded

  • 500

    Internal server error

POST /payment/check-transaction-state
curl \
 --request POST 'https://pay-api-dev.aiic.nz/v1/payment/check-transaction-state' \
 --header "X-Public-Key: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"data":{"transactionId":"txn_abc123"},"signature":"base64-encoded-signature","publicKey":"base64-encoded-public-key","timestamp":1703123456789,"nonce":"abc123-def456-ghi789"}'
Request examples
{
  "data": {
    "transactionId": "txn_abc123"
  },
  "signature": "base64-encoded-signature",
  "publicKey": "base64-encoded-public-key",
  "timestamp": 1703123456789,
  "nonce": "abc123-def456-ghi789"
}
Response examples (200)
{
  "success": true,
  "transaction": {
    "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"
  }
}