跳转到主要内容
POST
Report credential result
Clink 用该回报闭环订单和指令 usage。回报只记录商户页面显示的结果,不会执行或验证支付。
该接口是支付结果确认入口。它是确认或回报交易结果的唯一入口,Clink 不提供独立的“确认交易”接口。请在下方说明的 24 小时回报窗口内,通过该接口回报最终结果(包括在 UNKNOWN 回报之后补报最终结果)。

回报规则

  • Clink 在 report_deadline 之前接受最终结果,即凭证签发后 24 小时。超过窗口的回报返回 410,code 为 71211018(report_window_expired)。
  • usage 不存在或不属于 token 对应用户时返回 404。
  • Clink 按两类比较最终结果:SUCCEEDED 属于成功类;FAILED 和 NOT_SUBMITTED 都属于失败类。同一类内重复回报会以 HTTP 200 返回已记录的结果;例如已记录 NOT_SUBMITTED 后再回报 FAILED 不冲突。已记录终态后回报另一类结果返回 409,code 为 71211017(result_already_reported)。
  • SUCCEEDED、FAILED 和 NOT_SUBMITTED 会闭环 usage,并进入 Clink 既有的支付结果处理链路。
  • UNKNOWN 不记录终态、不发布结果消息,返回 PENDING;请在 report_deadline 之前回报最终结果。
  • paid_amount 和 currency_code 必须成对出现。paid_amount 与授权金额不一致时,Clink 记录 paid_amount_mismatch: true,不覆盖授权金额。

授权

Authorization
string
header
必填

Portal user token from POST /agent/cwallet/platform/portal/tokens. Reads require portal:read; writes require portal:write.

请求体

application/json
client_reference_id
string
必填

Value used when requesting the credential. Clink finds the usage by this value for the token's customer.

示例:

"platform-ref-001"

outcome
enum<string>
必填

SUCCEEDED: the merchant explicitly confirmed that the payment succeeded. FAILED: the merchant explicitly showed failure after the card was submitted. NOT_SUBMITTED: the card was never submitted. UNKNOWN: the card was submitted, but the result cannot be determined; Clink returns PENDING with report_deadline.

可用选项:
SUCCEEDED,
FAILED,
NOT_SUBMITTED,
UNKNOWN
示例:

"SUCCEEDED"

paid_amount
string

Amount shown by the merchant, decimal string in major currency units. Must be paired with currency_code.

示例:

"12.50"

currency_code
string

Three-letter currency code. Must be paired with paid_amount.

示例:

"USD"

failure_reason
enum<string>

Reason for a failed or unsubmitted payment. Accepted only with FAILED or NOT_SUBMITTED.

可用选项:
CARD_DECLINED,
AUTHENTICATION_REQUIRED,
AMOUNT_CHANGED,
CREDENTIAL_EXPIRED,
CREDENTIAL_LOST,
MERCHANT_ERROR,
BUYER_CANCELLED,
OTHER

响应

Success

code
integer<int32>

200 on success.

示例:

200

msg
string

Result message.

示例:

"Success"

data
object