All Products
Search
Document Center

Expenses and Costs:QueryBill

更新时间:Oct 28, 2025

Queries the settlement bills for an account in a specified billing cycle.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

bss:DescribeBillList

get

*All Resource

*

None

None

Request parameters

Parameter

Type

Required

Description

Example

BillingCycle

string

Yes

The billing cycle. The format is YYYY-MM.

2018-07

Type

string

No

The type. Valid values:

  • SubscriptionOrder

  • PayAsYouGoBill

  • Refund

  • Adjustment

SubscriptionOrder

ProductCode

string

No

The product code.

rds

ProductType

string

No

The product type.

rds

SubscriptionType

string

No

The subscription type. Valid values:

  • Subscription

  • PayAsYouGo

Note

This parameter must be used with the ProductCode parameter.

Subscription

IsHideZeroCharge

boolean

No

Specifies whether to exclude bills with a pretax gross amount (PretaxGrossAmount) of 0. The default value is false. This ensures backward compatibility.

  • true: Yes.

  • false: No.

true

PageNum

integer

No

The page number. The default value is 1.

1

PageSize

integer

No

The number of entries per page. Default value: 20. Maximum value: 300.

20

BillOwnerId

integer

No

The ID of the account that owns the resource. This is the account that actually uses the resource.

123

Response elements

Element

Type

Description

Example

object

Code

string

The status code.

Success

Message

string

The error message.

Successful!

RequestId

string

The request ID.

AE3F4057-DFC9-4B81-8858-F620651010C9

Success

boolean

Indicates whether the request was successful.

true

Data

object

The returned data.

PageNum

integer

The page number.

1

BillingCycle

string

The billing cycle in YYYY-MM format.

2020-02

AccountID

string

The account ID.

185xxxxx489

PageSize

integer

The number of entries per page.

1

TotalCount

integer

The total number of records.

20

AccountName

string

The account.

test@test.aliyunid.com

Items

object

Item

array<object>

The bill details.

object

Status

string

The payment status. Valid values:

  • PayFinish: Paid

  • PayUnclear: Outstanding

  • PayUnsettle: Unsettled

  • NoSettle: Settlement-free

PayFinish

RoundDownDiscount

string

The discount amount due to rounding.

0

Item

string

The bill type:

  • SubscriptionOrder

  • PayAsYouGoBill

  • Refund

  • Adjustment

SubscriptionOrder

Currency

string

The currency.

  • CNY

  • USD

  • JPY

CNY

UsageStartTime

string

The start time of the bill.

2020-03-11 07:00:00

SubscriptionType

string

The subscription type. Valid values:

  • Subscription

  • PayAsYouGo

PayAsYouGo

DeductedByCashCoupons

number

The amount deducted using cash coupons.

0

UsageEndTime

string

The end time of the bill.

2020-03-11 08:00:00

DeductedByCoupons

number

The amount deducted using coupons.

0

SubOrderId

string

The ID of the order details that correspond to the bill.

325345254353

OutstandingAmount

number

The outstanding amount.

0

PaymentTime

string

The time the order was paid.

2020-03-11 08:00:00

PipCode

string

The product code.

rds

PretaxAmount

number

The amount payable.

100

CommodityCode

string

The commodity code.

rds

ProductName

string

The product name.

云数据库RDS

RecordID

string

The order number or bill number.

2020xxxx5912

AdjustAmount

number

The amount deducted from a credit refund.

0

ProductDetail

string

The product details.

关系型数据库RDS(包月)

OwnerID

string

The AccountID of the RAM user. This applies to scenarios where a management account pays for member accounts.

3532535235

DeductedByPrepaidCard

number

The amount deducted using a prepaid card.

0

ProductType

string

The product type.

rds

InvoiceDiscount

number

The discount amount.

0

PaymentAmount

number

The cash payment, including deductions from credit refunds.

0

PretaxGrossAmount

number

The original amount.

0

CashAmount

number

The cash payment, excluding deductions from credit refunds.

0

ProductCode

string

The product code.

rds

Examples

Success response

JSON format

{
  "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"
        }
      ]
    }
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.