Setting up tax exemptions
Learn how to set the customer type, tax certificates, and tax identifiers.
When you create a registered checkout, Digital River uses that customer's type, tax identifiers, tax certificates, ship to address, and billing address in our tax computations.

Customer type

For more information on how a customer's type is used to calculate taxes, refer to the page on setting the customer type.

Tax identifiers (legacy)

In versions 2020-12-17 and earlier, use the legacy features described in this section to manage tax identifiers. If you're on versions 2021-02-23 and later, refer to the Tax identifiers page.
Some customers have tax identifiers that allow them to purchase zero-rated goods. If you want to provide customers the ability to apply tax identifiers to their purchases, your integration must first add the tax identifier to the customer's record. Once that operation is successfully completed, whenever the customer creates an applicable registered checkout, Digital River automatically attaches the tax identifier to the transaction.

Adding tax identifiers to customers

When you create or update a customer, you can add one or more tax identifiers. For each tax identifier you want to add, specify a type and a value. The enumerated types typically comprise a lowercase, two-letter country code. The value is dependent on the format used in each country.
You can use the tax identifier element to validate customer supplied data.
The following shows how to add multiple tax identifiers in a POST/customers/{id} request:
POST/customers/{id}
1
curl --location --request POST 'https://api.digitalriver.com/customers/987654321' \
2
--header 'Content-Type: application/json' \
3
--header 'Authorization: Bearer <API_key>' \
4
--data-raw '{
5
"taxIdentifiers": [
6
{
7
"type": "uk",
8
"value": "GB243609761"
9
},
10
{
11
"type": "nl",
12
"value": "NL002458380B62"
13
}
14
]
15
}'
Copied!
The response returns an array of tax identifiers that are now saved to the customer's record:
Customer
1
{
2
"id": "987654321",
3
...
4
"taxIdentifiers": [
5
{
6
"type": "uk",
7
"value": "GB243609761"
8
},
9
{
10
"type": "nl",
11
"value": "NL002458380B62"
12
}
13
],
14
...
15
}
Copied!

Replacing a tax identifier

A customer can't have multiple tax identifiers of the same type. So, if you'd like to attach a new tax identifier and it has the same type as a saved tax identifier, you must first delete the existing object.
To do this, submit a POST/customers/{id} request and set the value you'd like to replace to "".
Make sure you format value without white spaces.
POST/customers/{id}
1
curl --location --request POST 'https://api.digitalriver.com/customers/987654321' \
2
--header 'Authorization: Bearer <API_key>' \
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"taxIdentifiers": [
6
{
7
"type": "nl",
8
"value": ""
9
}
10
]
11
}'
Copied!
Then submit another POST/customers/{id} request with the original type and an updated value:
POST/customers/{id}
1
curl --location --request POST 'https://api.digitalriver.com/customers/987654321' \
2
--header 'Authorization: Bearer <API_key>' \
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"taxIdentifiers": [
6
{
7
"type": "nl",
8
"value": "NL001868214B01"
9
}
10
]
11
}'
Copied!

Supported tax identifiers

For a complete list, refer to the supported tax identifiers section on the Tax identifiers page

Tax certificates

You can build your integration so that eligible customers with valid tax certificates can make tax exempt purchases.

What customers are eligible

In most cases, customers that want to use a tax certificate must be a government agency, non-profit organization, or product reseller based in the United States.
In the US, almost all end users of a product are taxed. Government agencies and not-for-profits are the primary exceptions. Businesses are typically only tax exempt when reselling a product.

What transactions are eligible

