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

# Query On-chain Transaction Detail

> Query the transaction details of the address direct payment order on the chain, including the direct payment record within the validity period and the payment record beyond the validity period.

## Overview

This page documents the `GET /v1/pay/address/transactiondetail` endpoint. The full schema, parameters, and examples are rendered from the linked OpenAPI definition above.

Query the transaction details of the address direct payment order on the chain, including the direct payment record within the validity period and the payment record beyond the validity period.

## Notes

* Authentication uses the standard GatePay signed headers.
* This page documents the standard merchant endpoint.
* For shared signing rules, see [/api-reference/version/100/en/common/securityAndSignature](/api-reference/version/100/en/common/securityAndSignature).


## OpenAPI

````yaml /api-reference/version/100/en/openapi/address-payment-openapi.json GET /v1/pay/address/transactiondetail
openapi: 3.1.0
info:
  title: GatePay Address Payment API
  description: GatePay Address Payment APIs for crypto payment via blockchain address.
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /v1/pay/address/transactiondetail:
    get:
      summary: transaction details on chain
      description: >-
        Query the transaction details of the address direct payment order on the
        chain, including the direct payment record within the validity period
        and the payment record beyond the validity period.
      parameters:
        - $ref: '#/components/parameters/X-GatePay-Certificate-ClientId'
        - $ref: '#/components/parameters/X-GatePay-Signature'
        - $ref: '#/components/parameters/X-GatePay-Timestamp'
        - $ref: '#/components/parameters/X-GatePay-Nonce'
        - name: prepayId
          in: query
          required: true
          description: The ID of the Address Payment prepayment order
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionDetailResponse'
              example:
                status: SUCCESS
                code: '000000'
                errorMessage: ''
                data:
                  prepayId: '40100646616043520'
                  merchantId: 10002
                  merchantTradeNo: '9384029384092499'
                  transactionId: '1671522905110477'
                  goodsName: ''
                  currency: BTC
                  orderAmount: '212.999'
                  payCurrency: BTC
                  payAmount: '212.999'
                  status: EXPIRED
                  utcCreateTime: '2022-12-20 07:45:39'
                  utcExpireTime: '2022-12-20 07:55:00'
                  transactTime: 1671522905110
                  order_name: MiniApp-Payment-1#9384029384092499
                  channelId: '123456'
                  transactionDetail:
                    inTerm:
                      done:
                        amount: '100'
                        txList:
                          - chain: BTC
                            address: 12eBREQqZFFDqgDfXkuBdzW2KBwhU8amPn
                            fromAddress: PAzupoupdSYaYoajDcABEUzigBRzewvzN
                            fullCurrType: BTC
                            amount: '100'
                            txId: dosajdajdiojawojdoiwajdojaefhs
                            utcUpdateTime: '2022-12-19 11:50:00'
                      wait:
                        amount: '99'
                        txList:
                          - chain: BTC
                            address: 12eBREQqZFFDqgDfXkuBdzW2KBwhU8amPn
                            fromAddress: PAzupoupdSYaYoajDcABEUzigBRzewvzN
                            fullCurrType: BTC
                            amount: '99'
                            txId: dosajdajdiojawojdoiwajdojaikjs
                            utcUpdateTime: '2022-12-19 11:50:00'
                    outOfTerm:
                      done:
                        amount: '98'
                        txList:
                          - chain: BTC
                            address: 12eBREQqZFFDqgDfXkuBdzW2KBwhU8amPn
                            fromAddress: PAzupoupdSYaYoajDcABEUzigBRzewvzN
                            fullCurrType: BTC
                            amount: '98'
                            txId: dosajdajdoakawojdoiwajdojaikjs
                            utcUpdateTime: '2022-12-19 11:56:00'
                      wait:
                        amount: '193'
                        txList:
                          - chain: BTC
                            address: 12eBREQqZFFDqgDfXkuBdzW2KBwhU8amPn
                            fromAddress: PAzupoupdSYaYoajDcABEUzigBRzewvzN
                            fullCurrType: BTC
                            amount: '97'
                            txId: dosajdajdiojawolakiwajdojaikjs
                            utcUpdateTime: '2022-12-19 11:56:00'
                          - chain: BTC
                            address: 12eBREQqZFFDqgDfXkuBdzW2KBwhU8amPn
                            fromAddress: PAzupoupdSYaYoajDcABEUzigBRzewvzN
                            fullCurrType: BTC
                            amount: '96'
                            txId: dosajdajdiojawolakiwajdppaikjs
                            utcUpdateTime: '2022-12-19 11:56:00'
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      description: Merchant client ID, obtained from GatePay platform
      schema:
        type: string
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: HMAC-SHA256 signature for request validation
      schema:
        type: string
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: >-
        Timestamp in milliseconds, must not differ from server time by more than
        5 minutes
      schema:
        type: string
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: Random nonce for replay attack prevention
      schema:
        type: string
  schemas:
    TransactionDetailResponse:
      type: object
      description: Response to request for querying on-chain transaction details
      properties:
        status:
          type: string
        code:
          type: string
        errorMessage:
          type: string
        data:
          $ref: '#/components/schemas/TransactionDetailData'
    TransactionDetailData:
      type: object
      properties:
        prepayId:
          type: string
          description: Payment ID
        merchantId:
          type: integer
          format: int64
          description: Gate UID used to apply for a merchant account
        merchantTradeNo:
          type: string
          description: Merchant system transaction number
        transactionId:
          type: string
          description: Transaction ID
        goodsName:
          type: string
          description: Name of the goods
        currency:
          type: string
          description: Order currency
        orderAmount:
          type: string
          description: Order amount
        payCurrency:
          type: string
          description: User payment currency
        payAmount:
          type: string
          description: Payment amount for the order
        status:
          type: string
          description: Order status
        utcCreateTime:
          type: string
          description: UTC expression of order creation time
        utcExpireTime:
          type: string
          description: UTC expression of order expiration time
        utcUpdateTime:
          type: string
          description: UTC expression of order status update time
        transactTime:
          type: integer
          format: int64
          description: >-
            UTC millisecond timestamp of transaction completion in the
            background
        order_name:
          type: string
          description: Order name
        channelId:
          type: string
          description: Client Name
        transactionDetail:
          $ref: '#/components/schemas/TransactionDetail'
    TransactionDetail:
      type: object
      properties:
        inTerm:
          $ref: '#/components/schemas/TxDetail'
        outOfTerm:
          $ref: '#/components/schemas/TxDetail'
    TxDetail:
      type: object
      properties:
        done:
          $ref: '#/components/schemas/TxDetailStateItem'
        wait:
          $ref: '#/components/schemas/TxDetailStateItem'
    TxDetailStateItem:
      type: object
      properties:
        amount:
          type: string
          description: Total amount confirmed on chain
        txList:
          type: array
          description: List of payment records
          items:
            $ref: '#/components/schemas/TxItem'
    TxItem:
      type: object
      properties:
        chain:
          type: string
          description: Name of the blockchain.
        address:
          type: string
          description: The address.
        fromAddress:
          type: string
          description: from address
        fullCurrType:
          type: string
          description: The name of the chain including network information.
        amount:
          type: string
          description: The payment amount.
        txId:
          type: string
          description: The transaction ID on the blockchain.
        utcCreateTime:
          type: string
          description: >-
            The UTC timestamp when the payment record was detected on the
            blockchain, for example, 2023-01-07 14:04:02.
        utcUpdateTime:
          type: string
          description: >-
            The UTC timestamp when the payment record status was updated on the
            blockchain, for example, 2023-01-07 14:04:02.

````