錢包資訊(進階介面API)

使用 帳戶權限金鑰 唯讀查詢目前個人帳戶的錢包資金明細、歷史消耗彙總、推廣返佣統計、模型專屬折扣以及儲值與帳變歷史紀錄。

[!IMPORTANT]

  • Base URL:https://ai.artsmcp.com/api/open/v1
  • 驗證請求標頭(三選一):Authorization: Bearer <your_account_key>、X-Account-Api-Key: <your_account_key> 或 X-Api-Key: <your_account_key>
  • 可用資金說明:available_funds 綜合計算現金餘額(balance)、平台贈送金(gift_balance)與授信額度(credit_limit);當 balance + credit_limit < 0 時,cash_in_arrears 回傳 true

1. 取得個人錢包餘額與佣金統計

查詢個人錢包即時餘額、累計消耗統計、推廣佣金餘額與邀請人數,以及目前帳號生效中的單模型專屬折扣清單與結算幣種。

  • 路徑:GET /api/open/v1/wallet
  • 查詢參數 (Query):無
  • 呼叫範例 (Curl):
curl -s "https://ai.artsmcp.com/api/open/v1/wallet" \
  -H "Authorization: Bearer <your_account_key>"
  • 回應範例:
{
  "balance": 500.0,
  "gift_balance": 20.0,
  "credit_limit": 0.0,
  "available_funds": 520.0,
  "cash_in_arrears": false,
  "total_consumption": 133.5,
  "used_quota": 128.5,
  "gift_used_quota": 5.0,
  "commission_balance": 35.2,
  "total_referred": 6,
  "marketing_enabled": true,
  "commission_ratio": 0.1,
  "commission_basis": "consumption",
  "discounted_models": [],
  "currency": "CNY",
  "currency_symbol": "¥",
  "currency_unit": "元"
}
  • 回傳欄位說明:
欄位名類型說明
balancenumber現金錢包餘額
gift_balancenumber平台贈送金錢包餘額
credit_limitnumber帳戶授信透支額度
available_fundsnumber綜合可用總額(balance + gift_balance + credit_limit;現金欠費時如實回傳負值)
cash_in_arrearsboolean是否處於現金透支欠費狀態(balance + credit_limit < 0 時為 true)
total_consumptionnumber歷史累計總消耗金額(used_quota + gift_used_quota)
used_quotanumber現金錢包累計實扣消耗金額
gift_used_quotanumber贈送錢包累計實扣消耗金額
commission_balancenumber推廣返佣錢包目前餘額
total_referredinteger累計成功邀請註冊人數
marketing_enabledboolean目前用戶等級是否開啟推廣返佣權益
commission_rationumber推廣返佣比例(如 0.1 表示 10%)
commission_basisstring返佣核算基準(consumption 依消費 / recharge 依儲值)
discounted_modelsarray目前帳號單獨設定且生效中的模型專屬折扣清單
currency / currency_symbol / currency_unitstring站點結算幣種代碼、符號與單位名稱

2. 查詢錢包儲值與帳變紀錄

分頁查詢個人錢包的線上儲值訂單、兌換碼入帳與帳變明細(時間統一依站點營運時區輸出)。

  • 路徑:GET /api/open/v1/wallet/recharges
  • 查詢參數 (Query):
參數名類型預設值說明
pageinteger1頁碼(從 1 開始)
per_pageinteger20每頁筆數(範圍 1..100)
wallet_typestring全部依錢包類型篩選:system(現金錢包)或 gift(贈送錢包)
recharge_typestring全部依入帳類型篩選(如 alipay、wechat、stripe、redemption、transfer)
  • 呼叫範例 (Curl):
curl -s "https://ai.artsmcp.com/api/open/v1/wallet/recharges?page=1&per_page=20" \
  -H "Authorization: Bearer <your_account_key>"
  • 回應範例:
{
  "data": [
    {
      "amount": 100.0,
      "recharge_type": "wechat",
      "wallet_type": "system",
      "order_no": "ORD202611292015001234",
      "fee_amount": 0.0,
      "remark": "線上儲值",
      "created_at": "2026-11-29 20:15:08 (UTC+8)"
    }
  ],
  "total": 1,
  "page": 1,
  "per_page": 20
}
  • 回傳欄位說明:
欄位名類型說明
dataarray目前頁的儲值與帳變紀錄清單
data[].amountnumber變動金額(正數表示入帳,負數表示扣減)
data[].recharge_typestring入帳類型(如 alipay、wechat、stripe、redemption、transfer)
data[].wallet_typestring所屬錢包類型:system(現金錢包)或 gift(贈送錢包)
data[].order_nostring關聯支付訂單號(僅線上儲值紀錄回傳,無訂單號時省略)
data[].fee_amountnumber線上儲值對應的支付手續費(非線上儲值時為 0)
data[].remarkstring帳變備註說明(無備註時省略)
data[].created_atstring紀錄建立時間(依站點營運時區格式化)
totalinteger符合篩選條件的總筆數
page / per_pageinteger目前頁碼與每頁筆數

Raw Markdown (.md) · llms.txt