Skip to main content

Facturation des centres de profit

Découvrez comment créer et utiliser des centres de coûts pour gérer les centres de profit à grande échelle.

Qui peut utiliser cette fonctionnalité ?

The enhanced billing platform is available to:

  • All enterprise accounts, and their organizations, created after June 2, 2024
  • Enterprises that participated in the public preview program

Beginning in September 2024, GitHub will migrate remaining enterprises to the new billing platform. Enterprises will receive a notice 30 days before their migration. See the GitHub blog.

To drive accountability and control costs, the new billing platform lets you create cost centers. A cost center manages expenses without generating revenue. You can create cost centers and assign users, organizations, and repositories to them, and set budgets. This enhances spending control and resource allocation.

If your account is billed to Azure, you will have the option to add an Azure subscription ID. Cost centers allows for multiple Azure subscription IDs so that different business units, within an enterprise, can directly pay for their usage.

Creating a cost center

Create cost centers to monitor and manage expenses for specific organizations or repositories. Multiple organizations, repositories, and users can be assigned to one cost center.

When you create a cost center, you can add organizations or repositories—which track spending for usage-based products like GitHub Actions—via the user interface. To track spending for license-based products like GitHub Copilot, you will need to add users to the cost center via the API after the cost center has been created. For guidance by product, see Allocating spending to a cost center.

  1. In the top-right corner of GitHub, click your profile photo.

  2. Depending on your environment, click Your enterprise, or click Your enterprises then click the enterprise you want to view.

  3. On the left side of the page, in the enterprise account sidebar, click Billing & Licensing.

  4. Click Cost centers.

  5. Click New cost center in the upper-right corner.

  6. In the text box under "Name", enter a name for your cost center.

  7. If your account is billed to Azure, you have the option to add an Azure ID. Your credentials will be verified against Azure to ensure the Azure IDs associated to your account are available.

  8. If the cost center will track spending for usage-based products like GitHub Actions, under "Resources", select the organizations and/or repositories that will be a part of the cost center.

    Note

    An organization or repository can only be assigned to one cost center at a time.

  9. Click Create cost center.

Allocating spending to a cost center

To allocate spending to a cost center, you add repositories, organizations, or users to the cost center. Any usage that is not assigned to a specific cost center is categorized as "Enterprise Only" spending on your enterprise's "Usage" page.

  • For usage-based products like GitHub Actions, cost centers are charged based on the repositories or organizations that you add. You can add these to a cost center in the UI. See Creating a cost center.
  • For license-based products like GitHub Copilot, cost centers are charged based on the users that you add.
    • You must add users to a cost center with the API. See REST API endpoints for enterprise billing. Note that the API currently supports adding or removing up to 50 resources in a single operation.
    • If a licensed user isn't assigned to cost center, costs either default to "Enterprise Only" spending or are assigned to a cost center based on the user's organization membership. This depends on the product. For a detailed explanation, see Cost center allocation for license-based products.

Breakdown by product

ProductA cost center is charged if it contains this resource
GitHub ActionsThe repository or organization where the workflow runs.
GitHub CodespacesThe repository or organization where the codespace is created.
GitHub CopilotThe user who receives the license (priority), or the organization where they are a member.
Git Large File StorageThe repository or organization where Git LFS is used.
GitHub Advanced SecurityThe user who receives the license.
GitHub EnterpriseThe user who receives the license.
GitHub PackagesThe repository or organization that owns the package.

Adding a budget to a cost center

After you create a cost center, you can add a monthly budget and receive alerts from the cost center to monitor your spending and usage. See Preventing overspending.

Viewing cost center usage

You can view the usage of your cost centers and download the usage data for further analysis. See Gathering insights on your spending.

Viewing, editing, and deleting cost centers

You can view, edit, and delete cost centers to manage your business units effectively.

To add or remove members from a cost center, you can use the API. See REST API endpoints for enterprise billing.

  1. In the top-right corner of GitHub, click your profile photo.
  2. Depending on your environment, click Your enterprise, or click Your enterprises then click the enterprise you want to view.
  3. On the left side of the page, in the enterprise account sidebar, click Billing & Licensing.
  4. Click Cost centers.
  5. Select to the right of a cost center, then click View details, Edit, or Delete.
  6. Follow the prompts.

Effects of removing a member from a cost center

