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

# List internal transactions

> Lists every internal transaction recorded for your tenant, which is the route to reconcile your own ledger against this one. Filter with `user_id`, `reward_id`, `redemption_id`, `onchain_asset_id`, `type`, `status`, `blockchain_transaction_id`, `transaction_hash`, `chain_id`, `created_from` and `created_to`, and page with `page` and `limit`. The response `data` carries `items` alongside `total_count`, `page`, `limit`, `total_pages` and `has_next_page`.



## OpenAPI

````yaml /openapi/kintra-gateway.json get /gateway/internal-transactions
openapi: 3.0.0
info:
  description: >-
    Server-to-server API for the Kintra loyalty platform. Requests are
    authenticated with a tenant API key and a request signature; the tenant
    comes from the key.
  title: Kintra Gateway API
  version: 1.0.0
servers:
  - description: Production environment
    url: https://api.kintra.io/api/v1
security: []
paths:
  /gateway/internal-transactions:
    get:
      tags:
        - Internal transactions
      summary: List internal transactions
      description: >-
        Lists every internal transaction recorded for your tenant, which is the
        route to reconcile your own ledger against this one. Filter with
        `user_id`, `reward_id`, `redemption_id`, `onchain_asset_id`, `type`,
        `status`, `blockchain_transaction_id`, `transaction_hash`, `chain_id`,
        `created_from` and `created_to`, and page with `page` and `limit`. The
        response `data` carries `items` alongside `total_count`, `page`,
        `limit`, `total_pages` and `has_next_page`.
      operationId: ListInternalTransactions
      parameters:
        - in: query
          name: user_id
          required: false
          schema:
            type: string
        - in: query
          name: reward_id
          required: false
          schema:
            type: string
        - in: query
          name: redemption_id
          required: false
          schema:
            type: string
        - in: query
          name: onchain_asset_id
          required: false
          schema:
            type: string
        - in: query
          name: type
          required: false
          schema:
            $ref: '#/components/schemas/InternalTransactionType'
        - in: query
          name: status
          required: false
          schema:
            $ref: '#/components/schemas/InternalTransactionStatus'
        - in: query
          name: blockchain_transaction_id
          required: false
          schema:
            type: string
        - in: query
          name: transaction_hash
          required: false
          schema:
            type: string
        - in: query
          name: chain_id
          required: false
          schema:
            format: double
            type: number
        - in: query
          name: created_from
          required: false
          schema:
            type: string
        - in: query
          name: created_to
          required: false
          schema:
            type: string
        - in: query
          name: page
          required: false
          schema:
            default: 1
            format: double
            type: number
        - in: query
          name: limit
          required: false
          schema:
            default: 10
            format: double
            type: number
        - description: >-
            Hex HMAC-SHA256 of the timestamp, the uppercase method, the url as
            sent and the request body, keyed by the signing secret.
          in: header
          name: X-Tenant-Signature
          required: true
          schema:
            type: string
        - description: Unix seconds. Checked before the signature.
          in: header
          name: X-Tenant-Timestamp
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ApiResponse_IPaginationResponse_IInternalTransactionResponse__
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Tenant not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Internal server error
      security:
        - tenant_api_key: []
      x-codeSamples:
        - label: cURL
          lang: bash
          source: >
            # Export KINTRA_API for your environment first; the base URL is on
            the introduction page.

            KEY="YOUR_TENANT_KEY_ID"

            SECRET="YOUR_SIGNING_SECRET"


            # The signature covers the path and query exactly as sent, so both
            are split

            # off the base URL and reused for the request line below.

            API_PATH="/${KINTRA_API#*://*/}"

            API_HOST="${KINTRA_API%"$API_PATH"}"

            METHOD="GET"

            PATH_AND_QUERY="$API_PATH/gateway/internal-transactions"


            # No body on this method, so the signature covers an empty body
            string.

            BODY=''


            TIMESTAMP="$(date +%s)"

            SIGNATURE="$(printf '%s' "$TIMESTAMP$METHOD$PATH_AND_QUERY$BODY" \
              | openssl dgst -sha256 -hmac "$SECRET" | awk '{print $NF}')"

            curl -sS -w '\n%{http_code}' -X "$METHOD" "$API_HOST$PATH_AND_QUERY"
            \
              -H "X-Tenant-Key: $KEY" \
              -H "X-Tenant-Timestamp: $TIMESTAMP" \
              -H "X-Tenant-Signature: $SIGNATURE"
        - label: TypeScript
          lang: typescript
          source: >
            import { createHmac } from 'node:crypto'


            // Export KINTRA_API for your environment first; the base URL is on
            the introduction page.

            const { origin, pathname } = new URL(process.env.KINTRA_API ?? '')

            const key = 'YOUR_TENANT_KEY_ID'

            const secret = 'YOUR_SIGNING_SECRET'


            const method = 'GET'

            // The signature covers the path and query as sent, starting at the
            API prefix.

            const pathAndQuery = `${pathname}/gateway/internal-transactions`


            // No body on this method, so the signature covers an empty body
            string.

            const body = ''


            const timestamp = Math.floor(Date.now() / 1000).toString()

            const signature = createHmac('sha256',
            secret).update(`${timestamp}${method}${pathAndQuery}${body}`).digest('hex')


            const response = await fetch(`${origin}${pathAndQuery}`, {
              method,
              headers: {
                'X-Tenant-Key': key,
                'X-Tenant-Timestamp': timestamp,
                'X-Tenant-Signature': signature
              }
            })


            console.log(response.status, await response.json())
