GET
/v1/merchant
商户资料、被授权产品、生效限额
Scope
merchant:read
商户自身
接入自检的第一条调用:它同时验证了令牌、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 'authorization: Bearer $TOKEN' \
-H 'x-zise-merchant: $MERCHANT_ID'
const res = await fetch(
"https://api.zise.com/v1/merchant",
{
method: "GET",
headers: {
"authorization": "Bearer $TOKEN",
"x-zise-merchant": "MERCHANT_ID"
},
},
);
// 金额一律按字符串读,不要 JSON.parse 成 number
const data = await res.json();
import requests
res = requests.get(
"https://api.zise.com/v1/merchant",
headers={
"authorization": "Bearer $TOKEN",
"x-zise-merchant": "$MERCHANT_ID"
},
)
# 金额用 Decimal(str(...)),不要 float
data = res.json()