/app/settlement/details (v2)

查询单笔结算记录及其资金来源

接口描述

根据 settlement_id 查询单笔结算记录(汇款、入金、出金等),并返回该笔资金的来源。


请求参数(Query Parameters)

参数名类型必填描述
settlement_idstring是结算记录的唯一标识ID(UUID)
uidstring是您平台上用户的唯一标识

返回字段说明

字段名类型描述
settlement_idstring结算记录的唯一标识ID(UUID)
uidstring您平台上用户的唯一标识
referencestring该笔结算对应的您的业务单号,创建时传入
categorystring结算类别,如 CREDIT_CARD_RECEIVED、WIRE_RECEIVED、CRYPTO_SENT
settlement_statusstring结算状态:created、pending、in progress、settled、canceled、rejected、on hold
settledstring"YES" 表示已结算
settled_timestring实际结算完成时间(ISO 8601 格式,UTC 时区,含微秒)
asset_receivedstring收到的资产币种(如 EUR)
amount_receivedstring收到的资产数量,保留两位小数的字符串
asset_pay_tostring支付的资产币种(如 USDC)
amount_pay_tostring支付的资产数量,保留两位小数的字符串
fee_assetstring手续费扣取的币种
fee_amountstring手续费金额
networkstring区块链网络,链上结算时返回;否则为 null
txidstring区块链交易哈希;法币或内部转账为 null
trade_idstring该笔结算所属的交易标识
created_atstring记录创建时间(ISO 8601 格式,UTC 时区)
updated_atstring记录最后更新时间(ISO 8601 格式,UTC 时区)
funding_sourcestring资金来源:card 或 balance
funding_source_detailsobject卡片识别信息;funding_source 非 card 时为 null

funding_source

该字段用于区分刷卡支付与其他所有方式,不再细分为更小的类别:

取值含义
card资金从银行卡入账,包含 Apple Pay 和 Google Pay
balance资金来自用户自己的钱,即平台余额,或已入账的银行转账(电汇、ACH)

funding_source_details

当 funding_source 为 card 时返回。仅包含卡片展示规则允许的范围——卡号前 6 位、后 4 位和卡组织。不返回完整卡号、有效期和持卡人姓名。

字段名类型描述
payment_method_idstring该笔结算使用的支付方式标识
first6string卡号前 6 位(BIN);Apple Pay / Google Pay 为 null
last4string卡号后 4 位;Apple Pay / Google Pay 为 null
brandstring卡组织:visa、mastercard,其他为 other
walletstring使用数字钱包时为 apple_pay 或 google_pay;实体卡为 null
deletedboolean用户已删除该卡片时为 true。卡片信息仍会照常返回

Apple Pay / Google Pay:数字钱包本质是卡片的令牌化形式,因此返回 funding_source: "card" 且 wallet 有值。由于不存储卡号信息,first6、last4 均返回 null。


已删除的卡片:用户删除卡片后,仍会返回其信息,并将 deleted 置为 true,便于您对账删卡之前产生的结算。


成功返回示例

{
  "request_id": "39d91bb6b20584dce2c7877bd71fcf71",
  "status": "success",
  "code": "100000",
  "message": "success",
  "data": [
    {
      "settlement_id": "4f798048-5d5c-43ff-83db-a9dcaf0c6b10",
      "uid": "1115496066",
      "reference": "partner123456",
      "category": "CREDIT_CARD_RECEIVED",
      "settlement_status": "settled",
      "settled": "YES",
      "settled_time": "2026-10-12T23:35:35.123456Z",
      "asset_received": "EUR",
      "amount_received": "500.00",
      "asset_pay_to": "USDC",
      "amount_pay_to": "543.74",
      "fee_asset": "EUR",
      "fee_amount": "15.00",
      "network": null,
      "txid": null,
      "trade_id": "xxxxxxxx",
      "created_at": "2026-10-12T23:30:11.000000Z",
      "updated_at": "2026-10-12T23:35:35.000000Z",
      "funding_source": "card",
      "funding_source_details": {
        "payment_method_id": "xxxxxxxx",
        "first6": "411111",
        "last4": "1234",
        "brand": "visa",
        "wallet": null,
        "deleted": false
      }
    }
  ],
  "metadata": {}
}

错误处理

状态码含义
404该结算不存在,或不属于您的平台。两种情况返回完全一致,因此无法通过本接口探测哪些 settlement_id 存在
422缺少必填参数或参数格式错误

注意:这是 v2 接口。旧接口 /app/settlementhistory 仅列出结算记录,不包含 funding_source;如需了解某笔结算的资金来源,请使用本接口。

Query Params
string
required

Unique identifier of the settlement record

string
required

Unique user uid

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json