# Tax calculation inputs

To compute taxes, Digital River uses a wide range of data points. The following table lists attributes that affect both initial tax estimates and final tax amounts:

| Tax-relevant attribute    | Resource | Notes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `taxCode`                 | SKU      | The designated [tax code](https://docs.digitalriver.com/digital-river-api/product-management/creating-and-updating-skus#tax-code) of the product or service. Digital River uses the value you provide to classify the product as [digital or physical](https://docs.digitalriver.com/digital-river-api/product-management/creating-and-updating-skus#how-products-are-specified-as-physical-or-digital).                                                                                                                                                                                                                                                      |
| `shipFrom`                | Checkout | <p>Represents <a href="../providing-address-information#ship-from-address">the address from which the physical product is shipped</a>.<br><br>A customer <a href="../providing-address-information#determining-address-requirements">must provide this information</a> to successfully place an order that contains a physical product.</p>                                                                                                                                                                                                                                                                                                                   |
| `shipTo`                  | Checkout | <p>Represents an order's <a href="../providing-address-information#ship-to-address">ship to address</a>. Digital River uses this data to compute taxes on physical goods and (when the attribute is specified) on digital goods.</p><p>A customer <a href="../providing-address-information#determining-address-requirements">must provide this information</a> to successfully place an order that contains a physical product.</p><p>The data can also be inherited from a Customer object by <a href="../using-the-checkout-identifier#registered-checkouts">specifying a customer identifier</a> in the Checkout.</p>                                     |
| `shipping`                | Customer | <p>Represents a customer's <a href="../providing-address-information#ship-to-address">ship to address</a>. Digital River uses the data to compute taxes on physical goods and (when the attribute is specified) on digital goods.</p><p><br>You can pass the object's data to a Checkout by <a href="../using-the-checkout-identifier#registered-checkouts">specifying a customer identifier</a>. This fulfills the requirement to provide a <code>shipTo</code> value for physical goods even when the value is not explicitly set in the Checkout.</p>                                                                                                      |
| `purchaseLocation`        | Checkout | Use a [purchase location](https://docs.digitalriver.com/digital-river-api/integration-options/checkouts/creating-checkouts/setting-the-purchase-location) when customers have yet to supply either the Checkout's `shipTo` value that is [required to successfully submit an order for physical goods](https://docs.digitalriver.com/digital-river-api/integration-options/checkouts/providing-address-information#determining-address-requirements) or the [billing address](https://docs.digitalriver.com/digital-river-api/developer-resources/reference/digital-river-payment-objects#billing-address-object) that is necessary for digital goods.        |
| `sources[].owner.address` | Customer | <p>Represents a <a href="../../../../developer-resources/reference/digital-river-payment-objects#billing-address-object">billing address for a payment method</a> and is used to compute taxes on digital orders.</p><p>You set the address when <a href="../../../../developer-resources/reference/digitalriver-object#creating-sources">creating a source</a>.<br><br>However, when provided, the Checkout's<code>shipTo</code> value or the Customer's <code>shipping</code> value takes precedence over the billing address.</p>                                                                                                                          |
| `taxIdentifiers`          | Customer | Allows qualified customers to [purchase zero-rated goods](https://docs.digitalriver.com/digital-river-api/customer-management/setting-tax-related-attributes#tax-identifiers).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `taxCertificates`         | Customer | Allows qualified customers to [make tax exempt purchases](https://docs.digitalriver.com/digital-river-api/customer-management/setting-tax-related-attributes#tax-certificates).                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `type`                    | Customer | <p>Providing a <a href="../../../../customer-management/setting-tax-related-attributes#customer-type">customer type</a> allows you to support tax exemption and zero-rated purchases for <code>business</code> customers.<br><br>In most cases, setting the value to <code>individual</code> nullifies the use of <a href="../../../../customer-management/setting-tax-related-attributes#tax-identifiers">tax identifiers</a> and <a href="../../../../customer-management/setting-tax-related-attributes#tax-certificates">tax certificates</a> for tax computation purposes. These attributes, however, may still be used for reporting and invoicing.</p> |
| `customerType`            | Checkout | This attribute is equivalent to the [type attribute in the Customer](https://docs.digitalriver.com/digital-river-api/customer-management/setting-tax-related-attributes#customer-type) resource. However, the value [set in the Checkout](https://docs.digitalriver.com/digital-river-api/integration-options/checkouts/creating-checkouts/..#setting-checkout-attributes) always overrides the one in the Customer object.                                                                                                                                                                                                                                   |
| `taxInclusive`            | Checkout | Lets Digital River know whether to [subtract taxes from or add taxes to](https://docs.digitalriver.com/digital-river-api/integration-options/checkouts/creating-checkouts/configuring-taxes) the [price you specify](https://docs.digitalriver.com/digital-river-api/integration-options/checkouts/creating-checkouts/describing-the-items/price-of-an-item) for each SKU when [describing items](https://docs.digitalriver.com/digital-river-api/integration-options/checkouts/creating-checkouts/describing-the-items) in a Checkout.                                                                                                                       |

## Tax estimation and computation workflow

The following provides a high-level overview of how Digital River uses a [SKU's tax code](https://docs.digitalriver.com/digital-river-api/product-management/creating-and-updating-skus#tax-code) to classify a product as digital or physical.

![](https://334437993-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LqH4RJfLVLuHPXuJyTZ%2F-MbbAQ_IKrzQOdutWO7J%2F-MbbCizqOtKIb9jyCCGz%2FTax%20Calculation%20Workflow.png?alt=media\&token=6aab9b71-439c-45ab-a29d-4f237acf1f46)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalriver.com/digital-river-api/integration-options/checkouts/creating-checkouts/tax-calculations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
