Create a Vault session
curl --request POST \
--url https://uat-api.clinkbill.com/agent/platform/vault-sessions \
--header 'Authorization: Bearer <token>'HttpResponse<String> response = Unirest.post("https://uat-api.clinkbill.com/agent/platform/vault-sessions")
.header("Authorization", "Bearer <token>")
.asString();import requests
url = "https://uat-api.clinkbill.com/agent/platform/vault-sessions"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://uat-api.clinkbill.com/agent/platform/vault-sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 200,
"msg": "Success",
"data": {
"vault_id": "vs_...",
"url": "https://agent.clinkbill.dev/vault/vs_...",
"expires_at": "2026-11-09T10:30:00Z"
}
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}Payment Methods
创建 Vault 会话
Creates a short-lived Vault (hosted card-binding) session for the token’s customer and returns its vault_id, the hosted page url, and the expiry. Requires portal:write.
POST
/
agent
/
platform
/
vault-sessions
Create a Vault session
curl --request POST \
--url https://uat-api.clinkbill.com/agent/platform/vault-sessions \
--header 'Authorization: Bearer <token>'HttpResponse<String> response = Unirest.post("https://uat-api.clinkbill.com/agent/platform/vault-sessions")
.header("Authorization", "Bearer <token>")
.asString();import requests
url = "https://uat-api.clinkbill.com/agent/platform/vault-sessions"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://uat-api.clinkbill.com/agent/platform/vault-sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 200,
"msg": "Success",
"data": {
"vault_id": "vs_...",
"url": "https://agent.clinkbill.dev/vault/vs_...",
"expires_at": "2026-11-09T10:30:00Z"
}
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}它和绑定银行卡是同一个托管绑卡流程,只是以
用
如果不想直接打开链接,可以用
兑换接口返回 Vault 页面会话
vault_id 契约提供给平台设置页,便于统一卡管理:创建会话 → 打开托管页面 → 重新读取卡列表。每次调用都会创建新的独立会话;不会创建购买授权,也不会创建指令。
POST /agent/platform/vault-sessions 与既有的绑定银行卡 POST /agent/platform/bind-sessions 创建的是同一个 Vault 绑定会话,只是响应字段名不同(这里是 vault_id,那里是 session_id)。新接入请使用 vault-sessions;bind-sessions 保留给既有接入,两者都不废弃。
请求中没有用于指定其他用户的 body 字段。会话始终为该 token 对应用户创建。
把
vault_id 和 url 当作凭证处理。不要转发、截图或写入日志;拿到其中任意一个的人可以在会话有效期内为该用户完成绑卡。只把它们发给目标用户。用 vault_id 换取页面登录态
如果不想直接打开链接,可以用 vault_id 在既有兑换接口换取 Vault 页面登录态后再打开托管页面:
POST {API_BASE_URL}/a/cwallet/vault/session/exchange
Content-Type: application/json
{
"session_id": "vs_..."
}
token 及其 expire_in;该 token 只用于托管页面。会话有效期沿用 Clink 的 Vault 会话配置,过期后请重新创建会话。Vault 会话是绑卡会话,不是购买授权,不能用于向该用户扣款。