跳到主要内容

查詢餘額

查詢平台錢包餘額接口。

請求資訊

  • 請求 URL: /gateway/api/v1/platforms/balance
  • 請求方式: GET
  • Content-Type: application/x-www-form-urlencoded; charset=utf-8

請求頭 (Headers)

參數名類型說明
AuthorizationString{authorization} 系統分配給平台之授權識別

請求參數

返回示例

成功返回

{
"error_code": "0000",
"data": {
"platform_id": "PF0060",
"platform_channels": [
{
"platform_channel_id": "PFC00000141",
"channel_name": "钻石代收下发",
"balance": 100200,
"frozen_balance": 0,
"sign": "82df5556b8900e2427343381581fe73e"
},
{
"platform_channel_id": "PFC00000142",
"channel_name": "钻石充值代付",
"balance": 100100,
"frozen_balance": 0,
"sign": "f4912e12897d612d677c36c19d9e05e7"
}
],
"total": 4,
"total_balance": 394300,
"total_frozen_balance": 0,
"request_time": 1596530514,
"sign": "1d8f90a6b3d1ef212fb15ace3d294e9b"
}
}

錯誤返回示例

{
"error_code": "0006",
"error_msg": "无效的Authorization!"
}

返回參數說明

參數名類型說明
error_codeString錯誤碼
error_msgString錯誤訊息(error_code 不為 "0000" 時返回)
platform_idString平台商戶 ID
total_balanceInt總餘額(分)
balanceInt通道餘額(分)

備註

  • authorization 為系統分配給平台之授權識別,如尚未取得請聯繫系統人員
  • 外層簽名由 platform_id, total, total_balance, request_time 構成
  • 內層簽名由 platform_channel_id, channel_name, balance 構成
  • 請參考 簽名規則
  • 餘額單位為人民幣(分)