In the Digital River APIs, tax certificates can only be used in registered checkouts. Additionally, the customer's record must contain a valid tax certificate whose taxAuthority matches the state of the transaction's shipping or billing address. If the purchase contains physical products, we compare taxAuthority to shipTo.address.state. For transactions that only contain digital goods, we compare taxAuthority to billTo.address.state.
For example, the following customer has multiple tax certificates. If this customer ships physical products to either Minnesota or Wisconsin, then those transactions will be tax-exempt. However, if the customer specifies a shipping address outside either of these two states, taxes will be applied.
Customer
Checkout (tax exempt)
Checkout (non-tax exempt)
1
{
2
"id": "543790170336",
3
...
4
"taxCertificates": [
5
{
6
"companyName": "Acme Inc",
7
"taxAuthority": "MN",
8
"startDate": "2021-04-07T00:00:00Z",
9
"endDate": "2022-04-07T00:00:00Z",
10
"fileId": "b87c6b64-e919-45d6-bf49-016bed76134a"
11
},
12
{
13
"companyName": "Beta Inc",
14
"taxAuthority": "WI",
15
"startDate": "2021-04-07T00:00:00Z",
16
"endDate": "2022-02-07T00:00:00Z",
17
"fileId": "542d9a68-8eb4-4bda-b3fb-67b68e9f6846"
18
}
19
],
20
...
21
}
Copied!
1
{
2
"id": "a3977c4e-948a-4ae8-b5c2-b5c5b052b0bd",
3
...
4
"customerId": "543790170336",
5
"currency": "USD",
6
...
7
"shipTo": {
8
"address": {
9
"line1": "10380 Bren Road W",
10
"city": "Minnetonka",
11
"postalCode": "55343",
12
"state": "MN",
13
"country": "US"
14
},
15
...
16
},
17
...
18
"totalAmount": 25.0,
19
"subtotal": 25.0,
20
"totalFees": 0.0,
21
"totalTax": 0.0,
22
"totalImporterTax": 0.0,
23
"totalDuty": 0.0,
24
"totalDiscount": 0.0,
25
"totalShipping": 5.0,
26
...
27
}
Copied!
1
{
2
"id": "885ed72a-2237-496f-a6ef-4f1050053324",
3
...
4
"customerId": "543790170336",
5
"currency": "USD",
6
...
7
"shipTo": {
8
"address": {
9
"line1": "2300 Southern Blvd",
10
"city": "New York",
11
"postalCode": "10460",
12
"state": "NY",
13
"country": "US"
14
},
15
...
16
},
17
...
18
"totalAmount": 27.22,
19
"subtotal": 25.0,
20
"totalFees": 0.0,
21
"totalTax": 2.22,
22
"totalImporterTax": 0.0,
23
"totalDuty": 0.0,
24
"totalDiscount": 0.0,
25
"totalShipping": 5.0,
26
...
27
}
Copied!

How we validate tax certificates

Since Digital River is the reseller of record, we subject every customer's tax certificate to a verification process. When customers supply their certificate information during a checkout, we issue a temporary tax exemption for that individual transaction.
During the review process, if we determine that a customer's document isn't a valid, state-accepted exemption certificate, we mark the account as in review. While in this state, certificates can't be used to make tax exempt purchases.
We then email the customer to request additional documentation. If the customer doesn't provide a valid certificate, we send another follow-up email. If that fails to produce the necessary documentation, we move the customer's certificate into an unapproved state. This means it won't be applied to future transactions.
On your site, we recommend that you inform customers that they might receive a follow-up email from Digital River about their tax certificate.
On the other hand, if our review determines that a certificate is valid, we automatically apply a tax exemption to all future, eligible transactions. However, once the tax certificate's endDate elapses, the exemption no longer applies.
No methods currently exist to query the APIs and determine the status of a tax certificate. Additionally, at this time, you can't subscribe to webhook events that notify you when a tax certificate's state is updated.

Collecting tax certificate information

If your site intends to offer tax exempt purchases, you must provide a form for customers to enter their certificate information. The form must contain fields to obtain:
  • The name of the company/organization/agency issued the tax exemption
  • The tax authority that issued the certificate
  • The start and end dates of the tax exemption
You must also provide customers a simple UI to upload a copy of their tax certificate file. After you collect this information, use it to first create a tax certificate file and then add the tax certificate object to the customer's record.
Customers must address their certificates of exemption to Digital River. This is because we act as the reseller of record. The correct address that the customer should provide depends on the selling entity that is facilitating the transaction. So, during the checkout process, use sellingEntity.id or sellingEntity.name to determine the appropriate address and then display that information to the customer:
sellingEntity.id
sellingEntity.name
Address disclosure
DR_INC-ENTITY
Digital River, Inc.
Please address exemption certificates to:
Digital River, Inc.
10380 Bren Road West
Minnetonka, MN 55343
C5_INC-ENTITY
DR globalTech Inc.
Please address exemption certificates to:
DR globalTech, Inc.
10380 Bren Road West
Minnetonka, MN 55343