If you add a member to a cost center, any usage accrued (for example, a license) will immediately start being billed against the cost center. If you remove a member from a cost center, any usage from that point will be billed against the enterprise. For example:

  • On May 1st, an enterprise has three Copilot users. The charges for all three users ($39 each) are billed to the enterprise.
  • On May 10th, you create two cost centers: Cost Center 1 and Cost Center 2. User A and User B are assigned to Cost Center 1, and User C to Cost Center 2. Future charges for Users A and B go to Cost Center 1, and for User C to Cost Center 2.
  • On May 20th, you remove User A from Cost Center 1. From then on, User A's charges are billed to the enterprise, while User B's charges remain with Cost Center 1, and User C's charges with Cost Center 2.

The "Copilot Seats Used" tile on the "Overview" page will show fractional usage instead of whole numbers.

Effects of deleting a cost center

If a cost center is deleted, future usage of its resources will be charged to the enterprise. Usage before deletion is billed to the cost center until the end of the billing cycle.

You can still view the cost center even after you delete it. To do so, select the "Deleted" tab on the cost center page.

Cost center allocation for license-based products

To ensure your cost centers reflect spending as intended, it's important to understand how spending is allocated to cost centers for license-based products like GitHub Copilot, and how changes are reflected in your bill.

Cost center allocation for GitHub Copilot

  • If a user belongs to a cost center, all charges associated with the user are billed to the cost center.
  • If a user does not belong to any cost center, usage is billed to the organization where the user receives their Copilot license. If that organization is part of a cost center, the charges are billed to that cost center.
  • If the user receives access to Copilot through multiple organizations, one of the organizations is chosen at random each month to be billed, and the cost center that contains the organization is charged accordingly. See About billing for GitHub Copilot in your enterprise,

Cost center allocation for GitHub Advanced Security

  • If a user belongs to a cost center, all charges associated with the user is billed to the cost center.
  • If a user does not belong to any cost center, usage is charged to the enterprise's default payment method and grouped under "Enterprise Only" spending on the usage page.

Cost center allocation for GitHub Enterprise

  • If a user belongs to a cost center, all charges associated with that user are billed to the cost center.
  • If a user does not belong to any cost center, usage is billed to the enterprise's default payment method and grouped under "Enterprise Only" spending on the usage page.

How changes are reflected in cost centers

Adding or removing users from a cost center affects billing for license-based products in different ways.

  • For GitHub Copilot: A change to add or remove a user from a cost center is reflected the next day.
  • For GitHub Advanced Security: A change to add or remove a user from a cost center is reflected in the next billing cycle.
  • For GitHub Enterprise: A change to add or remove a user from a cost center is reflected the next day.

If a user is already part of a cost center and then receives a license, the license is immediately billed to the cost center.

If a user who already has a license is added to a cost center, the license will be billed to the cost center from the next billing cycle.

Example for license-based products

The following example illustrates how usage is assigned to cost centers for license-based products. Based on four licensed users, their organization membership, and how cost centers are set up, you will see how usage is allocated to cost centers.

The users

There are four users, each a member of one or more organizations in the enterprise.

UserOrganization membership
user-1org-1, org-2
user-2org-1
user-3org-1
user-4org-1, org-2

All users have a license for GitHub Copilot and GitHub Enterprise (GHE).

GitHub Advanced Security (GHAS) is enabled in org-1, where all users are active committers.

The cost centers

There are two cost centers in the enterprise, each with different users or organizations assigned.

Cost centerAssigned resources
Cost Center Auser-1, user-3
Cost Center Borg-1

user-2, user-4, and org-2 are not assigned to any cost center.

How usage is allocated

The following table illustrates how spending for each user is allocated to a cost center based on their membership of an organization or cost center. Any usage not assigned to a cost center is categorized as "Enterprise Only" spending.

Copilot chargesGHAS chargesGHE chargesExplanation
Cost Center Auser-1, user-3user-1, user-3user-1, user-3These users are assigned directly to the cost center.
Cost Center Buser-2, user-4These users aren't directly assigned to a cost center, so Copilot charges are assigned based on organization membership, whereas GHAS and GHE default to enterprise spending.
Enterprise Only (default)user-2, user-4user-2, user-4These users aren't directly assigned to a cost center, so GHAS and GHE default to enterprise spending.

Further reading