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

# 创建子账户结果通知

> 创建子账户成功或失败时，GatePay 会向商户在后台配置的 callback URL 发送异步 POST 通知。

回调数据包含 `bizType`、`bizId`、`bizStatus`、`clientId` 和 `data` 字段，其中 `data` 为子账户创建结果对象的 JSON 字符串。商户需在该地址上接收并解析，并返回 HTTP 200 表示接收成功。

## 概述

本页说明 `webhook institutionAccountNotify`。完整的参数、响应结构与示例由上方关联的 OpenAPI 定义渲染。

创建子账户成功或失败时，GatePay 会向商户在后台配置的回调地址发送通知。商户应在该地址接收并解析消息，并返回 HTTP 200 表示已成功接收。

## 说明

* 建议基于 `bizId` 或 `data.request_id` 做幂等处理。
* 验签、重试、`data` 解析与成功应答见 [通知概览](/global/api-reference/version/100/cn/common/asyncNotification)；签名规则见 [安全与签名](/global/api-reference/version/100/cn/common/securityAndSignature)。

## 触发情形

* 创建子账户申请处理完成（成功或失败）时，GatePay 向商户配置的 **callback URL** 发送通知
* 若通知投递失败，重试规则见 [通知概览](/global/api-reference/version/100/cn/common/asyncNotification)

## 消息结构

| 字段名 | 类型 | 说明 |
| - | - | - |
| `bizType` | `string` | 描述通知类别， INSTITUTION-创建子账户 |
| `bizId` | `string` | 创建申请单号 |
| `bizStatus` | `string` | 业务状态 INSTITUTION\_ACCOUNT\_SUCCESS-创建成功 INSTITUTION\_ACCOUNT\_FAIL-创建失败 |
| `client_id` | `string` | 创建子账户的商户client\_id |
| `data` | string | 消息内容 JSON 字符串 |

## `data` 解析后内容

| 字段名 | 类型 | 说明 |
| - | - | - |
| `request_id` | `string` | 创建申请单号 |
| `account_id` | `string` | 子账户 ID |
| `customer_id` | `string` | 平台侧客户 ID |
| `display_name` | `string` | 展示名 |
| `status` | `string` | 账户状态 已创建-`ACTIVE` 创建失败-`FAIL` |
| `created` | `int64` | 创建时间（毫秒） |

## 回调示例

创建子账户成功通知：

```json theme={null}
{
  "bizType": "INSTITUTION",
  "bizId": "2060249001916727296",
  "bizStatus": "INSTITUTION_ACCOUNT_SUCCESS",
  "clientId": "caoLHPyfvjtnJPJe",
  "data": "{\"request_id\":\"2060249001916727296\",\"account_id\":\"53695180\",\"customer_id\":\"2060249001845424128\",\"display_name\":\"ABC\",\"status\":\"ACTIVE\",\"created\":1780036614339}"
}
```

`data` 解析后内容：

```json theme={null}
{
  "request_id": "2060249001916727296",
  "account_id": "53695180",
  "customer_id": "2060249001845424128",
  "display_name": "ABC",
  "status": "ACTIVE",
  "created": 1780036614339
}
```

### 创建子账户失败通知

```json theme={null}
{
  "bizType": "INSTITUTION",
  "bizId": "2060249001916727297",
  "bizStatus": "INSTITUTION_ACCOUNT_FAIL",
  "clientId": "caoLHPyfvjtnJPJe",
  "data": "{\"request_id\":\"2060249001916727297\",\"account_id\":\"\",\"customer_id\":\"2060249001845424128\",\"display_name\":\"ABC\",\"status\":\"FAIL\",\"created\":1780036614339}"
}
```


## OpenAPI

````yaml global/api-reference/version/100/cn/openapi/institutional-openapi.json webhook institutionAccountNotify
openapi: 3.1.0
info:
  title: GatePay 机构 API
  description: Gate Pay 机构 API 接口文档
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths: {}

````

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