Update project billing settings
How to update billing settings: This endpoint allows partial updates to project billing settings. Only the fields you provide will be updated; all other fields remain unchanged. The endpoint automatically merges your partial update with the current settings.
Invoice structure options:
- allowMixedBilling (true): Combined invoices - bill support efforts (by booked hours) and subscriptions on a single invoice
- allowMixedBilling (false): Split invoices - support invoices are generated separately from subscription invoices
Billing rules:
- bugsAreBillable: Set whether time spent on tasks with “Bug” activity can be billed to the customer
Default invoice recipient:
- invoiceContactId: Select a contact person from the customer organization (OrganizationMember ID). This person will be auto-filled when creating invoices, but can be changed during invoice creation. Set to null to remove the default recipient.
Billing version snapshots (Single projects only):
- billingProjectSnapshotId: Select which project version will be used as the basis for billing. Includes components, manual items, and products as agreed in that version.
- productsBillingProjectSnapshotId: Optionally select a separate version for billing subscriptions independently of the project scope. If empty, the main billing version is used automatically.
Permission requirements: Requires both Projects.edit AND Invoices.manage permissions to update billing settings.
PATCH
/projects/{id}/billing-settingsAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstring<uuid>requiredProject ID
Request body
requiredapplication/jsonallowMixedBillingbooleanControls invoice structure: true = combined invoices (support and subscriptions on one invoice), false = split invoices (support invoices generated separately). Optional field - if not provided, current value remains unchanged.
billingProjectSnapshotIdobject | nullProject version snapshot ID used as the basis for main billing. Only applicable for Single project type. The selected version determines what items and prices are included when generating invoices. Optional field - if not provided, current value remains unchanged.
bugsAreBillablebooleanDetermines whether time spent on tasks with "Bug" activity type can be billed to the customer. Optional field - if not provided, current value remains unchanged.
includeComponentsInBillingbooleanWhen true, component hours and amounts are included in estimates and invoices. When false, component totals are excluded. Optional field - if not provided, current value remains unchanged.
invoiceContactIdobject | nullDefault invoice recipient contact person from the customer organization (OrganizationMember ID). This person is auto-filled when creating invoices but can be changed during invoice creation. Set to null to remove the default recipient. Optional field - if not provided, current value remains unchanged.
productsBillingProjectSnapshotIdobject | nullProject version snapshot ID used for billing subscriptions independently of the main project scope. Only applicable for Single project type. If not set, the main billing version is used automatically. Optional field - if not provided, current value remains unchanged.
Responses
200Project billing settings updated successfully
successbooleanrequiredOperation success flag
400Invalid input - validation errors or missing required conditional fields
401Unauthorized - Invalid or missing authentication token
403User lacks Projects.edit or Invoices.manage permission
404Project not found or user does not have access
Request
curl -X PATCH "https://leadtime.app/api/public/projects/%3Cuuid%3E/billing-settings" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"allowMixedBilling": false,
"billingProjectSnapshotId": "123e4567-e89b-12d3-a456-426614174002",
"bugsAreBillable": false,
"includeComponentsInBilling": false,
"invoiceContactId": "123e4567-e89b-12d3-a456-426614174001",
"productsBillingProjectSnapshotId": "123e4567-e89b-12d3-a456-426614174003"
}'const response = await fetch("https://leadtime.app/api/public/projects/%3Cuuid%3E/billing-settings", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"allowMixedBilling": false,
"billingProjectSnapshotId": "123e4567-e89b-12d3-a456-426614174002",
"bugsAreBillable": false,
"includeComponentsInBilling": false,
"invoiceContactId": "123e4567-e89b-12d3-a456-426614174001",
"productsBillingProjectSnapshotId": "123e4567-e89b-12d3-a456-426614174003"
})
});import requests
response = requests.patch(
"https://leadtime.app/api/public/projects/%3Cuuid%3E/billing-settings",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"allowMixedBilling": False,
"billingProjectSnapshotId": "123e4567-e89b-12d3-a456-426614174002",
"bugsAreBillable": False,
"includeComponentsInBilling": False,
"invoiceContactId": "123e4567-e89b-12d3-a456-426614174001",
"productsBillingProjectSnapshotId": "123e4567-e89b-12d3-a456-426614174003"
},
)Response
{
"success": true
}Invalid input - validation errors or missing required conditional fields
Unauthorized - Invalid or missing authentication token
User lacks Projects.edit or Invoices.manage permission
Project not found or user does not have access