Revoke instruction
curl --request POST \
--url https://uat-api.clinkbill.com/agent/platform/authorizations/{instructionId}/revoke \
--header 'Authorization: Bearer <token>'HttpResponse<String> response = Unirest.post("https://uat-api.clinkbill.com/agent/platform/authorizations/{instructionId}/revoke")
.header("Authorization", "Bearer <token>")
.asString();import requests
url = "https://uat-api.clinkbill.com/agent/platform/authorizations/{instructionId}/revoke"
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/authorizations/{instructionId}/revoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 200,
"msg": "Success",
"data": {
"instruction_id": "inst_...",
"status": "CANCELLED",
"revoked_at": "2026-11-23T06:00:00Z"
}
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}Authorizations
撤销指令
Revokes a purchase instruction by setting its Clink status to CANCELLED. No request is sent to the card network: an instruction that already exists on the network (for example Visa VIC or Mastercard Agent Pay) stays usable there until it expires or its limit is exhausted. Requires portal:write. Pass the instruction ID (inst_...), not a payment credential ID.
POST
/
agent
/
platform
/
authorizations
/
{instructionId}
/
revoke
Revoke instruction
curl --request POST \
--url https://uat-api.clinkbill.com/agent/platform/authorizations/{instructionId}/revoke \
--header 'Authorization: Bearer <token>'HttpResponse<String> response = Unirest.post("https://uat-api.clinkbill.com/agent/platform/authorizations/{instructionId}/revoke")
.header("Authorization", "Bearer <token>")
.asString();import requests
url = "https://uat-api.clinkbill.com/agent/platform/authorizations/{instructionId}/revoke"
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/authorizations/{instructionId}/revoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 200,
"msg": "Success",
"data": {
"instruction_id": "inst_...",
"status": "CANCELLED",
"revoked_at": "2026-11-23T06:00:00Z"
}
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}撤销一条购买指令,使其不能再用于领取凭证或发起支付。参数是指令 ID(
返回
inst_...),不是支付凭证 ID;为某条指令签发的凭证内部包含该指令 ID。
revoke 改了什么
revoke 只改 Clink 侧状态:ACTIVE、CREATED、PENDING的指令变为CANCELLED,并记录revoked_at。- 指令不能再被尚未使用的激活链接激活,Clink 也不再接受针对它的新扣款。
- 不会向卡组织发送撤销请求。 已经存在于 Visa、Mastercard 等卡组织侧的指令(例如 Visa VIC、Mastercard Agent Pay)在卡组织侧仍然有效,直到过期或额度用尽。不要把 revoke 当作释放卡组织侧额度的手段;要停止卡组织侧使用,请让指令自然过期,或在卡组织侧另行撤销。
幂等与终态
| 当前状态 | 结果 | 响应 |
|---|---|---|
ACTIVE、CREATED、PENDING | 变为 CANCELLED | 200,status = CANCELLED |
CANCELLED | 不变;revoked_at 保留原撤销时间 | 200,status = CANCELLED |
COMPLETED、EXPIRED、DECLINED | 不变 | 200,status = 当前终态 |
INPROGRESS | 拒绝:有支付在途 | 409,code 71211028(portal_invalid_state) |
200 不代表一定是刚撤销成功:请读取响应里的 status。重复调用是安全的,不会重复产生取消事件。
错误
401— portal token 缺失、过期或无效。403— token 缺少portal:write。404— 指令不存在或不属于该 token 的客户。409—portal_invalid_state:该指令有支付在途,或调用期间状态持续变化;稍后重试。