全部產品
Search
文件中心

:QueryBill - 賬單查詢服務

更新時間:Oct 14, 2025

查詢使用者某個賬期內的結算賬單。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

bss:DescribeBillList

get

*全部資源

*

請求參數

名稱

類型

必填

描述

樣本值

BillingCycle

string

賬期,YYYY-MM。

2018-07

Type

string

類型。取值:

  • SubscriptionOrder

  • PayAsYouGoBill

  • Refund

  • Adjustment

SubscriptionOrder

ProductCode

string

產品代碼。

rds

ProductType

string

產品類型。

rds

SubscriptionType

string

訂閱類型。取值:

  • Subscription

  • PayAsYouGo

說明

必須和 ProductCode 參數一起使用。

Subscription

IsHideZeroCharge

boolean

根據原價(PretaxGrossAmount)是否為 0 做過濾,預設為否(相容現有邏輯)。

  • true:是。

  • false:否。

true

PageNum

integer

頁碼,預設值為 1。

1

PageSize

integer

每頁數量,預設值:20,最大值:300。

20

BillOwnerId

integer

資源歸屬帳號的 ID,資源歸屬帳號是實際使用資源的帳號。

123

返回參數

名稱

類型

描述

樣本值

object

Code

string

狀態代碼。

Success

Message

string

錯誤資訊。

Successful!

RequestId

string

請求 ID。

AE3F4057-DFC9-4B81-8858-F620651010C9

Success

boolean

是否成功。

true

Data

object

返回資料。

PageNum

integer

頁碼。

1

BillingCycle

string

賬期,YYYY-MM。

2020-02

AccountID

string

帳號 ID。

185xxxxx489

PageSize

integer

每頁條數。

1

TotalCount

integer

總記錄數。

20

AccountName

string

帳號。

test@test.aliyunid.com

Items

object

Item

array<object>

賬單詳情。

object

Status

string

支付狀態。取值:

  • PayFinish:已支付

  • PayUnclear:未結清

  • PayUnsettle:未結算

  • NoSettle:免結算

PayFinish

RoundDownDiscount

string

抹零優惠。

0

Item

string

賬單類型:

  • SubscriptionOrder

  • PayAsYouGoBill

  • Refund

  • Adjustment

SubscriptionOrder

Currency

string

幣種。

  • CNY

  • USD

  • JPY

CNY

UsageStartTime

string

賬單開始時間。

2020-03-11 07:00:00

SubscriptionType

string

訂閱類型。取值:

  • Subscription

  • PayAsYouGo

PayAsYouGo

DeductedByCashCoupons

number

代金券抵扣。

0

UsageEndTime

string

賬單結束時間。

2020-03-11 08:00:00

DeductedByCoupons

number

優惠券抵扣。

0

SubOrderId

string

該條賬單對應的訂單明細 ID。

325345254353

OutstandingAmount

number

未結清金額。

0

PaymentTime

string

訂單支付時間。

2020-03-11 08:00:00

PipCode

string

產品 Code。

rds

PretaxAmount

number

應付金額。

100

CommodityCode

string

商品 Code。

rds

ProductName

string

產品名稱。

雲資料庫RDS

RecordID

string

訂單號、賬單號。

2020xxxx5912

AdjustAmount

number

信用額度退款抵扣。

0

ProductDetail

string

產品明細。

關係型資料庫RDS(包月)

OwnerID

string

子帳號 AccountID(多帳號代付情境)。

3532535235

DeductedByPrepaidCard

number

儲值卡抵扣。

0

ProductType

string

產品類型。

rds

InvoiceDiscount

number

優惠金額。

0

PaymentAmount

number

現金支付(含信用額度退款抵扣)。

0

PretaxGrossAmount

number

原始金額。

0

CashAmount

number

現金支付(不包含信用額度退款抵扣)。

0

ProductCode

string

產品代碼。

rds

樣本

正常返回樣本

JSON格式

{
  "Code": "Success",
  "Message": "Successful!",
  "RequestId": "AE3F4057-DFC9-4B81-8858-F620651010C9",
  "Success": true,
  "Data": {
    "PageNum": 1,
    "BillingCycle": "2020-02",
    "AccountID": "185xxxxx489",
    "PageSize": 1,
    "TotalCount": 20,
    "AccountName": "test@test.aliyunid.com",
    "Items": {
      "Item": [
        {
          "Status": "PayFinish",
          "RoundDownDiscount": "0",
          "Item": "SubscriptionOrder",
          "Currency": "CNY",
          "UsageStartTime": "2020-03-11 07:00:00",
          "SubscriptionType": "PayAsYouGo",
          "DeductedByCashCoupons": 0,
          "UsageEndTime": "2020-03-11 08:00:00",
          "DeductedByCoupons": 0,
          "SubOrderId": "325345254353",
          "OutstandingAmount": 0,
          "PaymentTime": "2020-03-11 08:00:00",
          "PipCode": "rds",
          "PretaxAmount": 100,
          "CommodityCode": "rds",
          "ProductName": "雲資料庫RDS",
          "RecordID": "2020xxxx5912",
          "AdjustAmount": 0,
          "ProductDetail": "關係型資料庫RDS(包月)",
          "OwnerID": "3532535235",
          "DeductedByPrepaidCard": 0,
          "ProductType": "rds",
          "InvoiceDiscount": 0,
          "PaymentAmount": 0,
          "PretaxGrossAmount": 0,
          "CashAmount": 0,
          "ProductCode": "rds"
        }
      ]
    }
  }
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情