Z Zise Developers

销卡预检(必须先清空卡内资金

GET /v1/cards/{id}/close-check scope: cards:read
代会员调用 · 必带 x-on-behalf-of

销卡不可逆,且卡内余额非 0 一律拒。跳过这一步的话,上游「自动退回」

的钱回的是我方账户,而会员的卡内资金还挂着一个正数 —— 只能人工平账。

所以正确的顺序永远是:close-check → 余额非 0 就先

POST /v1/cards/{id}/withdrawals → 等它到账 → 再 close

can_close: false 有两种,必须分开渲染

pending_withdraw: true = 「已经在转出了,等着」;

pending_withdraw: false 且余额非 0 = 「还没转,去转」。

合成一句话的后果是用户点完转出回到这一屏,看到的界面**与他根本没点过

一模一样**,于是他合理地认为流程断了。

这个端点的字段名是驼峰canClose / pendingWithdraw),

与全站其余端点的蛇形命名不一致 —— 这是我方的历史遗留,按驼峰解析。

路径参数

字段类型必填说明
id string 必填 卡 id
字段类型必填说明
x-on-behalf-of string 必填 代哪个会员调用

响应

200四个金额都是最小单位整数串,按同一份响应里的 scale 换算。 held = 已授权未结算的合计(balance − withdrawable)—— 这部分还会真的扣款,等结算完才能转出。
{
  "balance": "12840000",
  "held": "0",
  "withdrawable": "12840000",
  "canClose": false,
  "pendingWithdraw": false,
  "scale": 6,
  "currency": "USD"
}
404not_found 卡不存在或不在这个会员名下
请求
curl -X GET 'https://api.zise.com/v1/cards/{id}/close-check' \
  -H 'x-auth-token: Bearer $TOKEN' \
  -H 'x-on-behalf-of: $MEMBER_ID'
const res = await fetch("https://api.zise.com/v1/cards/{id}/close-check", {
  method: "GET",
  headers: {
    "x-auth-token": "Bearer $TOKEN",
    "x-on-behalf-of": "$MEMBER_ID",
  },
});
// 金额按字符串读,别让它变成 number
const data = await res.json();
import requests

res = requests.get(
    "https://api.zise.com/v1/cards/{id}/close-check",
    headers={
        "x-auth-token": "Bearer $TOKEN",
        "x-on-behalf-of": "$MEMBER_ID",
    },
)
# 金额用 Decimal(str(...)),不要 float
data = res.json()
req, _ := http.NewRequest("GET", "https://api.zise.com/v1/cards/{id}/close-check",
    nil)
req.Header.Set("x-auth-token", "Bearer $TOKEN")
req.Header.Set("x-on-behalf-of", "$MEMBER_ID")
res, err := http.DefaultClient.Do(req)
// 金额字段用 string 接,不要 float64
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://api.zise.com/v1/cards/{id}/close-check"))
    .header("x-auth-token", "Bearer $TOKEN")
    .header("x-on-behalf-of", "$MEMBER_ID")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
// 金额字段用 String / BigDecimal,不要 double
$ch = curl_init('https://api.zise.com/v1/cards/{id}/close-check');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'x-auth-token: Bearer $TOKEN',
    'x-on-behalf-of: $MEMBER_ID',
  ],
]);
$res = curl_exec($ch);
// 金额用 bcmath / 字符串,不要 floatval
200
{
  "balance": "12840000",
  "held": "0",
  "withdrawable": "12840000",
  "canClose": false,
  "pendingWithdraw": false,
  "scale": 6,
  "currency": "USD"
}