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

# Get transaction details

> Get transaction details by `id`, `foreign_id`, or `txid`. Include only one of these parameters in your request.

<Note>
  You can only request data for transactions that were authorized using your API and secret key.
</Note>


## OpenAPI

````yaml GET /transactions/info
openapi: 3.0.0
info:
  title: Merchant Backend V2
  version: '1.0'
  description: Documentation for merchant backend processing endpoints
servers:
  - url: https://app.cryptoprocessing.com/api/v2
security:
  - xProcessingKey: []
tags:
  - name: Status
  - name: Balance
  - name: Currencies
  - name: Deposit addresses
  - name: Withdrawal
  - name: Exchange
  - name: Invoices
  - name: Transactions
paths:
  /transactions/info:
    get:
      tags:
        - Transactions
      summary: Fetch transaction metadata
      description: >-
        Get transaction details by `id`, `foreign_id`, or `txid`. Include only
        one of these parameters in your request.
      parameters:
        - $ref: '#/components/parameters/XProcessingSignatureHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - title: By internal ID
                  type: object
                  additionalProperties: false
                  properties:
                    id:
                      type: integer
                      description: Internal transaction ID.
                      example: 717535
                  required:
                    - id
                - title: By foreign ID
                  type: object
                  additionalProperties: false
                  properties:
                    foreign_id:
                      type: string
                      description: >-
                        The transaction's unique identifier in your system. You
                        can only find withdrawal transactions by their
                        foreign_id. For deposits, search by id.
                      example: withdrawal_order_123
                  required:
                    - foreign_id
                - title: By txid
                  type: object
                  additionalProperties: false
                  description: Transaction hash.
                  properties:
                    txid:
                      type: string
                      example: >-
                        3950ad8149421a850d01dff88f024810e363ac18c9e8dd9bc0b9116e7937ad93
                  required:
                    - txid
            examples:
              foreign_id:
                value:
                  foreign_id: test_foreign_id_0250
              txid:
                value:
                  txid: >-
                    3950ad8149421a850d01dff88f024810e363ac18c9e8dd9bc0b9116e7937ad93
              id:
                value:
                  id: 134702831
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    format: int32
                    minimum: 1
                    example: 717535
                  foreign_id:
                    type: string
                    description: This transaction's unique identifier in your system.
                  end_user_reference:
                    type: string
                    description: >-
                      End user reference. Present only when KYC data was
                      provided.
                  type:
                    type: string
                    description: Transaction type.
                  crypto_address:
                    type: object
                    description: >-
                      Address details. Present only when entry has an associated
                      address.
                    required:
                      - id
                      - currency
                      - address
                      - tag
                    properties:
                      id:
                        type: integer
                        minimum: 1
                        format: int32
                        example: 176
                      currency:
                        type: string
                        description: Currency ISO code.
                        example: BTC
                      convert_to:
                        type: string
                        description: >-
                          Conversion target currency. Present only when address
                          has conversion logic.
                        example: EUR
                      address:
                        type: string
                        example: tb1qqepjlefdvrtyu6teqndww7v86hkz269z0ewj5q
                        minLength: 1
                      tag:
                        type: string
                        nullable: true
                      foreign_id:
                        type: string
                  currency_sent:
                    type: object
                    description: >-
                      Sent currency details. Present for confirmed, verifying,
                      or processing transactions.
                    required:
                      - currency
                      - amount
                    properties:
                      currency:
                        type: string
                        description: Currency ISO code.
                      amount:
                        type: string
                        description: Amount sent.
                  currency_received:
                    type: object
                    description: >-
                      Received currency details. Present for confirmed,
                      verifying, or processing transactions.
                    required:
                      - currency
                      - amount
                    properties:
                      currency:
                        type: string
                        description: Currency ISO code.
                      amount:
                        type: string
                        description: Amount received.
                      amount_minus_fee:
                        type: string
                        description: >-
                          Amount received minus fees. Present only for deposit
                          transactions.
                  transactions:
                    type: array
                    description: >
                      Transaction entries. Each entry has a `transaction_type`
                      that determines which fields are present:

                      - `blockchain`: On-chain transactions (has address, tag,
                      txid, riskscore, confirmations)

                      - `internal`: Internal transfers (has address, tag, txid,
                      confirmations)

                      - `exchange`: Currency exchanges (has currency_to,
                      amount_to)
                    items:
                      type: object
                      required:
                        - id
                        - currency
                        - transaction_type
                        - type
                        - amount
                      properties:
                        id:
                          type: integer
                        currency:
                          type: string
                          description: Currency ISO code.
                        currency_to:
                          type: string
                          description: >-
                            Destination currency. Present only for `exchange`
                            entries.
                        transaction_type:
                          type: string
                          enum:
                            - blockchain
                            - internal
                            - exchange
                        type:
                          type: string
                          description: Entry type (e.g., deposit, withdrawal).
                        address:
                          type: string
                          description: >-
                            Cryptocurrency address. Present for `blockchain` and
                            `internal` entries.
                        tag:
                          type: string
                          nullable: true
                          description: >-
                            Destination tag. Present for `blockchain` and
                            `internal` entries.
                        amount:
                          type: string
                          description: Transaction amount.
                        amount_to:
                          type: string
                          description: >-
                            Amount in destination currency. Present only for
                            `exchange` entries.
                        txid:
                          type: string
                          nullable: true
                        riskscore:
                          type: string
                          nullable: true
                          description: >-
                            Risk score (0-100). Present only for `blockchain`
                            entries when risk scoring is enabled.
                        confirmations:
                          type: string
                          description: >-
                            Number of blockchain confirmations. Present for
                            `blockchain` and `internal` entries.
                  fees:
                    type: array
                    uniqueItems: true
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          description: >-
                            Fee type identifier (e.g., `mining`,
                            `fee_crypto_withdrawal`, etc.).
                        currency:
                          type: string
                          description: Fee currency ISO code.
                        amount:
                          type: string
                          description: >-
                            Fee amount. Returns '0' when system pays network
                            fees.
                      required:
                        - type
                        - currency
                        - amount
                  error:
                    type: string
                    nullable: true
                    description: >-
                      Error message. Null or empty string for successful
                      transactions.
                  status:
                    type: string
                    description: >
                      Transaction status. Note: internal statuses are mapped
                      before returning:

                      - `processing` and `verifying` are returned as
                      `not_confirmed`

                      - `error` is returned as `cancelled`

                      - `rejected` is returned as `cancelled`
                    enum:
                      - cancelled
                      - confirmed
                      - declined
                      - not_confirmed
                      - pending
                  additional_details:
                    type: object
                    nullable: true
                    description: >-
                      Additional transaction details. Present only when
                      available.
                required:
                  - id
                  - type
                  - transactions
                  - fees
                  - status
              examples:
                Deposit:
                  value:
                    id: 1
                    end_user_reference: '12345'
                    type: deposit
                    crypto_address:
                      id: 1
                      currency: BTC
                      address: 39mFf3X46YzUtfdwVQpYXPCMydc74ccbAZ
                      foreign_id: '12345'
                      tag: null
                    currency_sent:
                      currency: BTC
                      amount: '6.53157512'
                    currency_received:
                      currency: BTC
                      amount: '6.53157512'
                      amount_minus_fee: '6.5119800'
                    transactions:
                      - id: 1
                        currency: BTC
                        transaction_type: blockchain
                        type: deposit
                        address: 39mFf3X46YzUtfdwVQpYXPCMydc74ccbAZ
                        tag: null
                        amount: '6.53157512'
                        txid: >-
                          3950ad8149421a850d01dff88f024810e363ac18c9e8dd9bc0b9116e7937ad93
                        riskscore: '0.5'
                        confirmations: '3'
                    fees:
                      - type: deposit
                        currency: BTC
                        amount: '0.01959472'
                    error: ''
                    status: confirmed
                Withdrawal:
                  value:
                    id: 1
                    foreign_id: '1'
                    end_user_reference: '12345'
                    type: withdrawal
                    crypto_address:
                      id: 1
                      currency: BTC
                      address: 115Mn1jCjBh1CNqug7yAB21Hq2rw8PfmTA
                      tag: null
                    currency_sent:
                      currency: BTC
                      amount: '0.02000000'
                    currency_received:
                      currency: BTC
                      amount: '0.02000000'
                    transactions:
                      - id: 1
                        currency: BTC
                        transaction_type: blockchain
                        type: withdrawal
                        address: 115Mn1jCjBh1CNqug7yAB21Hq2rw8PfmTA
                        tag: null
                        amount: '0.02'
                        txid: >-
                          bb040d895ef7141ea0b06b04227d8f5dd4ee12d5b890e6e5633f6439393a666b
                        confirmations: '3'
                    fees:
                      - type: mining
                        currency: BTC
                        amount: '0.00007402'
                      - type: withdrawal
                        currency: BTC
                        amount: '0.00002000'
                    error: ''
                    status: confirmed
                Exchange:
                  value:
                    id: 134782394
                    type: exchange
                    currency_sent:
                      currency: BTC
                      amount: '0.00010000'
                    currency_received:
                      currency: ETH
                      amount: '0.00326418'
                    transactions:
                      - id: 9628634
                        currency: BTC
                        currency_to: ETH
                        transaction_type: exchange
                        type: exchange
                        amount: '0.00010000'
                        amount_to: '0.00326418'
                    fees:
                      - type: fee_crypto_exchange_to_crypto
                        currency: BTC
                        amount: '0.00000200'
                    error: ''
                    status: confirmed
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationOrMalformedJson'
              examples:
                Missing all params:
                  value:
                    errors:
                      id: >-
                        The id field is required when none of foreign id / txid
                        are present.
                      foreign_id: >-
                        The foreign id field is required when none of id / txid
                        are present.
                      txid: >-
                        The txid field is required when none of id / foreign id
                        are present.
                Invalid id:
                  value:
                    errors:
                      id: The id must be an integer.
                      txid: >-
                        The txid field is required when none of id / foreign id
                        are present.
                Malformed JSON:
                  summary: Invalid JSON body
                  value:
                    error: Bad content format
                    code: bad_content_format
        '403':
          $ref: '#/components/responses/HeaderAuthorization'
        '404':
          description: Transaction not found
          content:
            application/json:
              schema:
                type: object
                required:
                  - errors
                properties:
                  errors:
                    type: array
                    items:
                      type: string
              examples:
                Not found:
                  value:
                    errors:
                      - No transaction found.
