# Customers and tax exemptions

This section's [checklist items](#integration-checklist) and [standards](#integration-standards) cover collecting information from [registered](https://docs.digitalriver.com/digital-river-api/integration-options/checkouts/creating-checkouts/using-the-checkout-identifier#registered-checkouts-or-invoices) and [guest](https://docs.digitalriver.com/digital-river-api/integration-options/checkouts/creating-checkouts/using-the-checkout-identifier#guest-checkouts-or-invoices) customers, as well as handling [tax identifiers](https://docs.digitalriver.com/digital-river-api/customer-management/setting-tax-related-attributes#tax-identifiers) and [tax certificates](https://docs.digitalriver.com/digital-river-api/customer-management/setting-tax-related-attributes#tax-certificates).

## Integration checklist

Click any checklist item to see more detail on how to meet the integration standard.

* [ ] [Does your platform allow customers to create a registered account?](#create-an-authenticated-customer)
* [ ] [Do you use your source system's unique customer identifier (UUID) as the Customer `id` when interfacing with the Customers API?](#ensure-customer-identifiers-match)
* [ ] [For US-based customers who request a tax-exempt purchase, do you provide the option to apply a tax certificate to the purchase?](#provide-customers-the-option-to-apply-a-tax-certificate)
* [ ] [Do you collect and save the necessary tax certificate information?](#collect-and-save-tax-certificate-information)
* [ ] [Do you provide the option for non-US-based customers to apply a tax identifier to the purchase?](#integrate-a-method-for-capturing-tax-identifiers)
* [ ] [Do you implement the necessary elements to collect and validate a customer's tax identifier information?](#collect-and-validate-tax-identifier-information)
* [ ] [Once a tax identifier is validated, do you save it to the customer's account?](#save-a-validated-tax-identifier-to-a-customers-account)

## Integration standards

These integration standards relate to customers and tax exemptions:

### Create an authenticated customer

Your integration must be able to [create a record](https://docs.digitalriver.com/digital-river-api/customer-management/creating-a-customer) for [registered customers](https://docs.digitalriver.com/digital-river-api/integration-options/checkouts/creating-checkouts/using-the-checkout-identifier#registered-checkouts-or-invoices) who represent either an [individual or a business](https://docs.digitalriver.com/digital-river-api/customer-management/creating-a-customer#customer-type). You can use this record to assign the customer a [default payment method](https://docs.digitalriver.com/digital-river-api/customer-management/creating-a-customer#default-payment-source), [shipping address](https://docs.digitalriver.com/digital-river-api/customer-management/creating-a-customer#shipping-address), and [locale](https://docs.digitalriver.com/digital-river-api/customer-management/creating-a-customer#locale). You can also attach [tax identifiers](https://docs.digitalriver.com/digital-river-api/customer-management/setting-tax-related-attributes#tax-identifiers) and [tax certificates](https://docs.digitalriver.com/digital-river-api/customer-management/setting-tax-related-attributes#tax-certificates) to the customer. A customer can also [request to be forgotten](https://docs.digitalriver.com/digital-river-api/customer-management/recording-a-request-to-be-forgotten).

### Ensure customer identifiers match

When you [create a Customer](https://docs.digitalriver.com/digital-river-api/customer-management/creating-a-customer), you can [specify a unique identifier](https://docs.digitalriver.com/digital-river-api/customer-management/creating-a-customer#unique-identifier) for that record. If you don't provide us with an identifier, we generate one for you and return it in the response.

We highly recommend that the customer identifier in your commerce system matches the identifier of its corresponding [Customer ](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/customers)in our system. This ensures that the customer is processed correctly during the checkout process.

### Provide customers the option to apply a tax certificate

[Business customers](https://docs.digitalriver.com/digital-river-api/customer-management/setting-tax-related-attributes#customer-type) in the United States with valid [tax certificates](https://docs.digitalriver.com/digital-river-api/customer-management/setting-tax-related-attributes#tax-certificates) may qualify for a tax exemption on their order. Before placing an order, your user interface should provide US-based customers the option to apply a tax certificate to their purchases.

### Collect and save tax certificate information

If customers indicate they want to apply a tax certificate to a purchase, you should provide a file upload prompt and collect the document. You should also ensure that customers enter the company name, relevant tax authority, start date, and end date displayed on the certificate.

If the customer supplies all the required information, [upload the document to Digital River's servers using the Files API](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/files/file-basics). Then, add the tax certificate to the customer's account, ensuring you send the required company, authority, start date, end date, and file identifier data in the request.

### Provide customers the option to apply a tax identifier <a href="#integrate-a-method-for-capturing-tax-identifiers" id="integrate-a-method-for-capturing-tax-identifiers"></a>

Some [business customers](https://docs.digitalriver.com/digital-river-api/customer-management/setting-tax-related-attributes#customer-type) have [tax identifiers](https://docs.digitalriver.com/digital-river-api/integration-options/checkouts/creating-checkouts/tax-identifiers) that allow them to purchase zero-rated goods. Before placing an order, your user interface should provide customers with the option to apply a tax identifier to a purchase.

### Collect and validate tax identifier information

If customers indicate they want to apply a tax identifier to a purchase, implement the t[ax identifier element](https://docs.digitalriver.com/digital-river-api/developer-resources/reference/elements/tax-identifier-element) to collect and validate the information.

### Save a validated tax identifier to a customer's account

Once you [validate a tax identifier](https://docs.digitalriver.com/digital-river-api/integration-options/checkouts/creating-checkouts/tax-identifiers#validating-tax-identifiers), your integration should [save the tax identifier to the customer's account](https://docs.digitalriver.com/digital-river-api/integration-options/checkouts/creating-checkouts/tax-identifiers#attaching-tax-identifiers-to-customers).

## API interfaces

| Documentation                                                                                                                       | Direct API                                                                                      | PHP SDK                                                                                                                |
| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [Customers](https://docs.digitalriver.com/digital-river-api/customer-management/customers)                                          | [Customers](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/customers)                           | [Customers](https://github.com/DigitalRiver/digital-river-php/blob/main/docs/Model/Customer.md)                        |
| [Tax attributes](https://docs.digitalriver.com/digital-river-api/integration-options/checkouts/creating-checkouts/tax-calculations) |                                                                                                 |                                                                                                                        |
| [Files](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/files/file-basics)                                                           | [Files](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/files)                                   | [Files](https://github.com/DigitalRiver/digital-river-php/blob/main/docs/Model/File.md)                                |
| [DigitalRiver.js](https://docs.digitalriver.com/digital-river-api/developer-resources/reference)                                    |                                                                                                 |                                                                                                                        |
| [DigitalRiver.js Drop-in](https://docs.digitalriver.com/digital-river-api/payments/payment-integrations-1/drop-in)                  |                                                                                                 |                                                                                                                        |
| [Country specs](https://docs.digitalriver.com/digital-river-api/integration-options/checkouts/creating-checkouts/country-specs)     | [Country specifications](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/country-specifications) | [CountrySpecification](https://github.com/DigitalRiver/digital-river-php/blob/main/docs/Model/CountrySpecification.md) |


---

# 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/general-resources/standards-and-certifications/integration-checklists/customers-and-tax-exemptions.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.