components:
  schemas:
    InternalTransactionType:
      description: '`core.internal_transactions.type`'
      enum:
        - xp_earn
        - xp_bonus
        - xp_admin_adjust
        - xp_redeem
      type: string
    InternalTransactionStatus:
      description: '`core.internal_transactions.status`'
      enum:
        - initialized
        - pending
        - completed
        - failed
      type: string
    ApiResponse_IPaginationResponse_IInternalTransactionResponse__:
      additionalProperties: false
      properties:
        data:
          $ref: >-
            #/components/schemas/IPaginationResponse_IInternalTransactionResponse_
        errors:
          items:
            properties:
              message:
                type: string
              path:
                type: string
            required:
              - path
              - message
            type: object
          type: array
        message:
          type: string
        success:
          type: boolean
      required:
        - success
      type: object
    ApiResponse_null_:
      additionalProperties: false
      properties:
        data:
          enum:
            - null
          nullable: true
          type: number
        errors:
          items:
            properties:
              message:
                type: string
              path:
                type: string
            required:
              - path
              - message
            type: object
          type: array
        message:
          type: string
        success:
          type: boolean
      required:
        - success
      type: object
    IPaginationResponse_IInternalTransactionResponse_:
      additionalProperties: false
      properties:
        has_next_page:
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/IInternalTransactionResponse'
          type: array
        limit:
          format: double
          type: number
        page:
          format: double
          type: number
        total_count:
          format: double
          type: number
        total_pages:
          format: double
          type: number
      required:
        - total_count
        - page
        - limit
        - has_next_page
        - total_pages
        - items
      type: object
    IInternalTransactionResponse:
      additionalProperties: false
      properties:
        amount:
          nullable: true
          type: string
        blockchain_transaction_links:
          nullable: true
          properties:
            blockchain_transaction:
              items:
                $ref: '#/components/schemas/IBlockchainTransactionResponse'
              nullable: true
              type: array
          type: object
        created_at:
          format: date-time
          nullable: true
          type: string
        id:
          type: string
        metadata:
          nullable: true
        notes:
          nullable: true
          type: string
        onchain_asset:
          allOf:
            - $ref: '#/components/schemas/IOnchainAssetResponse'
          nullable: true
        onchain_asset_id:
          nullable: true
          type: string
        redemption_id:
          nullable: true
          type: string
        reward:
          description: >-
            Reward summary (id, title) for redeem transactions, joined via the
            linked redemption. Null for non-redeem rows.
          nullable: true
          properties:
            id:
              type: string
            title:
              type: string
          required:
            - title
            - id
          type: object
        status:
          anyOf:
            - $ref: '#/components/schemas/InternalTransactionStatus'
            - type: string
        tenant:
          allOf:
            - $ref: '#/components/schemas/ITenantBriefDto'
          description: Present when admin joins tenant brief.
          nullable: true
        tenant_id:
          nullable: true
          type: string
        type:
          anyOf:
            - $ref: '#/components/schemas/InternalTransactionType'
            - type: string
        updated_at:
          format: date-time
          nullable: true
          type: string
        user:
          allOf:
            - $ref: '#/components/schemas/IUserBriefDto'
          description: Present when admin joins user brief (id, username, email).
          nullable: true
        user_id:
          nullable: true
          type: string
      required:
        - id
        - tenant_id
        - user_id
        - onchain_asset_id
        - redemption_id
        - type
        - amount
        - metadata
        - notes
        - status
        - created_at
        - updated_at
      type: object
    IBlockchainTransactionResponse:
      additionalProperties: false
      properties:
        chain_id:
          format: double
          nullable: true
          type: number
        created_at:
          format: date-time
          nullable: true
          type: string
        id:
          type: string
        metadata:
          nullable: true
        receipt_block_hash:
          nullable: true
          type: string
        receipt_block_number:
          nullable: true
          type: string
        receipt_block_timestamp:
          format: double
          nullable: true
          type: number
        receipt_gas_price:
          nullable: true
          type: string
        receipt_gas_used:
          nullable: true
          type: string
        receipt_status:
          format: double
          nullable: true
          type: number
        receipt_transaction_index:
          format: double
          nullable: true
          type: number
        tx_data:
          nullable: true
          type: string
        tx_from:
          nullable: true
          type: string
        tx_gas_limit:
          nullable: true
          type: string
        tx_gas_price:
          nullable: true
          type: string
        tx_hash:
          nullable: true
          type: string
        tx_max_fee_per_gas:
          nullable: true
          type: string
        tx_max_priority_fee_per_gas:
          nullable: true
          type: string
        tx_nonce:
          format: double
          nullable: true
          type: number
        tx_to:
          nullable: true
          type: string
        tx_type:
          format: double
          nullable: true
          type: number
        tx_value:
          nullable: true
          type: string
        txn_status:
          anyOf:
            - $ref: '#/components/schemas/BlockchainTransactionStatus'
            - type: string
          nullable: true
        updated_at:
          format: date-time
          nullable: true
          type: string
      required:
        - id
      type: object
    IOnchainAssetResponse:
      additionalProperties: false
      properties:
        asset_address:
          type: string
        chain_id:
          format: double
          type: number
        created_at:
          format: date-time
          nullable: true
          type: string
        decimals:
          format: double
          nullable: true
          type: number
        deploy_tx_hash:
          nullable: true
          type: string
        deployed_at:
          format: date-time
          nullable: true
          type: string
        id:
          type: string
        key:
          nullable: true
          type: string
        metadata:
          nullable: true
        name:
          nullable: true
          type: string
        status:
          type: string
        symbol:
          nullable: true
          type: string
        total_owners:
          format: double
          nullable: true
          type: number
        total_txns:
          format: double
          nullable: true
          type: number
        type:
          type: string
        updated_at:
          format: date-time
          nullable: true
          type: string
      type: object
    ITenantBriefDto:
      additionalProperties: false
      description: Minimal tenant label for nested list/detail payloads (id, name, slug).
      properties:
        id:
          type: string
        name:
          type: string
        slug:
          type: string
      required:
        - id
        - name
        - slug
      type: object
    IUserBriefDto:
      additionalProperties: false
      description: Minimal user label for nested redemption-style payloads.
      properties:
        email:
          type: string
        id:
          type: string
        username:
          type: string
      required:
        - id
        - username
        - email
      type: object
    BlockchainTransactionStatus:
      enum:
        - initialized
        - submitted
        - pending
        - succeeded
        - failed
        - replaced
        - canceled
      type: string
  securitySchemes:
    tenant_api_key:
      description: Tenant API key
      in: header
      name: x-tenant-key
      type: apiKey

````