Bill

Finance Finance

  • API Reference
    • Access control
    • Balance Query Related Interfaces
      • Account Balance Query
    • Bill Related Interfaces
      • Appendix
      • Charge Item Bill
      • Python Request Example
      • Resource Month Bill
    • Error response
    • Feature Update Records
    • General Description
    • Interface Specifications
    • Introduction
  • Bill Management
    • Bill Details
    • Bill Subscription
    • Consumption Information Subscription Guide
    • Consumption Overview
    • How to View
    • Tag-Based Billing
  • Charge
    • Billing & Configuration Changes
      • Configuration Upgrade Or Shrinkage
      • Shift Charge
    • Charge type
    • On-Demand Billing
    • Pay-as-you-go
    • Subscription billing
  • Contract
    • Apply for Electronic Contract
    • Overview
  • Cost Management
    • Cost Allocation
    • Cost Splitting
  • Disclaimer
  • Enterprise Organization Financial Management
  • FAQs
    • Bill and Debt
    • Billing Issues
    • Common Questions Overview
    • Contract Issues
    • Coupon Issues
    • Dedicated Account Remittance Issues
    • Invoice Issues
    • Order Issues
    • Recharge Issues
    • Refund Issues
    • Renew Issues
    • Withdrawal Issues
  • Invoice
    • Apply for Baidu Intelligent Cloud Invoice
    • Return or Exchange Baidu Intelligent Cloud Invoice
  • Multi-Account Multi-User Financial Management
    • Enterprise Organization - Financial Management
    • Multi-User Access Control - Financial Permission
    • Unified Finance
  • Order Management
  • Overview
  • Partner Deposit Payment
  • Purchase Guide
    • Coupon
      • Activating Coupons
      • Coupon Overview
      • Using Coupons
      • Viewing Coupons
    • Income and Expense Details
    • Purchase
    • Recharge
      • Exclusive Account Wire Transfer
      • Recharge Operations
      • Viewing Balance
    • Refund and Compensation
      • Product Compensation Standards
      • Refund Application Process
      • Refund policy
      • Unsubscribe Overview
      • Unsubscribe Rule Description
    • Renew
      • Auto-renewal
      • Renew Overview
      • Unified Resource Expiration Time
    • Withdrawal
  • Resource Package Management
    • Resource Package Deduction Details
    • Resource Package Overview
  • SDK
    • Java-SDK
      • Bill
      • BillingClient
      • Exception handling
      • Install SDK
      • Overview
      • Version Update Description
All documents
menu
No results found, please re-enter

Finance Finance

  • API Reference
    • Access control
    • Balance Query Related Interfaces
      • Account Balance Query
    • Bill Related Interfaces
      • Appendix
      • Charge Item Bill
      • Python Request Example
      • Resource Month Bill
    • Error response
    • Feature Update Records
    • General Description
    • Interface Specifications
    • Introduction
  • Bill Management
    • Bill Details
    • Bill Subscription
    • Consumption Information Subscription Guide
    • Consumption Overview
    • How to View
    • Tag-Based Billing
  • Charge
    • Billing & Configuration Changes
      • Configuration Upgrade Or Shrinkage
      • Shift Charge
    • Charge type
    • On-Demand Billing
    • Pay-as-you-go
    • Subscription billing
  • Contract
    • Apply for Electronic Contract
    • Overview
  • Cost Management
    • Cost Allocation
    • Cost Splitting
  • Disclaimer
  • Enterprise Organization Financial Management
  • FAQs
    • Bill and Debt
    • Billing Issues
    • Common Questions Overview
    • Contract Issues
    • Coupon Issues
    • Dedicated Account Remittance Issues
    • Invoice Issues
    • Order Issues
    • Recharge Issues
    • Refund Issues
    • Renew Issues
    • Withdrawal Issues
  • Invoice
    • Apply for Baidu Intelligent Cloud Invoice
    • Return or Exchange Baidu Intelligent Cloud Invoice
  • Multi-Account Multi-User Financial Management
    • Enterprise Organization - Financial Management
    • Multi-User Access Control - Financial Permission
    • Unified Finance
  • Order Management
  • Overview
  • Partner Deposit Payment
  • Purchase Guide
    • Coupon
      • Activating Coupons
      • Coupon Overview
      • Using Coupons
      • Viewing Coupons
    • Income and Expense Details
    • Purchase
    • Recharge
      • Exclusive Account Wire Transfer
      • Recharge Operations
      • Viewing Balance
    • Refund and Compensation
      • Product Compensation Standards
      • Refund Application Process
      • Refund policy
      • Unsubscribe Overview
      • Unsubscribe Rule Description
    • Renew
      • Auto-renewal
      • Renew Overview
      • Unified Resource Expiration Time
    • Withdrawal
  • Resource Package Management
    • Resource Package Deduction Details
    • Resource Package Overview
  • SDK
    • Java-SDK
      • Bill
      • BillingClient
      • Exception handling
      • Install SDK
      • Overview
      • Version Update Description
  • Document center
  • arrow
  • FinanceFinance
  • arrow
  • SDK
  • arrow
  • Java-SDK
  • arrow
  • Bill

Bill

Updated at:2025-10-27

Generating billing statements and providing resource-level bills are the fundamental core functions of the Baidu AI Cloud Transaction System.

Java
1// Query the bills of the currently logged-in user
2public static void getBills(BillingClient billingClient) {
3   ResourceMonthBillRequest request = new ResourceMonthBillRequest();
4 // Set the month to which the bill belongs
5   request.setMonth("2019-02");
6 // Set to query postpaid bills
7   request.setProductType("postpay");
8 // Set to query resource bills for CDS products
9   request.setServiceType("CDS");
10 // Set pagination flag
11   request.setPageNo(1);
12 // Set size of paginated returned data
13   request.setPageSize(50);
14   
15   ResourceMonthBillResponse response = billingClient.getResourceMonthBill(request);
16}
17 // Query the bills of the financial group sub-accounts under the current root account
18public static void getBills(BillingClient billingClient) {
19   ResourceMonthBillRequest request = new ResourceMonthBillRequest();
20 // Set the month to which the bill belongs
21   request.setMonth("2019-02");
22 // Set to query postpaid bills
23   request.setProductType("postpay");
24 // Set to query resource bills for CDS products
25   request.setServiceType("CDS");
26 // Set the accountId of the sub-account added to the financial group; the sub-account must belong to the same enterprise organization, otherwise the access will be deemed unauthorized
27   request.setQueryAccountId("XXX");
28 // Set pagination flag
29   request.setPageNo(1);
30 // Set size of paginated returned data
31   request.setPageSize(50);
32   
33   ResourceMonthBillResponse response = billingClient.getResourceMonthBill(request);
34}
  1. A maximum of 100 bill records can be queried at a time.
  2. For querying bills on behalf of other accounts, only the root account is allowed to initiate the request, and the queried account must be a sub-account that is part of the financial group for enterprise financial management within the enterprise organization to which the root account belongs.

Previous
Resource Package Management
Next
BillingClient