> ## 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.

# Charge Record Query

> Query historical charge records by merchant batch number for result backfill or reconciliation checks. In the current version, it is no longer used as an asynchronous polling endpoint.

## Overview

This page documents the `GET /transfer/open/institution/v1/pay/charges/detail` endpoint. The full schema, parameters, and examples are rendered from the linked OpenAPI definition above.

## Notes

* Authentication uses the standard GatePay signed headers.
* This dedicated institution endpoint requires `X-GatePay-On-Behalf-Of`, which identifies the initiating account for the queried charge record and can be either an institution account ID or a sub-account ID.
* In the current version, this endpoint is primarily used to query historical charge records, backfill results, or support reconciliation by `merchantBatchNo`. It is no longer positioned as an asynchronous polling 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/institutional-openapi.json GET /transfer/open/institution/v1/pay/charges/detail
openapi: 3.1.0
info:
  title: GatePay Institutional API
  description: >-
    Gate Pay Institution API documentation. Create and manage sub-accounts,
    finance, orders, payout, transfer, and more.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /transfer/open/institution/v1/pay/charges/detail:
    get:
      summary: Charge Record Query
      description: >-
        Query historical charge records by merchant batch number for result
        backfill or reconciliation checks. In the current version, it is no
        longer used as an asynchronous polling endpoint.
      parameters:
        - $ref: '#/components/parameters/X-GatePay-Certificate-ClientId'
        - $ref: '#/components/parameters/X-GatePay-Timestamp'
        - $ref: '#/components/parameters/X-GatePay-Nonce'
        - $ref: '#/components/parameters/X-GatePay-Signature'
        - $ref: '#/components/parameters/X-GatePay-On-Behalf-Of'
        - name: merchantBatchNo
          in: query
          required: true
          description: Unique batch ID from the merchant.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransferDetailResponseWrapper'
              examples:
                success:
                  summary: Success response
                  value:
                    status: SUCCESS
                    code: '000000'
                    errorMessage: ''
                    data:
                      merchantBatchNo: '1234565454511231'
                      status: PAID
                      fromAccountId: '2124267192'
                      toAccountId: '1979044675'
                      currency: USDT
                      amount: '1'
                      createTime: 1763455435851
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      description: >-
        The clientId assigned when the merchant registers an application in the
        Gate merchant console.
      schema:
        type: string
        example: 4186d0c6-6a35-55a9-8dc6-5312769dbff8
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: >-
        UTC timestamp in milliseconds when the request is generated. GatePay
        will not process requests where the difference from the receive time
        exceeds 10 seconds.
      schema:
        type: string
        example: '1672905655498'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: >-
        Random string. Must comply with HTTP header rules; recommended length is
        within 32 characters, composed of digits and letters.
      schema:
        type: string
        example: '9578'
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: >-
        Request signature. GatePay uses this signature to verify whether the
        request is valid.
      schema:
        type: string
    X-GatePay-On-Behalf-Of:
      name: X-GatePay-On-Behalf-Of
      in: header
      required: true
      schema:
        type: string
      description: >-
        Required delegated subject header. Provide the initiating account ID for
        this transaction. It can be an institution account ID or a sub-account
        ID.
  schemas:
    TransferDetailResponseWrapper:
      type: object
      properties:
        status:
          type: string
        code:
          type: string
        errorMessage:
          type: string
        data:
          $ref: '#/components/schemas/TransferDetailResponse'
    TransferDetailResponse:
      type: object
      properties:
        merchantBatchNo:
          type: string
          description: Batch ID; same as request merchantBatchNo.
        status:
          type: string
          description: 'Status: ERROR, EXPIRED, PAID, CANCELLED.'
        toAccountId:
          type: string
          description: Recipient account ID.
        fromAccountId:
          type: string
          description: Payer account ID.
        createTime:
          type: integer
          format: int64
          description: Order creation time, milliseconds.
        currency:
          type: string
          description: Currency.
        amount:
          type: string
          description: Transfer amount.
      description: >-
        Historical record query result for result backfill or reconciliation
        checks.

````