# Sourcing and taxability of digital goods and SaaS in California

Source: https://developer.avalara.com/sales-tax-integration-guide/fgv7778580765226/

# Sourcing and taxability of digital goods and SaaS in California

Understand how AvaTax applies California taxability, destination sourcing, Direct Pay exemptions, and maintenance rules for digital goods and SaaS transactions.

In California, sales tax applies to SaaS, prewritten computer software, cloud infrastructure, and digital products across 51 Avalara tax codes.

Note

California SB 122 sales tax rules and the destination sourcing hierarchy apply to transactions dated January 01, 2027 and later. For transactions before this date, standard California taxability and sourcing rules apply.

When AvaTax calculates sales tax for California digital products and services, it applies these rules:

-   **Statutory billing address sourcing hierarchy**: AvaTax evaluates the purchaser's billing address (`billTo`) for remote digital sales instead of defaulting to the physical delivery address (`shipTo`).

-   **Direct Pay exemption threshold**: When an enterprise purchaser reaches $5,000,000 in qualifying annual digital spend with a seller and holds a California Direct Pay Permit, CDTFA Form BOE-442-DP or `entityUseCode: "J"`, the seller doesn’t collect sales tax on qualifying sales invoices.

## Destination sourcing hierarchy

For sales transactions with California digital goods, software, and SaaS tax codes, AvaTax resolves the sales tax calculation jurisdiction by using this statutory hierarchy:

-   **Tier 1, purchaser billing address, `billTo`**: AvaTax evaluates this address first for remote digital goods and SaaS. When a valid California billing address is provided, AvaTax sources the sales tax calculation to the `billTo` location.

-   **Tier 2, physical delivery address, `shipTo`**: AvaTax evaluates this address if Tier 1 isn’t provided or if the 1st-in-state rule applies.

-   **Tier 3, payment instrument mailing address or customer profile address**: AvaTax evaluates this address if higher-priority addresses are unavailable.

-   **Tier 4, deemed out-of-state**: If AvaTax doesn’t resolve a California address in the hierarchy, the line is deemed out-of-state and calculates $0.00 sales tax.

When AvaTax evaluates addresses in this hierarchy, it applies these address handling rules:

-   **First in-state rule**: The `billTo` priority rule applies only when the billing address is in California. If the `billTo` address is outside California and the `shipTo` address is in California, AvaTax sources the transaction to the California `shipTo` address.

-   **Missing `billTo` address fallback**: Omitting `billTo` in a sales transaction payload doesn't cause a calculation failure or reject the transaction. If `billTo` isn't passed, AvaTax falls back to `ShipTo` and returns an informational diagnostic message in the response `messages` array.

-   **Interim seller workaround (prior to January 01, 2027)**: For sellers whose connectors can't be updated to add `addresses.billTo` before January 01, 2027, Avalara's interim guidance is to pass the customer's validated billing address inside the `addresses.shipTo` payload for SaaS and digital lines.

-   **Mandatory software maintenance**: Mandatory maintenance contracts (SC100222) remain 100% taxable.

-   **Custom software**: Custom software (DC010100) remains exempt.

## Mixed invoices

For sales invoices that contain both digital products and physical goods, AvaTax evaluates each line item independently:

-   **Digital product lines** (`SW`, `DC`, `SC` tax codes) resolve sales tax by using the 4-tier hierarchy, sourcing to `billTo`.

-   **Tangible physical goods lines** continue to use standard physical delivery sourcing, `shipTo`.

## Sample transaction payloads

The following examples show request and response payloads for California digital products and maintenance agreements.

**Request payload: SaaS subscription with `billTo` address**

Use this payload to pass billing and delivery addresses for a California digital product transaction:

```
{
  "type": "SalesInvoice",
  "companyCode": "DEFAULT",
  "date": "2027-01-15",
  "customerCode": "CUST-ACME-CORP",
  "addresses": {
    "shipFrom": {
      "line1": "1 Market St",
      "city": "San Francisco",
      "region": "CA",
      "postalCode": "94105",
      "country": "US"
    },
    "shipTo": {
      "line1": "2600 Fresno St",
      "city": "Fresno",
      "region": "CA",
      "postalCode": "93721",
      "country": "US"
    },
    "billTo": {
      "line1": "1 Frank H Ogawa Plaza",
      "city": "Oakland",
      "region": "CA",
      "postalCode": "94612",
      "country": "US"
    }
  },
  "lines": [
    {
      "number": "1",
      "amount": 1000.00,
      "taxCode": "SW054003",
      "description": "Enterprise SaaS Cloud Subscription"
    }
  ],
  "commit": true
}
```

**Response payload: Destination sourcing resolved to `billTo`**

AvaTax calculates tax based on the Oakland jurisdiction, `billTo`, and returns a diagnostic message:

```
{
  "totalAmount": 1000.00,
  "totalTax": 102.50,
  "summary": [
    {
      "jurisName": "OAKLAND",
      "jurisType": "City",
      "rate": 0.1025,
      "tax": 102.50,
      "taxable": 1000.00
    }
  ],
  "messages": [
    {
      "summary": "CA SB 122 Destination Sourcing applied: billTo address utilized as Tier 1 precedence."
    }
  ]
}
```

## Expected behavior

To support California digital products and services, make sure that your integration supports the following behavior:

-   **Pass the `billTo` address**: Make sure that your checkout, order management, or billing system captures the customer's billing address and passes it in `addresses.billTo` at the sales transaction document or line level.

-   **Handle missing `billTo` gracefully**: If your integration doesn’t pass `billTo`, AvaTax resolves sales tax to `shipTo` and returns an informational diagnostic message in `messages[]`. Make sure that your integration logs or processes response messages without causing calculation failures.

-   **Interim connector guidance**: For legacy connectors that can't be updated before January 1, 2027, pass the customer's validated billing address in `addresses.shipTo` for digital and SaaS lines.

-   **Direct Pay Permit (`entityUseCode: "J"`) and exemption handling**: When applying Direct Pay exemptions, manage the exemption behavior at the document header or line level based on your transaction requirements:

    -   **Document or header level (Required for certification)**: Passing `entityUseCode: "J"` or CDTFA Form BOE-442-DP at the document header exempts all lines on the invoice from California sales tax. This is required baseline functionality. However, a header-only application isn't sufficient for complex or mixed billing scenarios where only specific digital goods or services qualify under the buyer's Direct Pay permit.
    -   **Line level (Suggested)**: To provide more granular seller control, connectors can support passing `entityUseCode: "J"` on individual transaction lines. This helps prevent nonqualifying tangible personal property, custom software, or separate service charges on mixed invoices from inheriting exempt status.
-   **Sandbox testing**: California SB 122 calculation rules and destination sourcing behavior will be available for partner testing in the AvaTax Sandbox environment on November 19, 2026.