帳單設定

帳單設定是 Google Ads 帳戶和付款帳戶 (也稱為「月結單設定」) 之間的帳戶層級連結,可有效判斷帳單設定帳戶預算所產生的費用由誰支付。每個付款帳戶都會對應一張月結單。

關於付款帳戶

每個 BillingSetup 都會識別一個付款帳戶,該帳戶將依據帳戶預算所產生的費用開立月結單。這個付款帳戶與付款資料相關聯,該付款資料最終須收取費用。

帳單設定包含 payments_account 欄位和一組能識別使用中付款帳戶的 payments_account_info 欄位,包括:

如果付款帳戶符合合併帳單的使用資格,可以將多個 Google Ads 帳戶設為使用同一個基礎付款帳戶,這樣就能將多個 Google Ads 帳戶歸入同一張月結單。

建立新帳單設定

您可以將新的帳單設定連結至現有的付款帳戶或同時建立的帳戶。

使用現有的付款帳戶

如要連結「現有」的付款帳戶,請將 payments_account 設為有效付款帳戶的資源 ID。但請勿修改 payments_account_info

您可以使用 PaymentsAccountService.ListPaymentsAccounts 方法列出可用的付款帳戶。傳回的 PaymentsAccounts 取決於您用來驗證的管理員帳戶。

針對每個 PaymentsAccount,其「付款管理員」的 ID 位於 paying_manager_customer 欄位中。

使用新的付款帳戶

如要連結新的 Payments 帳戶,請在 payments_account_info 中設定下列欄位 (不要設定 payments_account):

以下範例說明如何使用現有付款資料 ID 建立新的帳單設定。如上所述,這項操作也會建立一個名稱為 My New Payments Account 的新 Payments 帳戶。

BillingSetup bsetup = BillingSetup.newBuilder()
    .setPaymentsAccountInfo(PaymentsAccountInfo.newBuilder()
        .setPaymentsAccountName("My New Payments Account")
        .setPaymentsProfileId("1234-5678-9012")
        .build())
    .setStartTimeType(TimeType.NOW)
    .build();

BillingSetupOperation op = BillingSetupOperation.newBuilder().setCreate(bsetup).build();

try (BillingSetupServiceClient billingSetupServiceClient = googleAdsClient
    .getBillingSetupServiceClient()) {

  MutateBillingSetupResponse response =
      billingSetupServiceClient.mutateBillingSetup(Long.toString(customerId), op);
}

如果這是 Google Ads 帳戶的第一個帳單設定,客戶就會使用所參照的付款資料來註冊帳單。

帳單設定狀態

新的 BillingSetup 執行個體必須獲得核准才能生效。在此之前,其 status 會處於 PENDING 狀態。

BillingSetup 可以是下列任一 status

帳單設定狀態 說明
PENDING 待審核。
APPROVED_HELD 已核准,但對應的第一筆預算則未獲得核准。只有設為採用月結方式的帳單設定才會發生這種情形。
APPROVED 設定已核准。
CANCELLED 使用者在核准前取消設定。

擷取帳戶的帳單設定

如同 Google Ads API 中大多數其他實體,系統會利用用來指定要傳回哪些欄位的 Google Ads 查詢語言查詢,查詢 GoogleAdsService.SearchStream 來擷取 BillingSetup

取得 BillingSetup 的參照後,即可根據「帳戶預算」的說明,使用它建立 AccountBudgetProposal

取消待處理的帳單設定

您可以使用移除作業取消尚未生效的 BillingSetup。只有在 statusPENDINGAPPROVED 未來開始時間時,才能取消帳單設定。