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

# 签约

## 预签约（网页版，只对应部分渠道）

<Note>
  请从浏览器发起调用，返回 h5 网页
</Note>

**请求地址**: `https://xlink.91xft.cn/transaction/unify/charge/ui/prepare/sign`

**请求参数**

| 字段                 | 是否必选 | 字段类型   | 字段说明         |
| ------------------ | ---- | ------ | ------------ |
| `app_id`           | 是    | String | app\_id      |
| `merchant_code`    | 是    | String | 商户号          |
| `store_code`       | 否    | String | 门店编号         |
| `out_agreement_no` | 是    | String | 外部签约号        |
| `notify_url`       | 否    | String | 特定签约渠道为必填    |
| `channel`          | 是    | String | 签约渠道         |
| `product`          | 是    | String | 签约产品         |
| `extra`            | 否    | String | 预签约 extra 参数 |
| `sign_type`        | 是    | String | 签名类型         |
| `sign`             | 是    | String | 签名值          |

## 预签约

**请求地址**: `https://xlink.91xft.cn/transaction/unify/charge/prepare/sign`

请求参数同上。

**响应参数**

| 字段                 | 是否必选 | 字段类型   | 字段说明                                            |
| ------------------ | ---- | ------ | ----------------------------------------------- |
| `agreement_state`  | 是    | String | 签约状态 -1:初始化, 0:签约完成, 1:待调用签约接口签约, 2:签约失败, 3:处理中 |
| `verify_type`      | 是    | String | 签约类型, 1:短信验证码, 2:其他                             |
| `agreement_no`     | 否    | String | 签约号                                             |
| `out_agreement_no` | 是    | String | 外部签约号原样返回                                       |
| `failure_code`     | 否    | String | 业务参数 code                                       |
| `failure_msg`      | 否    | String | 业务结果描述                                          |
| `sign_type`        | 是    | String | 签名类型                                            |
| `sign`             | 是    | String | 签名值                                             |

### 预签约 extra 参数说明

**SIGN\_WITHHOLD / XT**

| 字段             | 是否必选 | 字段类型   | 字段说明                                                       |
| -------------- | ---- | ------ | ---------------------------------------------------------- |
| `cust_acct_no` | 是    | String | 银行卡号                                                       |
| `dc_type`      | 是    | String | 借贷类型，0:借记卡 1:贷记卡                                           |
| `cert_type`    | 是    | String | 证件类型 01:身份证 02:军官证 03:护照 04:港澳证 05:台胞证 06:警官证 07:士兵证 99:其它 |
| `cert_no`      | 是    | String | 证件号码                                                       |
| `name`         | 是    | String | 户名                                                         |
| `tel`          | 是    | String | 银行预留手机号                                                    |
| `valid_date`   | 否    | String | 有效期，贷记卡必填                                                  |
| `cvv2`         | 否    | String | cvv2，贷记卡必填                                                 |
| `mer_cust_id`  | 是    | String | 商户客户号                                                      |

**PASS\_FREE / ICBC**

| 字段           | 是否必选 | 字段类型   | 字段说明         |
| ------------ | ---- | ------ | ------------ |
| `msg_id`     | 是    | String | 请求消息标识，请保证唯一 |
| `notify_url` | 是    | String | 签约成功服务端回调地址  |
| `return_url` | 是    | String | 签约成功前端回调地址   |

## 签约

**请求地址**: `https://xlink.91xft.cn/transaction/unify/charge/sign`

**请求参数**: `app_id`, `merchant_code`, `store_code`, `out_agreement_no`/`agreement_no` (二选一), `channel`, `product`, `extra`, `sign_type`, `sign`。

**响应参数**：`agreement_state`, `agreement_no`, `out_agreement_no`, `failure_code`, `failure_msg`, `sign_type`, `sign`。

### 签约 extra 参数说明

**SIGN\_WITHHOLD / XT**：`verify_code` (短信验证码)

## 签约产品属性值

| product 属性值     | 支付产品名称 |
| --------------- | ------ |
| `SIGN_WITHHOLD` | 签约代扣   |

## 签约渠道属性值

| channel 属性值 | 支付渠道名称 |
| ----------- | ------ |
| `XT`        | 信钛     |

## 网页支付接口 extra 参数说明

**AGGREGATION\_OFFICE\_ACCOUNT**

| 字段           | 是否必选 | 字段类型   | 字段说明     |
| ------------ | ---- | ------ | -------- |
| `return_url` | 是    | String | 前端网页跳转地址 |
