OverviewProductsPlatformsAPI ReferenceResources
Accounts & Ops

Set up ad account billing (monthly invoicing)

POSThttps://zernio.com/api/v1/ads/accounts/billing

Bills a Google Ads account to a monthly invoicing payments account of a manager above it, and proposes its account budget, so the account can serve without anyone opening Google Ads.

PlatformsGoogle

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Body

application/json

What every request needs

accountIdstringRequired

Google ads SocialAccount id.

adAccountIdstringRequired

Google Ads customer id to bill, digits only.

paymentsAccountIdstringRequired

Monthly invoicing payments account from GET /v1/ads/accounts/billing.

Optional parameters4 fields
spendingLimitnumber

Account budget cap in the account currency. Omit for an unlimited budget.

budgetNamestring, max 255Default Zernio account budget
purchaseOrderNumberstring, max 64

Printed on the invoice. No effect on delivery.

validateOnlybooleanDefault false

Responses

Success· the request worked

Errors· the request failed

How it behaves

Monthly invoicing only

Google's API cannot add a card or other payment method. So paymentsAccountId must be one of the manager's monthly invoicing (consolidated billing) payments accounts listed by GET /v1/ads/accounts/billing.

A manager without monthly invoicing has none, and billing has to be added in Google Ads instead.

What it creates

  1. A billing setup (Google's BillingSetupService) that starts now on that payments account.
  2. An account budget proposal that starts now and never ends: unlimited by default, or capped at spendingLimit in the account currency.

Google reviews the budget offline, usually within an hour. Until then the setup reads APPROVED_HELD and ads do not serve.

Existing billing

This call never replaces existing billing. It is refused with 409 when:

  • the customer's current billing setup already has a budget;
  • the customer is billed to another payments account.

A current setup on the same payments account without a budget (for example after a budget rejection) is reused, so resending the same request finishes it.

Retries and validation

Not idempotent and never retried: after a 502 with details.creationStatus=unknown, read GET /v1/ads/accounts/billing before retrying.

Google has no dry run for billing setups. So validateOnly: true checks the payments account and the existing billing without creating anything, and asks Google to validate the budget when a setup would be reused.

POST/v1/ads/accounts/billing
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adaccounts.setUpAdAccountBilling({  body: {    accountId: 'account_abc123',    adAccountId: 'adaccount_abc123',    paymentsAccountId: 'paymentsaccount_abc123',  },});console.log(data);
{  "customerId": "string",  "paymentsAccountId": "string",  "paymentsAccountName": "string",  "billingSetupId": "string",  "reusedBillingSetup": true,  "accountBudgetProposalId": "string",  "validateOnly": true,  "nextSteps": "string"}
OpenAPI specification
Was this page helpful?