商户资料、被授权产品、生效限额
商户自身
接入自检的第一条调用:它同时验证了令牌、scope、IP 白名单三件事。
custody_model 决定了你会不会遇到「会员余额充足却交易失败」:
merchant_hosted 下所有成本先冻结你的预付备付金,预付不足时
会员侧只拿到 service_unavailable,原因只在
GET /v1/merchant/pending 里看得到。
不出参:授信额度、我方付给上游的成本、我方毛利、商户层级路径。
你看到的是「这笔业务扣了你多少」,不是「上游收了我们多少」。
响应
200OK
{
"id": "acme",
"name": "Acme Pay",
"status": "active",
"settlement_currency": "USD",
"custody_model": "merchant_hosted",
"environment": "live"
}403
insufficient_scope 缺 merchant:read ·
ip_not_allowed 出口 IP 不在这把 Key 的白名单里 ·
merchant_disabled 商户不是 active(四档合一个码:
suspended 只挡写、frozen 与 closed 读写全挡,对外不区分)请求
curl -X GET 'https://api.zise.com/v1/merchant' \
-H 'x-auth-token: Bearer $TOKEN'const res = await fetch("https://api.zise.com/v1/merchant", {
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",
headers={
"x-auth-token": "Bearer $TOKEN",
},
)
# 金额用 Decimal(str(...)),不要 float
data = res.json()req, _ := http.NewRequest("GET", "https://api.zise.com/v1/merchant",
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"))
.header("x-auth-token", "Bearer $TOKEN")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
// 金额字段用 String / BigDecimal,不要 double$ch = curl_init('https://api.zise.com/v1/merchant');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'x-auth-token: Bearer $TOKEN',
],
]);
$res = curl_exec($ch);
// 金额用 bcmath / 字符串,不要 floatval
200
{
"id": "acme",
"name": "Acme Pay",
"status": "active",
"settlement_currency": "USD",
"custody_model": "merchant_hosted",
"environment": "live"
}