Digital River uses a wide range of data points to compute taxes on an order. To ensure that we can provide an accurate tax total, we encourage you to provide as much of this data as possible.
The following table lists the attributes you can set that influence how Digital River computes both initial tax estimates and final tax amounts:
Tax-relevant attribute | Resource | Notes |
| SKU | The designated tax code of the product or service. Digital River uses the value you provide to classify the product as digital or physical. |
| Checkout | Represents the address from which the physical product is shipped. A customer must provide this information to successfully place an order that contains a physical product. |
| Checkout | Represents an order's ship to address. Digital River uses this data to compute taxes on physical goods and (when the attribute is specified) on digital goods. ​ A customer must provide this information to successfully place an order that contains a physical product. ​ The data can also be inherited from a Customer object by specifying a customer identifier in the Checkout. |
| Customer | Represents a customer's ship to address. Digital River uses the data to compute taxes on physical goods and (when the attribute is specified) on digital goods.
You can pass the object's data to a Checkout by specifying a customer identifier. This fulfills the requirement to provide a |
| Checkout | Use a purchase location when customers have yet to supply either the Checkout's |
| Customer | Represents a billing address for a payment method and is used to compute taxes on digital orders. ​ You set the address when creating a source.
However, when provided, the Checkout's |
| Customer | Allows qualified customers to purchase zero-rated goods. |
| Customer | Allows qualified customers to make tax exempt purchases. |
| Customer | Providing a customer type allows you to support tax exemption and zero-rated purchases for |
| Checkout | This attribute is equivalent to the type attribute in the Customer resource. However, the value set in the Checkout always overrides the one in the Customer object. |
| Checkout | Lets Digital River know whether to subtract taxes from or add taxes to the price you specify for each SKU when describing items in a Checkout. |
The following provides a high-level overview of how Digital River uses the SKU tax code to classify a product as digital or physical. This then determines the address requirements of the order. If these are met, taxes can be computed and the order can be placed. Otherwise, depending on the stage of the checkout process, the order is either blocked, or a tax estimate is provided to the customer.
As the workflow explains, a purchase location can generate a tax estimate when the customer has not yet provided a shipping or billing address. The following shows two simple create Checkout requests, with and without the purchaseLocation
value provided:
You're only required to provide a postalCode
for purchase locations within the United States.
curl --location --request POST 'https://api.digitalriver.com/checkouts' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer <API_key>' \--header 'Content-Type: text/plain' \--data-raw '{"currency": "USD","items": [{"skuId": "05081978","price": 100.00,"quantity": 1}]}'
curl --location --request POST 'https://api.digitalriver.com/checkouts' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer <API_key>' \--header 'Content-Type: text/plain' \--data-raw '{"currency": "USD","items": [{"skuId": "05081978","price": 100.00,"quantity": 1}],"purchaseLocation": {"country": "US","state": "MN","postalCode": "55116"}}'​
When the purchaseLocation
is provided, the response returns a tax estimate at both the item and the Checkout level:
{"id": "177375830336",..."totalAmount": 100.0,"subtotal": 100.0,"totalFees": 0.0,"totalTax": 0.0,"totalDuty": 0.0,"totalDiscount": 0.0,"totalShipping": 0.0,"items": [{"skuId": "05081978","amount": 100.0,"quantity": 1,"tax": {"rate": 0.0,"amount": 0.0}}],"purchaseLocation": {"country": "US","state": "MN","postalCode": "55116"},...}
{"id": "177374720336",..."totalAmount": 107.88,"subtotal": 100.0,"totalFees": 0.0,"totalTax": 7.88,"totalDuty": 0.0,"totalDiscount": 0.0,"totalShipping": 0.0,"items": [{"skuId": "05081978","amount": 100.0,"quantity": 1,"tax": {"rate": 0.07875,"amount": 7.88}}],"purchaseLocation": {"country": "US","state": "MN","postalCode": "55116"},...}