> For the complete documentation index, see [llms.txt](https://docs.finout.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.finout.io/billing-integrations/data-and-engineering-platforms/connect-to-mongodb-atlas-beta.md).

# Connect to MongoDB Atlas  (Beta)

{% hint style="warning" %}
**Beta:** The MongoDB Atlas integration is currently in beta. Contact your Finout account team to enable it.
{% endhint %}

### Overview

Finout's MongoDB Atlas integration ingests cost and usage data through Atlas's FOCUS-standardized billing API and makes it available in MegaBill alongside your other cloud and SaaS services, for a unified view.

With this integration, you can:

* Connect an Atlas organization, including any linked organizations billed under it
* Break down costs by organization, project, cluster, SKU, service category, region, and your Atlas resource tags
* Track usage quantities (server hours, GB-days, data transfer) alongside cost
* Include Atlas cost data in dashboards, anomaly alerts, Virtual Tags, and financial plans

{% hint style="info" %}
Finout uses read-only access to Atlas billing data. It does not perform actions that can create, modify, or incur costs.
{% endhint %}

#### Before you start

Connecting MongoDB Atlas requires a **service account** with the **Organization Billing Viewer** role, and Finout's IP addresses added to the service account's API access list.

{% hint style="success" %}
**Prerequisite:** You must have the **Organization Owner** role in Atlas to create service accounts.
{% endhint %}

#### 1. Create an Atlas service account

1. Sign in to MongoDB Atlas and select your organization from the **Organization** menu at the top of the page.
2. In the sidebar, under **Identity & Access**, click **Applications**.
3. Open the **Service Accounts** tab and click **Create Service Account**.
4. Enter a **Name** and **Description** (for example, `Finout billing integration`).
5. Under **Client Secret Expiration**, select the longest period available. The expiration cannot be changed after the secret is created; when it expires, you'll need to generate a new secret and update it in Finout.&#x20;
6. From the **Organization Permissions** menu, select **Organization Billing Viewer**.
7. Click **Create**.
8. Copy the **Client ID** and the **Client Secret** — you'll need both in Finout in step 3.

{% hint style="info" %}
The Client Secret is shown only once. Copy and save it in a safe place before continuing.
{% endhint %}

<figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2F6lo5Gn98hZ2QGmCL4muG%2Fimage.png?alt=media&amp;token=b3120244-5293-477c-9f03-d78e69c1e6d0" alt=""><figcaption></figcaption></figure>

#### 2. Add Finout's IP addresses to the access list

Atlas organizations require an IP access list for API requests by default. Add Finout's egress IPs to the service account:

1. From the service account you just created, open **API Access List**.
2. Click **Add Access List Entry** and add all addresses that are listed here: [Finout IP Whitelist](https://docs.finout.io/settings/finout-ip-whitelist).
3. Click **Save**.

#### 3. Integrate MongoDB Atlas with Finout

1. In Finout, navigate to **Settings > Cost Centers** and click **Add cost center**.
2. Search and select **MongoDB Atlas**, click **Next**.
3. Fill in the following fields:
   1. **Cost Center Name** — pre-filled with "MongoDB Atlas"; edit it if you'd like a different name.
   2. **Client ID** — the service account Client ID from step 1.
   3. **Client Secret** — the service account Client Secret from step 1. Stored as a secret and never displayed again after saving.
4. Click **Complete Setup**.

Finout validates the connection immediately. If the credentials are invalid, the service account lacks the Organization Billing Viewer role, or Finout's IP addresses aren't on the access list, you'll see an error identifying the issue before the Cost Center is created.

Your Cost Center is created, and data becomes available in Finout within 24 hours.

#### FAQ

**How far back can Finout backfill Atlas cost data?**

Upon initial setup, the current month and the two previous completed months will be available.  Contact Finout support to extend the history further.

**Which organizations are included?**

The organization the service account belongs to, plus any organizations linked to it under Atlas cross-organization billing. Linked organizations appear in the same Cost Center, distinguished by the **Organization** dimension, and require no additional credentials. Separate paying organizations need their own Cost Center.

**Why does the first day of a month show unusually high costs?**

Atlas records two dates for every charge: the day the usage happened, and the day MongoDB billed it. These usually match — but usage from the last one to three days of a month is billed at the start of the following month, so it lands on the next month's invoice.

Finout places each charge on its **billed date**. That means a few days of late-month usage appear on the 1st–3rd of the following month, which can look like a spike on those days. This is expected, and it's why the pattern repeats at every month boundary.

If you want to analyze consumption by when it actually occurred, filter or group by the **Usage Date** dimension; the monthly totals will then differ slightly from the invoice by exactly that boundary tail.

**Are current-month figures final?**

No. Atlas marks the open month as an estimate until the invoice closes. Finout refreshes it daily and finalizes the month once Atlas closes the invoice.

**What's included in the data?**

All usage-based charges on your Atlas invoice — cluster compute, storage, backup, data transfer, serverless, and every other metered SKU (Atlas Enterprise support fee included). Costs reflect your negotiated credit pricing, so what you see in Finout is what MongoDB charges you.

Tax, shortfall charges, and post-invoice adjustments or refunds are handled outside the usage export and aren't represented.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.finout.io/billing-integrations/data-and-engineering-platforms/connect-to-mongodb-atlas-beta.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
