Integrations3 min read

ByCostGraph Team

CostGraph launches support for Stripe

Our first export integrations send data out instead of in. CostGraph now reports each customer's attributed cloud spend to a Stripe billing meter every night, so infrastructure costs land on the invoice as line items.

Ask about this postClaudeChatGPTPerplexity

Stripe has become synonymous with internet payments. When we started shipping integrations, one question came up more than any other: how do infrastructure and usage costs show up as line items in a system like Stripe?

For us and for many of our users, turning cloud spend into something a customer can be billed for is a nightmare for engineers and finance alike. The spend lives in the cloud bill. The invoice lives in Stripe. In between sit scripts, spreadsheets, and a reconciliation meeting at the end of the month.

Today we are launching support for Stripe. Unlike most of our integrations, which bring cost data into CostGraph, Stripe is one of our first export integrations. Data flows the other way. CostGraph reports each customer's attributed cloud spend to a Stripe billing meter every night, and a usage-based price on that meter turns it into an invoice. You decide who spent what. Stripe bills them for it.

Setup is two things. Create a meter in Stripe with a sum aggregation and attach a usage-based price to it. Then connect Stripe in CostGraph with a secret key and bind a virtual tag key to the meter. CostGraph verifies the key against Stripe before it saves anything, and stores it encrypted.

Attribution is done with virtual tags. You write one rule per customer, and the value the rule assigns is the Stripe customer id the spend is reported under. Any field works as the match: a linked account, a resource name prefix, a project, or an existing tag. Nothing is written back to your infrastructure, and Graph AI can draft the rules from a plain English description.

Each customer-day lands in Stripe as one meter event. It carries the customer, the amount in cents, the day the spend belongs to, and whether it corrects a day reported earlier. Cloud providers restate recent spend, so CostGraph holds each day for two days before reporting it and keeps reconciling the last 35 days. A correction is sent as the difference, so the meter's sum settles to the right total.

Group your cost overview by the tag key and you see what each customer will be billed before it is reported.

Check out the docs to get started.

If this sounds useful, get started for free or book a demo today.

Frequently Asked Questions

Put your bill to work

Connect a provider, watch your spend attribute itself, ask GraphAI where the money’s going.