本商户开通了哪几条业务线(含低水位自动停售状态)
商户自身
enabled 与 halted 分开出参,不要合成一位:
halted 是低水位自动停售,它会因为你充值预付而自动解除;
enabled = false 是这条线没给你开通,只能联系客户经理。
把两者当成同一件事的 SDK 会在一次「充值就能恢复」的暂停上
走进「这条线被关了」的分支。
下单入口该看的那个值是两位取严:enabled && !halted。
恒定返回全部八条线,包括你没开通的那几条 —— 由你按自己的托管
模型裁剪。少一行与「这条线不可用」在客户端上同形,所以我方不裁。
不含批发价与上游成本 —— 那两段是商业条款,见商户后台的定价页。
响应
200OK
{
"data": [
{
"line": "qrpay",
"enabled": true,
"halted": false,
"self_pricing": false
},
{
"line": "remit",
"enabled": true,
"halted": true,
"self_pricing": false
},
{
"line": "card",
"enabled": false,
"halted": false,
"self_pricing": false
}
],
"next_cursor": null,
"has_more": false
}403
insufficient_scope 缺 merchant:read请求
curl -X GET 'https://api.zise.com/v1/merchant/lines' \
-H 'x-auth-token: Bearer $TOKEN'const res = await fetch("https://api.zise.com/v1/merchant/lines", {
method: "GET",
headers: {
"x-auth-token": "Bearer $TOKEN",
},
});
// 金额按字符串读,别让它变成 number
const data = await res.json();import requests
res = requests.get(
"https://api.zise.com/v1/merchant/lines",
headers={
"x-auth-token": "Bearer $TOKEN",
},
)
# 金额用 Decimal(str(...)),不要 float
data = res.json()req, _ := http.NewRequest("GET", "https://api.zise.com/v1/merchant/lines",
nil)
req.Header.Set("x-auth-token", "Bearer $TOKEN")
res, err := http.DefaultClient.Do(req)
// 金额字段用 string 接,不要 float64HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://api.zise.com/v1/merchant/lines"))
.header("x-auth-token", "Bearer $TOKEN")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
// 金额字段用 String / BigDecimal,不要 double$ch = curl_init('https://api.zise.com/v1/merchant/lines');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'x-auth-token: Bearer $TOKEN',
],
]);
$res = curl_exec($ch);
// 金额用 bcmath / 字符串,不要 floatval
200
{
"data": [
{
"line": "qrpay",
"enabled": true,
"halted": false,
"self_pricing": false
},
{
"line": "remit",
"enabled": true,
"halted": true,
"self_pricing": false
},
{
"line": "card",
"enabled": false,
"halted": false,
"self_pricing": false
}
],
"next_cursor": null,
"has_more": false
}