Managing tax identifiers

Learn how to manage tax identifiers.

Specifying a customer's type and adding any tax identifiers associated with the customer allows you to attach this data to a cart and helps ensure that Digital River's tax computations are accurate.

Customer type

Use the customerType parameter to differentiate between business and individual customers. Specifying a customer's type and adding any tax identifiers associated with a customer allows you to pass this data to a cart and helps ensure that Digital River's tax computations are accurate. See Attaching a tax identifier to a cart to learn how to set the customer's type.

Attaching a tax identifier to a cart

To attach a tax identifier, create a cart.

Optional. Send a GET /v1/shopper/me/carts/active/tax-registrations/schema request to get the tax-registrations JSON schema. You can use this schema when attaching the tax identifier to the cart.

curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/carts/active/tax-registrations/schema' \
--header 'authorization: Basic  ***\
...

Send a POST /v1/shopper/me/carts/active/tax-registrations request to attach the tax identifier to the cart. The following examples show the request body or response for customerType with the value of B for the business shopper and I for the individual shopper. You determine the value for the customerType enumerations in the schema when you attach it to the cart.

curl --location --request POST 'https://api.digitalriver.com/v1/shoppers/me/carts/active/tax-registrations' \
--header 'authorization: Basic ***\
...

If Global Tax ID Management is not enabled in Global Commerce, we return a 409 Conflict.

{
    "errors": [
        {
            "code": "vat-exemption-failure",
            "subcode": "vat-exemption-unavailable",
            "description": "Tax Exemption Rest of the World is not enabled on this site."
        }
    ]
}

Optional. Send a GET /v1/shopper/me/carts/active request to confirm the tax information is present. The following examples show the response for customerType with the value of B for a business shopper and I for an individual shopper.

Apply the source to the cart using one of the following options:

The following example shows the response body for the cart.

Removing a tax identifier from a cart

You can remove the tax identifier with or without specifying the cart identifier (cartId).

Removing a tax identifier with the cart identifier

To remove a tax identifier associated with a specific cart, use DELETE /v1/shoppers/me/carts/active/tax-registrations and include the cart identifier (cartId).

A successful response returns a 204 Not Content.

Removing a tax identifier without the cart identifier

To remove a tax identifier without a cart identifier, use DELETE /v1/shoppers/me/carts/active/tax-registrations.

A successful response returns a 204 Not Content.

If Global Tax ID Management is not enabled in Global Commerce, we return a 409 Conflict.

Last updated

Was this helpful?