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

# 机构请求头

> 说明机构接口所需请求头，以及 X-GatePay-On-Behalf-Of 的使用规则。

机构 API 包含机构专属接口，以及一套在标准商户路径中加入 `institution` 前缀的机构代理商户 API。签名算法及验签请参见 [安全与签名](/global/api-reference/version/100/cn/common/securityAndSignature)。

## 请求头说明

| Head 字段 | 必填 | 说明 |
| - | - | - |
| X-GatePay-Certificate-ClientId | 是 | 商户在 Gate 商户后台注册应用时分配的 clientId |
| X-GatePay-Timestamp | 是 | 毫秒级时间戳，与服务端时间偏差不得超过30秒 |
| X-GatePay-Nonce | 是 | 随机字符串，建议长度在 32 个字符以内，字符串组成为数字和字母 |
| X-GatePay-Signature | 是 | 请求签名。GatePay 通过此签名来确定此请求是否合法 |
| X-GatePay-On-Behalf-Of | 部分机构接口必填 | 本次请求的发起方账户 ID。机构代理商户 API 通常填写目标子账户 ID；代扣、划转接口可填写机构账户 ID 或子账户 ID；子账户接口和费用设置接口不使用该请求头。 |

## 不需携带 X-GatePay-On-Behalf-Of 的接口

以下接口为**机构主账号维度**操作，请求头中**不传** **X-GatePay-On-Behalf-Of**，仅使用前 4 个公共头即可：

**账户**

* 创建子账户
* 查询子账户
* 分页查询子账户

代扣、划转以及机构代理商户 API 需要在请求头中携带 **X-GatePay-On-Behalf-Of**。其中，机构代理商户 API 通常填写目标子账户 ID；代扣、划转接口可填写本次交易的发起方账户 ID（机构账户或子账户）。子账户接口和费用设置接口不使用该请求头。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.