Sets or updates the billing account associated with a project. You specify the new billing account by setting the billingAccountName in the ProjectBillingInfo resource to the resource name of a billing account. Associating a project with an open billing account enables billing on the project and allows charges for resource usage. If the project already had a billing account, this method changes the billing account used for resource usage charges.
Note: Incurred charges that have not yet been reported in the transaction history of the Google Cloud Console might be billed to the new billing account, even if the charge occurred before the new billing account was assigned to the project.
The current authenticated user must have ownership privileges for both the project and the billing account.
You can disable billing on the project by setting the billingAccountName field to empty. This action disassociates the current billing account from the project. Any billable activity of your in-use services will stop, and your application could stop functioning as expected. Any unbilled charges to date will be billed to the previously associated account. The current authenticated user must be either an owner of the project or an owner of the billing account for the project.
Note that associating a project with a closed billing account will have much the same effect as disabling billing on the project: any paid resources used by the project will be shut down. Thus, unless you wish to disable billing, you should always call this method with the name of an open billing account.
HTTP request
PUT https://cloudbilling.googleapis.com/v1/{name=projects/*}/billingInfo
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-14 UTC."],[[["\u003cp\u003eThis API updates the billing account associated with a specified project, enabling or changing billing for resource usage.\u003c/p\u003e\n"],["\u003cp\u003eTo successfully update the billing account, the user must have ownership privileges for both the project and the billing account.\u003c/p\u003e\n"],["\u003cp\u003eDisabling billing on a project is done by setting the \u003ccode\u003ebillingAccountName\u003c/code\u003e field to empty, stopping billable activity and potentially impacting application functionality.\u003c/p\u003e\n"],["\u003cp\u003eThe request should be a PUT request towards the \u003ccode\u003ehttps://cloudbilling.googleapis.com/v1/{name=projects/*}/billingInfo\u003c/code\u003e URL, and needs a defined project name.\u003c/p\u003e\n"],["\u003cp\u003eThe request and response bodies are instances of \u003ccode\u003eProjectBillingInfo\u003c/code\u003e, and the operation requires specific OAuth scopes for authorization.\u003c/p\u003e\n"]]],[],null,["# Method: projects.updateBillingInfo\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nSets or updates the billing account associated with a project. You specify the new billing account by setting the `billingAccountName` in the `ProjectBillingInfo` resource to the resource name of a billing account. Associating a project with an open billing account enables billing on the project and allows charges for resource usage. If the project already had a billing account, this method changes the billing account used for resource usage charges.\n\n*Note:* Incurred charges that have not yet been reported in the transaction history of the Google Cloud Console might be billed to the new billing account, even if the charge occurred before the new billing account was assigned to the project.\n\nThe current authenticated user must have ownership privileges for both the [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo) and the [billing account](https://cloud.google.com/billing/docs/how-to/billing-access).\n\nYou can disable billing on the project by setting the `billingAccountName` field to empty. This action disassociates the current billing account from the project. Any billable activity of your in-use services will stop, and your application could stop functioning as expected. Any unbilled charges to date will be billed to the previously associated account. The current authenticated user must be either an owner of the project or an owner of the billing account for the project.\n\nNote that associating a project with a *closed* billing account will have much the same effect as disabling billing on the project: any paid resources used by the project will be shut down. Thus, unless you wish to disable billing, you should always call this method with the name of an *open* billing account.\n\n### HTTP request\n\n`PUT https://cloudbilling.googleapis.com/v1/{name=projects/*}/billingInfo`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains an instance of [ProjectBillingInfo](/billing/docs/reference/rest/v1/ProjectBillingInfo).\n\n### Response body\n\nIf successful, the response body contains an instance of [ProjectBillingInfo](/billing/docs/reference/rest/v1/ProjectBillingInfo).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `https://www.googleapis.com/auth/cloud-billing`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/)."]]