Z Zise Developers

补卡进度与补卡报价(互斥的两块)

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

两件事一起给,而且互斥:有在途补卡单时给进度(replacement),没有时给报价(quote)。分成两个端点的话,你得先问一次才知道该问哪一个。

replacementnull = 没有在途补卡单(不是缺字段)。status 有八档,认不出的原样回显,别 default 成「处理中」。is_security: true 的(卡号泄露 / 被盗刷)流程上会先冻结原卡。

quotecard_balanceheld 必须一起显示:补卡会把卡内余额退回可用余额,而上游没有卡间转账接口 ——钱不会跟着到新卡。这两个数是「我卡里的钱去哪了」那一段的全部依据,少一个用户就会误解。

replace_fee = 开卡费。不另立一档价(补卡要重新支付卡费)。

⚠ 虚拟卡的 quote 恒为 null —— 只有实体卡有补卡,虚拟卡丢了直接销卡重开。

路径参数

字段类型必填说明
id string 必填
字段类型必填说明
x-on-behalf-of string 必填

响应

200OK
{
  "replacement": null,
  "quote": {
    "replace_fee": "20000000",
    "fee_asset": "USD",
    "card_balance": "35.20",
    "held": "0.00"
  }
}
404not_found 卡不存在,或不在这个会员/这个商户名下
请求
curl -X GET 'https://api.zise.com/v1/cards/{id}/replacement' \
  -H 'x-auth-token: Bearer $TOKEN' \
  -H 'x-on-behalf-of: $MEMBER_ID'
const res = await fetch("https://api.zise.com/v1/cards/{id}/replacement", {
  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}/replacement",
    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}/replacement",
    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}/replacement"))
    .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}/replacement');
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
{
  "replacement": null,
  "quote": {
    "replace_fee": "20000000",
    "fee_asset": "USD",
    "card_balance": "35.20",
    "held": "0.00"
  }
}