> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Setting up a contract

Setting up a contract has up to three parts (granting entitlements, generating invoices, or both) plus the legal entity invoices are billed from. Which parts apply depends on what the customer's order form covers.

To create a contract in the [Stigg app](https://app.stigg.io):

1. Start a contract from either entry point:
   * **Customers** > select a customer > **Contracts** > **+ Add**
   * Or go directly to the **Contracts** section, click **Add contract**, and select the customer the contract belongs to
2. Upload the signed order form (PDF, PNG, or JPG). There are no format requirements; Stigg stores it for reference alongside the contract.
3. Select how you want to start:
   * **Entitlement provisioning**: grant the customer access to features.
   * **Billing contract**: generate invoices.
   * **Both**

<Note>
  Create the contract only after the customer's account, organization, or workspace has already been provisioned in the application integrated with Stigg. Stigg adds metering, entitlement, and billing on top of resources that already exist in your application; it doesn't provision those resources itself.
</Note>

## Entitlement provisioning

Use this flow to grant customers access to features according to the negotiated terms.

Create a new [subscription](../subscriptions/provisioning-subscriptions), or select an existing subscription to link to the contract.

When creating a new subscription:

1. Select the product, plan, and relevant add-ons.
2. Specify the entitlement values according to the uploaded order form.
3. Click **Create**.

The customer now has access to the corresponding features.

<Note>
  Contract provisioning only supports [custom plans](../../modeling-your-pricing-in-stigg/plans/custom-plans) and their add-ons. Self-service plans are not currently supported.
</Note>

## Billing contract set up

Use this flow to generate invoices for the contract.

1. Set the customer's billing address (country, city, zip, full address). This appears on generated invoices as the customer's address, separate from the biller's own address, which you'll configure below in [Billing settings](#billing-settings).
2. Specify the billing contract terms: **currency**, **contract length**, and **default payment terms**. These apply to invoices generated from the contract unless overridden per line item.
3. Add contract line items: select existing items from your Stigg product catalog, or add items that aren't directly associated with entitlements, such as a setup fee or support. When a metered feature is selected, Stigg automatically includes reported usage in generated invoices.

For each line item, specify:

1. **Quantity**: fixed or usage-based.
2. **Billing mode**: in advance or in arrears.
3. **Pricing model**.
4. **Billing cycle**: one-time, monthly, quarterly, yearly, or custom.
5. **Price**.
6. **Advanced settings**:
   * **Minimum fee**
   * **Discount** (%)
   * **Tax** (%)
   * **Consolidation**: whether to consolidate the line item into the contract's main invoice (default), or bill it on a separate invoice. A separate invoice can have its own **payment terms** and its own **invoice anchor** (the date its billing cycle starts from, instead of following the main contract's schedule).

<Note>
  If a billing contract is created after entitlements have already been granted, the line item quantity is prefilled automatically from the linked subscription.
</Note>

## Billing settings

Select or create the **legal entity** used to bill the customer: company name, logo, billing address, VAT ID, and billing details (bank account, etc.). This information appears on every invoice generated from the contract, including the logo.

See [Managing the legal entity](./legal-entity) for the full set of fields and how to manage legal entities across contracts.

## Review and publish

Before publishing, review a summary of the contract:

* **Recurring charge**, **year 1 billing**, and **total contract value** (the latter two exclude usage-based charges, since those depend on actual consumption)
* The **first invoice** the contract will generate, broken down into recurring charges, base charges, and the total
* The **invoice schedule**: how many invoices the contract will generate, whether usage is billed in advance or in arrears, and the date of the first and last invoice
* **Cash inflows**: a chart of committed billing across the contract term (excluding usage)

Publishing the billing contract sets it as **active**.


## Related topics

- [Overview](/documentation/managing-customers-and-subscriptions/contracts/overview.md)
- [Setting up governance](/documentation/governance/setting-up.md)
- [HubSpot](/documentation/native-integrations/crm/hubspot/index.md)