components:
  parameters:
    XProcessingSignatureHeader:
      name: X-Processing-Signature
      in: header
      required: true
      description: >-
        Hex-encoded HMAC-SHA512 signature of the request body, [generated using
        your secret key](/api-reference/authentication).
      schema:
        type: string
  schemas:
    ValidationOrMalformedJson:
      oneOf:
        - type: object
          title: ValidationError
          description: One or more request parameters failed validation.
          properties:
            errors:
              type: object
              additionalProperties:
                type: string
        - type: object
          title: MalformedJson
          description: >-
            The request body is not valid JSON or the Content-Type header is not
            set to `application/json`.
          properties:
            error:
              type: string
            code:
              type: string
  responses:
    HeaderAuthorization:
      description: |
        Forbidden
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                description: Human-readable error message.
              code:
                type: string
                description: Error code.
            description: >-
              Invalid or missing headers. Refer to
              [Errors](/api-reference/errors#403) for troubleshooting steps.
          examples:
            Bad signature header:
              value:
                error: Bad signature header
                code: bad_header_signature
            No signature header:
              value:
                error: No signature header
                code: required_header_signature
            Bad key header:
              value:
                error: Bad key header
                code: bad_header_key
            No key header:
              value:
                error: No key header
                code: required_header_key
  securitySchemes:
    xProcessingKey:
      type: apiKey
      description: Your [API key](/integration-guide/get-your-api-key).
      in: header
      name: X-Processing-Key

````