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 'authorization: Bearer $TOKEN' \
  -H 'x-zise-merchant: $MERCHANT_ID' \
  -H 'x-on-behalf-of: $MEMBER_ID'
const res = await fetch(
  "https://api.zise.com/v1/cards/{id}/close-check",
  {
    method: "GET",
    headers: {
      "authorization": "Bearer $TOKEN",
      "x-zise-merchant": "MERCHANT_ID",
      "x-on-behalf-of": "MEMBER_ID"
    },
  },
);
// 金额一律按字符串读,不要 JSON.parse 成 number
const data = await res.json();
import requests

res = requests.get(
    "https://api.zise.com/v1/cards/{id}/close-check",
    headers={
        "authorization": "Bearer $TOKEN",
        "x-zise-merchant": "$MERCHANT_ID",
        "x-on-behalf-of": "$MEMBER_ID"
    },
)
# 金额用 Decimal(str(...)),不要 float
data = res.json()