Creating tax certificate files

Once customers upload their tax certificate to your system, submit a POST/files request to create a file in Digital River's system. In the request, make sure you set purpose to tax_document_customer_upload
From the response, retrieve the file's unique id and use it when adding the tax certificate to the customer.

Adding tax certificates to customers

After creating a tax certificate file, retrieve the customer's unique identifier and send it as a path parameter in a POST/customers/{id}. In the body of the request, use the taxCertificate block to set the companyName, taxAuthority, startDate , endDate, and fileId parameters.
Update customer
1
curl --location --request POST 'https://api.digitalriver.com/customers/541670080336' \
2
--header 'Content-Type: application/json' \
3
...
4
--data-raw '{
5
"taxCertificate":{
6
"companyName": "Acme Inc",
7
"taxAuthority": "MN",
8
"startDate":"2021-04-07T13:47:13Z",
9
"endDate":"2025-04-07T13:47:13Z",
10
"fileId": "9d149880-7306-49da-b37b-8440649ae9c2"
11
}
12
}'
Copied!

Company name

The companyName must indicate the name of the company or organization that has been granted the tax exemption.

Tax authority

Since tax certificates only apply to US-based customers, taxAuthority corresponds to the issuing state. The value you assign should be formatted to conform to the USPS two-letter state and possession abbreviation standard. These are the same abbreviations used in the ISO 3166-2 subdivision codes.

Start and end dates

The startDate and endDate values correspond to the issue and expiration dates of the tax certificate, respectively.
In the request, make sure startDate and endDate adhere to the date and time format used in the Digital River APIs.
Tax certificates, however, can be difficult to interpret. As a result, your customers might not be able to determine the appropriate dates to enter. In these cases, specify startDate as the first date of the current month and endDate as the last date of the current month. This allows us time to review the certificate, determine whether it's valid, and set the applicable dates.

File identifier

Retrieve the identifier of the tax certificate file that you created and use it to set fileID.

Adding multiple tax certificates to a customer

A customer can have multiple tax certificates. During the checkout process, we determine which (if any) are applicable.
When adding tax certificates to a customer's record, each POST/customers or POST/customers/{id} request that you send can only contain one tax certificate.
Customer
1
{
2
"id": "543790170336",
3
"createdTime": "2021-09-08T20:58:15Z",
4
"updatedTime": "2021-09-08T22:09:59Z",
5
...
6
"taxCertificates": [
7
{
8
"companyName": "Acme Inc",
9
"taxAuthority": "MN",
10
"startDate": "2021-04-07T00:00:00Z",
11
"endDate": "2022-04-07T00:00:00Z",
12
"fileId": "b87c6b64-e919-45d6-bf49-016bed76134a"
13
},
14
{
15
"companyName": "Beta Inc",
16
"taxAuthority": "WI",
17
"startDate": "2021-04-07T00:00:00Z",
18
"endDate": "2022-02-07T00:00:00Z",
19
"fileId": "542d9a68-8eb4-4bda-b3fb-67b68e9f6846"
20
}
21
],
22
"locale": "en_US",
23
"type": "business"
24
}
Copied!

Verifying the tax certificate exists

Once you add a tax certificate to the customer's record, send a GET/customers/{id} request and parse the response to verify the object has been successfully added to the taxCertificates array.
Customer
1
{
2
"id": "541670080336",
3
"createdTime": "2021-08-23T20:30:06Z",
4
"updatedTime": "2021-08-23T20:33:53Z",
5
...
6
"taxCertificates": [
7
{
8
"companyName": "Acme Inc",
9
"taxAuthority": "MN",
10
"startDate": "2021-04-07T00:00:00Z",
11
"endDate": "2025-04-07T00:00:00Z",
12
"fileId": "9d149880-7306-49da-b37b-8440649ae9c2"
13
}
14
],
15
"locale": "en_US",
16
"type": "business"
17
}
Copied!
Last modified 2mo ago