Skip to main content
Workers, R2, and other PayGo products often sit on a separate bill from AWS, GCP, and Azure. Connect Cloudflare with an API token and Account ID so that spend lands in Explorer with your other billing datasources. This connector imports PayGo (self-serve) usage only.
PayGo and self-serve accounts only. Enterprise contract billing is not on the public usage API. Validation fails with a coverage error if the account is not covered.
1

Create an API token

In Cloudflare Dashboard > My Profile > API Tokens, create a token. Permission: Account / Billing / Read, scoped to this account. Copy the token immediately. It is shown once. Global API keys and Origin CA keys will not work.
2

Copy the Account ID

Copy the Account ID from the dashboard Overview page (right-hand sidebar) or from the URL (/accounts/<account-id>/...). It is 32 hex characters.
3

Connect in Costory

Go to Integrations, click + Add integration, then choose Cloudflare under Billing. The connect URL is /integration/new/cloudflare/billing.
4

Enter connection details

Fill Connection name (default Cloudflare), API token, and Account ID. Start date is optional. Leave it empty to use Costory’s default lookback.
5

Validate, then save

Click Validate. Costory calls GET /client/v4/accounts/<account-id>/billing-usage/info with Authorization: Bearer. Save stays disabled until the token can read PayGo billing for that account. If this is the only billing source and it is demo data, Costory asks you to confirm before replacing it.
On first sync, Costory backfills up to 12 months of PayGo usage, depending on what Cloudflare retains. New data then follows the usual data refresh cadence. SaaS sources typically appear in about 10 minutes.

Field reference

What Costory includes

Costory pulls PayGo billable usage from Cloudflare’s usage API and maps it into Standard Columns. Typical lines include usage for PayGo products on that account (Workers, R2, and other products Cloudflare returns on the usage API). How to analyze Cloudflare costs
  • Spend by product: group by Service name or SKU
  • Spend over time: use the same date presets as other billing sources in Explorer
What Costory does not include
  • Enterprise contract invoices and committed-use billing (not on the public PayGo API)
  • Taxes, credits, or invoice adjustments outside the usage API
  • Zone-level analytics that are not billed on PayGo usage
Rotate the API token from Integrations when you need a new credential. The Account ID stays the same.

Troubleshooting

Billing Data

All billing providers and shared setup notes.

Explorer

Filter and group Cloudflare spend with the rest of your stack.

Standard Columns

Normalized cost fields across providers.

Scaleway billing

Import Scaleway consumption the same way.
Last modified on August 24, 2026