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

# 锁卡与解锁

> 锁定或解锁 JCB 卡。

## 接口列表

| 名称 | 方法     | 路径                                        |
| -- | ------ | ----------------------------------------- |
| 锁卡 | `POST` | `/mc-platformapi/v1/open/jcb/card/lock`   |
| 解锁 | `POST` | `/mc-platformapi/v1/open/jcb/card/unlock` |

所有接口均使用 `application/json`，并在 `Authorization` Header 中传入完整 JSON 请求体的 `SHA256withRSA` + `BASE64` 签名值。

## 请求参数

| 字段          | 类型        | 必填 | 说明                |
| ----------- | --------- | -- | ----------------- |
| `app_id`    | `string`  | 是  | 应用 ID，在商户平台生成     |
| `timestamp` | `integer` | 是  | Unix 秒级时间戳，参与请求验签 |
| `card_no`   | `string`  | 是  | JCB 卡号            |

## 锁卡请求示例

```json theme={null}
{
  "app_id": "app_123456",
  "timestamp": 1784880000,
  "card_no": "356999******1234"
}
```

## 锁卡返回示例

```json theme={null}
{
  "code": 0,
  "msg": "success",
  "data": ""
}
```

## 解锁请求示例

```json theme={null}
{
  "app_id": "app_123456",
  "timestamp": 1784880000,
  "card_no": "356999******1234"
}
```

## 解锁返回示例

```json theme={null}
{
  "code": 0,
  "msg": "success",
  "data": ""
}
```

## 字段规则

* 锁卡时卡片必须属于当前商户，且当前状态为可用。
* 解锁时卡片必须属于当前商户，且当前状态为锁定。
* 被平台管理锁定的卡片不能通过商户解锁接口恢复。
* 成功时 `data` 为空字符串。
