> ## 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 Transaction Fee

> Query the detailed fee breakdown for a specific order by merchant order ID. Error codes: 550139 - Order bill not found; 550140 - No payment record found; 550141 - Fees are being calculated, please try again later.

## Overview

This page documents the `GET /api/open/v1/pay/order/fee/query` endpoint. The full schema, parameters, and examples are rendered from the linked OpenAPI definition above.

## 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/common-openapi.json GET /api/open/v1/pay/order/fee/query
openapi: 3.1.0
info:
  title: GatePay Common API
  description: GatePay Common APIs - Balance and Fee queries
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /api/open/v1/pay/order/fee/query:
    get:
      summary: Retrieve detailed fee information for an order
      description: >-
        Query the detailed fee breakdown for a specific order by merchant order
        ID. Error codes: 550139 - Order bill not found; 550140 - No payment
        record found; 550141 - Fees are being calculated, please try again
        later.
      operationId: feeQuery
      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: merchantTradeNo
          in: query
          required: true
          description: Merchant order ID
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeeQueryResponse'
              examples:
                successResponse:
                  summary: Success Response
                  value:
                    code: '000000'
                    data:
                      merchantTradeNo: M8017074206
                      orderCurrency: USDC
                      orderAmount: '110.33'
                      payAmount: '110.33'
                      totalFeeAmount: '5.11'
                      totalSettleAmount: '105.22'
                      payDetails:
                        - transactionId: '35717875766394895'
                          payType: GatePay
                          payTime: '1762858225978'
                          payAmount: '0.11'
                          payCurrency: USDC
                          feeAmount: '0.11'
                          settleAmount: '0'
                    status: SUCCESS
                    errorMessage: ''
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      description: Merchant client ID
      schema:
        type: string
        example: 4186d0c6-6a35-55a9-8dc6-5312769dbff8
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: Signature
      schema:
        type: string
        example: 672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: Timestamp (milliseconds)
      schema:
        type: string
        example: '1672905655498'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: Nonce
      schema:
        type: string
        example: '9578'
  schemas:
    FeeQueryResponse:
      type: object
      properties:
        status:
          type: string
          description: SUCCESS or FAIL
          enum:
            - SUCCESS
            - FAIL
        code:
          type: string
          description: Error code
        errorMessage:
          type: string
          description: Error message
        data:
          $ref: '#/components/schemas/FeeQueryData'
    FeeQueryData:
      type: object
      properties:
        merchantTradeNo:
          type: string
          description: Merchant order ID
        orderCurrency:
          type: string
          description: Order currency
        orderAmount:
          type: string
          description: Order amount
        payAmount:
          type: string
          description: Total amount paid
        totalFeeAmount:
          type: string
          description: Total transaction fees collected
        totalSettleAmount:
          type: string
          description: Total amount settled
        payDetails:
          type: array
          items:
            $ref: '#/components/schemas/PayDetail'
          description: Payment breakdown per transaction
    PayDetail:
      type: object
      properties:
        transactionId:
          type: string
          description: Payment ID
        payType:
          type: string
          description: Payment type
        payTime:
          type: string
          description: Payment time
        payAmount:
          type: string
          description: Payment amount
        payCurrency:
          type: string
          description: Payment currency
        feeAmount:
          type: string
          description: Transaction fee
        settleAmount:
          type: string
          description: Settlement amount

````