# Get ad account billing

Fetches ad account billing. Works with Google Ads.

```http
GET https://api.pozy.ai/v1/ads/accounts/billing
```

- Area: Ads / Ad Accounts
- Auth: Authorization: Bearer pz_live_...

## Query parameters

- `accountId` (string, required)
- `adAccountId` (string)

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/ads/accounts/billing?accountId=696e0b682d0a31188e7a2ba9" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/ads/accounts/billing?accountId=696e0b682d0a31188e7a2ba9", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/ads/accounts/billing",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    params={
        "accountId": "696e0b682d0a31188e7a2ba9",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `customerId`, string
- `paymentsAccounts`, array of object
  - `paymentsAccountId`, string
  - `name`, string: Can be null
  - `currency`, string: Can be null
  - `paymentsProfileId`, string: Can be null
  - `payingManagerCustomerId`, string: Can be null
- `billingSetups`, array of object
  - `billingSetupId`, string
  - `status`, string: One of `PENDING`, `APPROVED_HELD`, `APPROVED`, `CANCELLED`, `UNKNOWN`
  - `paymentsAccountId`, string: Can be null
  - `startDateTime`, string: Can be null
  - `endDateTime`, string: Can be null
- `accountBudgets`, array of object
  - `accountBudgetId`, string
  - `status`, string: One of `PENDING`, `APPROVED`, `CANCELLED`, `UNKNOWN`
  - `billingSetupId`, string: Can be null
  - `approvedSpendingLimitMicros`, string: Can be null
  - `approvedSpendingLimitType`, string: Can be null
  - `pendingProposalId`, string: Can be null
- `pendingBudgetProposals`, array of object
  - `accountBudgetProposalId`, string
  - `billingSetupId`, string: Can be null
- `cachedAt`, string (date-time): Can be null
- `stale`, boolean

```json
{
  "customerId": "691909ff82eb5ed7c816716d",
  "paymentsAccounts": [
    {
      "paymentsAccountId": "69ee150082c8d470630b2076",
      "name": "Acme",
      "currency": "USD",
      "paymentsProfileId": "64eb9f15a2a22aa9662a6cb8",
      "payingManagerCustomerId": "6bee0fa73ffaaa776bed1062"
    }
  ],
  "billingSetups": [
    {
      "billingSetupId": "62c3eba932baabf6447d4843",
      "status": "PENDING",
      "paymentsAccountId": "69ee150082c8d470630b2076",
      "startDateTime": "string",
      "endDateTime": "string"
    }
  ],
  "accountBudgets": [
    {
      "accountBudgetId": "60beae65670df1901a1eea9f",
      "status": "PENDING",
      "billingSetupId": "62c3eba932baabf6447d4843",
      "approvedSpendingLimitMicros": "string",
      "approvedSpendingLimitType": "string",
      "pendingProposalId": "6c3b76e3f75b14388b9b62e0"
    }
  ],
  "pendingBudgetProposals": [
    {
      "accountBudgetProposalId": "648f921ff3ba1883e4c11173",
      "billingSetupId": "62c3eba932baabf6447d4843"
    }
  ],
  "cachedAt": "2026-10-02T09:00:00.000Z",
  "stale": true
}
```
