调用QueryBill查询用户某个账期内结算账单。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | QueryBill |
系统规定参数。取值:QueryBill。 |
BillingCycle | String | 是 | 2018-07 |
账期,YYYY-MM。 |
Type | String | 否 | SubscriptionOrder |
类型。取值:
|
ProductCode | String | 否 | rds |
产品代码。 |
ProductType | String | 否 | rds |
产品类型。 |
SubscriptionType | String | 否 | Subscription |
订阅类型。取值:
说明 必须和ProductCode参数一起使用。
|
IsHideZeroCharge | Boolean | 否 | true |
根据原价(PretaxGrossAmount)是否为0做过滤,默认为否(兼容现有逻辑)。
|
IsDisplayLocalCurrency | Boolean | 否 | false |
是否展示本币(待删除)。 |
PageNum | Integer | 否 | 1 |
页码,默认值为1。 |
PageSize | Integer | 否 | 20 |
每页数量,默认值:20,最大值:300。 |
BillOwnerId | Long | 否 | 123 |
子账号ID。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Code | String | Success |
状态码。 |
Message | String | Successful! |
错误信息。 |
RequestId | String | AE3F4057-DFC9-4B81-8858-F620651010C9 |
请求ID。 |
Success | Boolean | true |
是否成功。 |
Data | Object |
返回数据。 |
|
PageNum | Integer | 1 |
页码。 |
BillingCycle | String | 2020-02 |
账期,YYYY-MM。 |
AccountID | String | 185xxxxx489 |
账号ID。 |
PageSize | Integer | 1 |
每页条数。 |
TotalCount | Integer | 20 |
总记录数。 |
AccountName | String | test@test.aliyunid.com |
账号。 |
Items | Array of Item |
账单详情。 |
|
Item | |||
Status | String | PayFinish |
支付状态。取值:
|
RoundDownDiscount | String | 0 |
抹零优惠。 |
Item | String | SubscriptionOrder |
账单类型:
|
Currency | String | CNY |
币种。
|
UsageStartTime | String | 2020-03-11 07:00:00 |
账单开始时间。 |
SubscriptionType | String | PayAsYouGo |
订阅类型。取值:
|
DeductedByCashCoupons | Float | 0 |
代金券抵扣。 |
UsageEndTime | String | 2020-03-11 08:00:00 |
账单结束时间。 |
DeductedByCoupons | Float | 0 |
优惠券抵扣。 |
SubOrderId | String | 325345254353 |
该条账单对应的订单明细ID。 |
OutstandingAmount | Float | 0 |
未结清金额。 |
AfterTaxAmount | Float | 0 |
税后金额。 |
PaymentTime | String | 2020-03-11 08:00:00 |
订单支付时间。 |
PretaxAmountLocal | Float | 0 |
本币金额。 |
Tax | Float | 0 |
税费。 |
PipCode | String | rds |
产品Code。 |
PaymentTransactionID | String | 2O3AADJFEAF2PDKSFAMFCB11918 |
交易号。 |
PretaxAmount | Float | 100 |
应付金额。 |
CommodityCode | String | rds |
商品Code。 |
ProductName | String | 云数据库RDS |
产品名称。 |
RecordID | String | 2020xxxx5912 |
订单号、账单号。 |
AdjustAmount | Float | 0 |
信用额度退款抵扣。 |
ProductDetail | String | 关系型数据库RDS(包月) |
产品明细。 |
PaymentCurrency | String | USD |
支付币种。 |
OwnerID | String | 3532535235 |
子账号AccountID(多账号代付场景)。 |
DeductedByPrepaidCard | Float | 0 |
储值卡抵扣。 |
ProductType | String | rds |
产品类型。 |
InvoiceDiscount | Float | 0 |
优惠金额。 |
PaymentAmount | Float | 0 |
现金支付。 |
PretaxGrossAmount | Float | 0 |
原始金额。 |
CashAmount | Float | 0 |
现金支付(不包含信用额度退款抵扣)。 |
ProductCode | String | rds |
产品代码。 |
示例
请求示例
http(s)://[Endpoint]/?Action=QueryBill
&BillingCycle=2018-07
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<QueryBillResponse>
<Message>Successful!</Message>
<RequestId>347A769E-CA83-4213-964D-41A974DE0F3D</RequestId>
<Data>
<BillingCycle>2020-03</BillingCycle>
<TotalCount>47</TotalCount>
<AccountID>185xxxxx489</AccountID>
<PageSize>20</PageSize>
<PageNum>1</PageNum>
<Items>
<Item>
<Status>PayFinish</Status>
<DeductedByCoupons>0</DeductedByCoupons>
<RoundDownDiscount>0</RoundDownDiscount>
<ProductName>云数据库RDS</ProductName>
<ProductDetail>关系型数据库RDS(包月)</ProductDetail>
<ProductCode>rds</ProductCode>
<SubOrderId/>
<ProductType>rds</ProductType>
<DeductedByCashCoupons>0</DeductedByCashCoupons>
<OutstandingAmount>0</OutstandingAmount>
<PaymentTime/>
<PaymentAmount>0</PaymentAmount>
<DeductedByPrepaidCard>0</DeductedByPrepaidCard>
<InvoiceDiscount>0</InvoiceDiscount>
<UsageEndTime>2020-03-11 08:00:00</UsageEndTime>
<Item>PayAsYouGoBill</Item>
<SubscriptionType>PayAsYouGo</SubscriptionType>
<PretaxGrossAmount>0</PretaxGrossAmount>
<OwnerID/>
<PretaxAmount>0</PretaxAmount>
<Currency>CNY</Currency>
<UsageStartTime>2020-03-11 07:00:00</UsageStartTime>
<RecordID>2020xxxx5912</RecordID>
</Item>
</Items>
<AccountName>test@test.aliyunid.com</AccountName>
</Data>
<Code>Success</Code>
<Success>true</Success>
</QueryBillResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"Message" : "Successful!",
"RequestId" : "347A769E-CA83-4213-964D-41A974DE0F3D",
"Data" : {
"BillingCycle" : "2020-03",
"TotalCount" : 47,
"AccountID" : "185xxxxx489",
"PageSize" : 20,
"PageNum" : 1,
"Items" : {
"Item" : [ {
"Status" : "PayFinish",
"DeductedByCoupons" : 0,
"RoundDownDiscount" : 0,
"ProductName" : "云数据库RDS",
"ProductDetail" : "关系型数据库RDS(包月)",
"ProductCode" : "rds",
"SubOrderId" : "",
"ProductType" : "rds",
"DeductedByCashCoupons" : 0,
"OutstandingAmount" : 0,
"PaymentTime" : "",
"PaymentAmount" : 0,
"DeductedByPrepaidCard" : 0,
"InvoiceDiscount" : 0,
"UsageEndTime" : "2020-03-11 08:00:00",
"Item" : "PayAsYouGoBill",
"SubscriptionType" : "PayAsYouGo",
"PretaxGrossAmount" : 0,
"OwnerID" : "",
"PretaxAmount" : 0,
"Currency" : "CNY",
"UsageStartTime" : "2020-03-11 07:00:00",
"RecordID" : "2020xxxx5912"
} ]
},
"AccountName" : "test@test.aliyunid.com"
},
"Code" : "Success",
"Success" : true
}
错误码
访问错误中心查看更多错误码。