Beruflich Dokumente
Kultur Dokumente
PUBLIC
2020-02-10
4 Concepts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5 Initial Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.1 Onboarding to SAP Localization Hub, Tax Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Prerequisites for Onboarding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1. Enable the Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
2. Check Whether Applications Have Been Subscribed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3. Check Whether Destinations Have Been Created. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4. Register OAuth Clients to Access the HTML5 and Java Applications. . . . . . . . . . . . . . . . . . . . 16
5. Update the Destinations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6. Update Trust Management Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7. Mail Us the Metadata. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.2 Become an SAP Localization Hub, Tax Service Partner. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1. Integrating the Tax Service and Partner Service APIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2. Certifying the APIs Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3. Becoming part of the SAP PartnerEdge Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4. Getting a Support Cooperation Agreement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5. Publishing Partner Service on SAP App Center. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
8 Development. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
8.1 Build the Base URL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
11 Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
11.1 Security Aspects of Data, Data Flow and Processes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
User Administration and Authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
User Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
User Data Synchronization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
11.2 Authorizations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Customer Data Termination. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Tax Service API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Role-Based Authorizations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Tax Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Batch Upload UI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Tax Service Simulator Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Audit Logger. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Partner Service Framework. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
SAP Localization Hub, tax service helps you to determine and calculate applicable country/region-specific
indirect taxes. The tax service comes with sample tax determination and calculation content, and increases
automation in tax-relevant transactions. The tax service also includes a partner framework that allows you to
integrate partner tax solutions.
Note
The tax service is intended for use by taxable persons, as defined by the tax authorities, and is not intended
for organizations such as government bodies or nonprofit organizations (NPO).
Environment
Features
Determine and Support legal compliance by using the tax service. The service contains sample tax
calculate indirect content like tax rates and tax types. The service uses the tax content to determine and
taxes calculate applicable country/region-specific taxes on business transactions.
Maintain tax Use the tax attributes of master data to influence the tax calculation process. After
attributes of master you upload the master data, such as for products and customers, the tax service uses
data the data for business operations related to the affected master data.
Use partner tax Conduct business operations in countries or regions that are not supported by the
solutions standard tax service. If you have business operations in these countries or regions,
you can integrate partner tax solutions.
Log data for auditing Meet requirements for tracking and auditing purposes using the logs that the tax
purposes service stores for all requests sent to - and responses received from - the tax service.
The following table describes the purpose of the Java and HTML5 applications and APIs in the graphic.
HTML5 managetaxconfiguration View tax rates and configure the tax cal
culation engines, such as those pro
vided by partners, that you want to use.
The application is called by an SAP Fiori
Launchpad.
Related Information
Techni
cal Envi Availa
Com Capa ron ble as
ponent bility ment Title Description Type of
Techni
cal Envi Availa
Com Capa ron ble as
ponent bility ment Title Description Type of
Tax Globali Neo Enable You can now use master data attributes to calculate taxes when New 2018-1
Service zation Use of you're using the partner calculation engine. 2-22
Master
For more information about how to maintain master data and the
Data
partner service, see the following links:
with
Part ● Maintain Tax Attributes of Master Data [page 96]
ners ● Maintain Partner Service Framework [page 119]
Service
Tax Globali Neo Im If you store tax-relevant master data attributes in the tax service, Chang 2018-11
Service zation proved the performance of the tax service has improved. To benefit from ed -21
Per the performance improvements, do the following in the SAP Cloud
for Platform cockpit:
mance
● Update the TAXCONFIGURATION HTTP destination
for
● In the trust settings, set the value of Force Authentication to
Master
Disabled
Data
Sce
nario
Tax Globali Neo Region The tax service is now available in the US East (Sterling) (neo- New 2018-1
Service zation Availa us3) region. 0-27
bility
Tax Globali Neo Cache The tax service can now save your selection of SAP partner serv New 2018-1
Service zation for SAP ice for each country in the cache. 0-27
Partner
For more information, see SAP Partner Service Framework Cache
Service
[page 122].
Frame
work
Concept Definition
Example
You are a company that purchases goods from a sup
plier. You and the supplier are business parties.
business transaction A business activity that requires the calculation of any appli
cable indirect taxes.
Example
The sale of goods by a supplier to a customer or con
sumer.
Example
In the United States, when a company sells a certain
kind of goods to a business partner in a neighboring
state, the business transaction can be exempt from local
jurisdiction tax, but not from federal sales tax.
indirect tax A tax that is levied on the sale or purchase of goods or serv
ices and paid by the consumer as part of the purchase price.
The supplier of the goods or services collects the tax and re
mits it to the government.
jurisdiction code A code that specifies to which tax authorities sales tax is to
be paid and which amount of sales tax is to be paid.
Example
In some countries, such as Brazil, India, Canada, and the
USA, sales tax is paid on a local level and on a national
level. The tax calculation process must reflect the multi
ple levels of local taxation in addition to the national
taxes. To make this possible, the jurisdiction code is
used in addition to the tax code.
Partner Service Framework A tax engine hub that enables you to connect external tax
engines that are provided by partners.
tax code A two-digit code that represents the specifications used for
calculating and displaying taxes.
tax deductibility Defines whether purchase taxes can be claimed from the tax
authorities. Purchase taxes can be deducted fully, partially,
or not at all.
Example
VAT refunds are not permitted for some categories of
expenses. In Germany, examples of these categories are
expenses for nonbusiness use, which means that the
use for business purposes is less than 10%, or expenses
for gifts to people who are not employees of the taxable
person.
Example
The domestic purchase of goods at the standard rate.
tax rate type The identifier for the different types of tax rates that can ap
ply in a particular country or region. A tax rate type can be
standard, reduced, or zero. The identifier is used to classify
the type, rather than actual rate, since the rate is subject to
changes.
Example
For value-added tax (VAT), a government can define a
standard rate and a reduced rate that applies to certain
products.
tax type The identifier for the different types of taxes that apply in a
particular country or region.
Example
Value-added tax (VAT), sales and use tax, goods and
services tax (GST).
A range of steps are required before you can consume the tax service. If you want to provide partner tax
solutions for the tax service, you must complete steps to become an official partner.
Related Information
To be able to use the tax service, you must complete some steps in the SAP Cloud Platform cockpit.
To be able to use the tax service, you need an account on SAP Cloud Platform. To try out the basic functions for
nonproductive purposes, you can sign up for a trial account.
To see how to sign up for the different account types, see the following:
Related Information
To be able to use the service, you enable it in the service catalog of the SAP Cloud Platform cockpit.
Context
Tip
For more information about services in the Neo environment, see Using Services in the Neo Environment.
Procedure
1. In your subaccount, choose Services in the left pane and search for tax service.
If you don't know which entity in the cockpit is your subaccount, see Navigate to Global Accounts and
Subaccounts [AWS, Azure, or GCP Regions].
2. Choose the tile for the tax service and then choose Enable.
When you enable the service, the system subscribes your account to the required applications and creates
destinations. You check and adjust some of the details in subsequent steps.
When the service is enabled, the status of the service appears as follows:
Note
Wait until the service is enabled before you proceed to the next step.
When you enable the service, a number of steps are carried out automatically. One of the steps is the
subscription to Java applications. In this step, you confirm that the required subscriptions exist in your
subaccount.
Procedure
1. Go to the main menu of the SAP Cloud Platform cockpit by choosing your subaccount in the breadcrumb
at the top of the cockpit:
State Application
taxconfiguration
taxservice
4. Check whether the following HTML5 applications are subscribed with a tick at the start of each row:
State Application
managetaxconfiguration
simulationui
taxconfigbatchuploader
5. If the applications are all subscribed, proceed with the next step, in which you check whether the required
destinations exist.
When you enable the service, a number of destinations are created automatically. Let's take a moment to make
sure that all the required destinations have been created in your subaccount.
Procedure
1. In the left pane of the SAP Cloud Platform cockpit, choose Connectivity Destinations .
2. Check whether the following destinations appear:
3. If the destinations are all present and correct, proceed with the next step, in which you register OAuth
clients.
With the tax service, you can use a range of HTML5 applications and Java applications that call the Tax Service
and Tax Configuration APIs. In this section, you set up the authentication process.
Context
Tip
To make it easier to get the URI that you need for two of the client ID settings, open a second session of the
SAP Cloud Platform cockpit in a new browser tab or window.
In the new session, choose Applications Subscriptions in the left pane. Keep this session to one side
and return to the original session for the subsequent steps.
Destinations are the interface between Java and HTML5 applications. The OAuth clients pass through the
destinations. You register OAuth clients to generate a bearer token during the service runtime. A valid bearer
Procedure
1. In the left pane of the SAP Cloud Platform cockpit, choose Security OAuth .
2. In the main frame, choose the Clients tab.
Field Entry
Example
taxserviceuser
Note
The first part of the entry in the dropdown is the tech
nical name of the subaccount.
ID Replace the default ID with the entry that you made in the
Name field.
Example
taxserviceuser
Note
You use this password to call the Tax Service API.
Token Lifetime Remove the default entry and leave the field blank.
Field Entry
Example
taxserviceui
Note
The first part of the entry in the dropdown is the tech
nical name of the subaccount.
ID Replace the default ID with the entry that you made in the
Name field.
Example
taxserviceui
Note
You use this password in the taasSimulation desti
nation later in the onboarding process.
Redirect URI To get the URI, go to the second session of the SAP Cloud
Platform cockpit that you opened for displaying the sub
scriptions. Under Subscribed Java Applications, choose
the taxservice application.
Token Lifetime Remove the default entry and leave the field blank.
Refresh Token Lifetime Remove the default entry and leave the field blank.
Field Entry
Example
taxconfiguser
Note
The first part of the entry in the dropdown is the tech
nical name of the subaccount.
ID Replace the default ID with the entry that you made in the
Name field.
Example
taxconfiguser
Note
You use this password to call the Tax Configuration
API.
Token Lifetime Remove the default entry and leave the field blank.
Field Entry
Example
taxconfigui
Note
The first part of the entry in the dropdown is the tech
nical name of the subaccount.
ID Replace the default ID with the entry that you made in the
Name field.
Example
taxconfigui
Note
You use this password in the TaasForGUI destination
later in the onboarding process.
Redirect URI To get the URI, go to the second session of the SAP Cloud
Platform cockpit that you opened for displaying the sub
scriptions.Under Subscribed Java Applications, choose the
taxconfiguration application.
Token Lifetime Remove the default entry and leave the field blank.
Refresh Token Lifetime Remove the default entry and leave the field blank.
The next step is to update the destinations that were created when you enabled the service.
Context
Tip
To make it easier to get the user and password that you enter in the destination configuration settings,
before proceeding with the following steps, open a second session of the SAP Cloud Platform cockpit in a
new browser tab or window. Leave the current session as it is so that you can come back to the OAuth
settings without additional navigation.
In the new session, go to the destinations by choosing Connectivity Destinations in the left pane.
You update the TaasForGUI and taasSimulation destinations using the data that you entered for the OAuth
clients in 4. Register OAuth Clients to Access the HTML5 and Java Applications [page 16]:
● The TaasForGUI destination is used with the taxconfigui OAuth client for the taxconfiguration
subscription.
● The taasSimulation destination is used with the taxserviceui OAuth client for the taxservice
subscription.
Note
Since the third destination, TAXCONFIGURATION, uses AppToAppSSO authentication, you don't need to
configure anything in that destination.
1. In the row that contains TaasForGUI, choose the pencil icon in the Actions column:
2. Scroll down to the Destination Configuration section and update or enter the data in the following fields
only. Leave all other fields as they are. The data you need to refer to in section 4 of this guide if for the
taxconfiguration Java application, for which we gave taxconfigui as an example name in section 4 of
this guide.
Field Entry
Client Key Enter the name that you specified in the Name and ID
fields for the taxconfiguration Java application. The
example in the documentation is taxconfigui.
Token Service User Enter the name that you specified in the Name and ID
fields for the taxconfiguration Java application. The
example in the documentation is taxconfigui.
Token Service Password Enter the password that you entered in the Secret field.
Now it's time to update the taasSimulation destination. To do that, you need the details for the
taxserviceui OAuth client for the taxservice subscription that you registered in 4. Register OAuth
Clients to Access the HTML5 and Java Applications [page 16].
4. Scroll back up to the overview table of destinations. In the row that contains taasSimulation, choose the
pencil icon in the Actions column:
5. Scroll down to the Destination Configuration section and update or enter data in the following fields only.
Leave all other fields as they are. The data you need to refer to in section 4 of this guide is for the
taxservice Java application, for which we gave taxserviceui as an example name.
Field Entry
Client Key Enter the name that you specified in the Name and ID
fields for the taxservice Java application. The example
in the documentation is taxserviceui.
Token Service User Enter the name that you specified in the Name and ID
fields for the taxservice Java application. The example
in the documentation is taxserviceui.
Token Service Password Enter the password that you entered in the Secret field.
You're almost done. There are just two more steps to complete the onboarding process.
To enable the communication between HTML5 and Java applications, you make a trust management setting
related to authentication.
Context
This setting is quick and easy. You don't need to copy settings from different parts of the SAP Cloud Platform
cockpit this time, so use whichever browser window or tab you're currently working in.
Procedure
1. In the left pane of the SAP Cloud Platform cockpit, choose Security Trust .
2. The Local Service Provider tab should be selected by default. If it isn't for whatever reason, choose that tab.
3. Choose Edit and change the value of the following fields:
Field Entry
4. Save your entries. That's all you need to do for this step.
The final step requires you to send us a mail with a metadata file attached.
To enable your subscriber account to access the applications, we need some metadata about your account in
the form of an XML file.
Context
To get the file that we need you to send us, you change one of the trust management settings briefly, before
reverting it to its previous state.
Continue these steps where you left off in 6. Update Trust Management Settings [page 22], which is on the
Local Service Provider tab in Trust Management.
Procedure
1. Choose Edit and change the value of the Configuration field to Custom.
2. Choose Save and confirm the alert about proceeding to configure the trusted identity provider settings.
3. Below the Edit button, choose Get Metadata:
We come back to this file in just a moment. First, reinstate the previous settings.
4. Choose Edit and change the value of the Configuration field back to Default.
5. Save your entries.
Tip
In the e-mail, we ask for the technical name of your subaccount. If you don't know the technical name,
choose the subaccount name in the breadcrumb at the top of the SAP Cloud Platform cockpit to see
the subaccount information.
After we receive your e-mail, we'll complete the subscriber onboarding process by creating an SAP HANA
database schema for the subscriber and enable trust management in the provider account.
When we've done that, we'll send you a confirmation e-mail. Allow two working days for this part of the
process.
Before you can start the Become an SAP Localization Hub, Tax Service Partner process, contact Jacqueline
Sporleder Becker and Joe A. Kattackal.
To become an official tax service partner, follow the steps shown in flowchart figure below:
Note
● 1. Integrating the Tax Service and Partner Service APIs [page 25]
● 2. Certifying the APIs Integration [page 25]
● 3. Becoming part of the SAP PartnerEdge Program [page 25]
● 4. Getting a Support Cooperation Agreement [page 25]
● 5. Publishing Partner Service on SAP App Center [page 26]
The tax service calls partners HTTPS Rest services. Therefore, you need to create the mapping between the tax
service and the partner service APIs.
See the tax service API documentation in the SAP API Hub .
You can get SAP support on completing the integration from the SAP Co-innovation Labs (COIL).
Procedure
Once you complete the integration between the tax service and partner service APIs, certify your solution with
the API Integration and Certification Center (SAP ICC).
Procedure
See information on how to become part of the SAP PartnerEdge program at Become an SAP Partner
Procedure
To provide support with SAP Key Performance Indicators (KPIs), sign a support cooperation agreement. This
agreement grants support from SAP and access to SAP Resolve tool to provide support to customer incidents.
When you publish your service at SAP App Center, SAP customers can access your service and subscribe to it.
Procedure
In this section, you can display the tax rates per country/region, find sample payloads of a range of sample
scenarios, and see the countries/regions for which you can use the tax service.
Related Information
You can view the tax types and corresponding tax rates per country that the tax service uses to calculate taxes
during sales or purchase operations.
Prerequisites
You have onboarded to the tax service. See Onboarding to SAP Localization Hub, Tax Service [page 13].
Procedure
1. In the SAP Cloud Platform cockpit, access the subaccount in which you have subscribed to the tax service.
There are key scenarios in which you can calculate indirect taxes with the tax service.
Note
The tax service is intended for use by taxable persons, as defined by the tax authorities, and is not intended
for organizations such as government bodies or nonprofit organizations (NPO).
The service does not support import and export processes, and it considers all goods as in the customs
cleared status. It is assumed that the purchaser is the importer of the goods and services.
This section describes the roles that are significant for assessment of tax in the tax service.
A business party is an entity involved in the business transaction. It could be, for example, a company, a
supplier, a customer, or a consumer.
The roles refer to the different business parties involved in the business transaction and their location. See
below a list of the most common roles:
The tax service considers all business parties and invokes the decision tree for all involved countries. During the
decision process, the SHIP_FROM and SHIP_TO roles are mandatory. If additional roles are provided, the
service also considers them in the processing.
The business party roles are sent to the tax service through the Type parameter under Locations. The location
address is sent through the address parameters along with the Type parameter under Locations.
Tax registration information for the roles in the respective location, is sent through the
isCompanyTaxRegistered parameter for the company and the isBusinessPartnerTaxRegistered for the supplier/
customer/consumer involved in the business transaction.
Sample "Location"
"Locations":
"type": "SHIP_FROM",
"addressLine1":"Bedfont Road",
"city": "Feltham",
"country":"GB",
"isCompanyTaxRegistered":"Y" ,
"isBusinessPartnerTaxRegistered":"Y"
},{
"type": "SHIP_TO",
"City":"Birmingham",
"country":"GB" ,
"isCompanyTaxRegistered":"Y" ,
"isBusinessPartnerTaxRegistered":"Y"
"type": "CONTRACT_FROM",
"city": "Feltham",
"country":"GB",
"isCompanyTaxRegistered":"Y" ,
"isBusinessPartnerTaxRegistered":"Y"
},{
"type": "CONTRACT_TO",
"City":"Birmingham",
"country":"GB" ,
"isCompanyTaxRegistered":"Y" ,
"isBusinessPartnerTaxRegistered":"Y"
This document describes how the tax service provides information for audit trail purpose.
The tax service provides a user interface to display available tax rates, for the supported countries. The tax
service also logs the request and responses for a tax calculation. The tax rates are time dependent and the user
can view applicable tax rates along with their validity period.
SAP Localization Hub, tax service logs each request call and the response whenever the tax calculation is
triggered. This serves as a log for tax determination results. These recorded details can also be used to keep
track of the application usage. The audit logs are also archived for future use.
Note
● The detailed log of rules applied for each tax calculation is currently not logged in the tax service.
● Currently, the service does not provide a backup feature, and the details are saved directly to the table
in the application database.
Example
Send a PUT request from postman client to accessToMasterData value to true or false. For this specific
output, specify the payload as updated configuration object. https://<ApplicationURL>/TaxService/
SaveConfig?account=W93ADC6A7&key=accessToMasterData&v alue=true information such as
request type is PUT, request response is updated configuration object and so on, along with the request URL is
saved in the database
This scenario describes how the tax service determines taxes in Brazil for an intrastate transaction between
the manufacture of goods and a retail company which intends to resale the acquired product. This is relevant
for when the customer is in the same region as that of the business place (plant) from which the goods are
sold. For example, the sale of an item from region Rio Grande do Sul (RS) to a consumer located in the same
region (RS). The tax calculation rules differ from interstate sales, when the customer is located in a different
region within Brazil.
Note
Since the localization of taxes for Brazil is not supported by the standard calculation engine, the solution
requires a third party SAP partner for the execution of this scenario and the response message can vary
depending on the SAP partner’s interpretation of the law. See a list of the countries that are supported by
the standard calculation in Supported Countries/Regions [page 76].
The scenario is a sales operation that happens inside the same state (intrastate sale) of a manufactured
material for resale purpose, to a company that is a contributor of the Imposto sobre Operações relativas à
Circulação de Mercadorias e Prestação de Serviços de Transporte Interestadual e Intermunicipal e de
Comunicação (ICMS) and is not a contributor of the ICMS Substituição Tributária (ICMS-ST) for the same
product.
Besides the tax rates and tax base that are relevant for the tax calculation, the SAP partner determines some
other fiscal data such as the Código Fiscal de Operações e Prestações (CFOP), Código de Situação Tributária
(CST) codes and Código de Enquadramento Legal do Imposto Sobre Produtos Industrializados (IPI CENQ)
codes. In the example below, notice that CFOP 5401 has been determined for this resale scenario.
Besides the CNAE codes, other attributes described below in the request payload play an important part in
determining the correct tax information by the SAP partner tax calculation engine
Note
The legalProvision descriptive tax can differ between different SAP partners, nevertheless it provides
the legal provision that justifies an exemption of base reduction of taxes. The SAP partner tax calculation
engine can use the tax attributes provided in the request payload by the tax service in different ways, but
the result must always be in line with the law.
{ {
"id": "total": "132.24",
"248A07BD40B01ED882CDA10ADB7A857B", "subTotal": "132.24",
"date": "totalTax": "132.24",
"2018-02-05T13:06:45.000Z", "taxLines": [{
"saleorPurchase": "s", "id": "000010",
"operationNatureCode": "S", "totalTax": "107.88",
"grossOrNet": "n", "taxcode": "5401",
"currency": "BRL", "taxValues": [{
"Items": [{ "rate": "12.00",
"id": "000010", "taxable": "132.24",
"itemCode": "MAT-33030020", "name": "Imposto sobre
"itemType": "M", Produtos Industrializados",
"quantity": "1.000", "value": "15.87",
"unitPrice": "100.00", "exemptedBaseAmount":
"itemClassifications": [{ "0.00",
"exemptedBasePercent":
"itemStandardClassificationSystemCo "0.00",
de": "cest", "otherBaseAmount": "0.00",
"taxTypeCode": "IPI",
"itemStandardClassificationCode": "taxAttributes": [{
"2000800" "attributeType":
}, "CENQ",
{ "attributeValue": "999"
},
"itemStandardClassificationSystemCo {
de": "ean", "attributeType": "CST",
"attributeValue": "50"
"itemStandardClassificationCode": }
"9999999999999" ],
}, "isTaxDeferred": false,
{ "withholdingRelevant":
false
"itemStandardClassificationSystemCo },
de": "ncm", {
"rate": "25.00",
"itemStandardClassificationCode": "taxable": "58.19",
"33030020" "name": "Imposto sobre
} Comercialização de Mercadorias e
], Serviços",
"additionalItemInformation": [{ "value": "14.55",
"type": "materialOrigin", "exemptedBaseAmount":
"information": "5" "74.05",
}, "otherBaseAmount": "0.00",
{ "exemptedBasePercent":
"type": "ownProduction", "56.00",
"information": "Y" "taxTypeCode": "ICMS",
}, "taxAttributes": [{
{ "attributeType": "CST",
"type": "usage", "attributeValue": "70"
"information": "R" },
} {
] "attributeType":
}], "legalProvision",
"Locations": [{ "attributeValue":
"type": "SHIP_FROM", "Redução de base de cálculo
"addressLine1": "Avenida ABC conforme Artigo 23, inciso LXVI,
456", do Livro I do RICMS/RS"
"zipCode": "90480-000", },
"city": "Porto Alegre", {
"state": "RS", "attributeType":
"country": "BR" "baseDetermination",
}, "attributeValue": "3"
{ }
"type": "SHIP_TO", ],
"addressLine1": "Avenida ABC },
123", {
"zipCode": "90480-000", "rate": "2.20",
"city": "Porto Alegre", "taxable": "132.24",
"state": "RS", "name": "Programa de
"country": "BR" Integração Social",
} "value": "2.91",
], "exemptedBaseAmount":
"Party": [{ "0.00",
"id": "1", "exemptedBasePercent":
"role": "SHIP_FROM", "0.00",
"taxRegistration": [{ "otherBaseAmount": "0.00",
"locationType": "taxTypeCode": "PIS",
"SHIP_FROM", "taxAttributes": [{
"taxNumber": "2063100", "attributeType": "CST",
"taxNumberTypeCode": "attributeValue": "02"
"CNAE" },
}, {
{ "attributeType":
"locationType": "legalProvision",
"SHIP_FROM", "attributeValue": "PIS
"taxNumber": monofásico, conforme artigo 1º, I,
"999999999999", \"b\" da Lei 10.147/00"
"taxNumberTypeCode": }
"CNPJ" ],
}, },
{ {
"locationType": "rate": "10.30",
"SHIP_FROM", "taxable": "132.24",
"taxNumber": "Y", "name": "Contribuição para
"taxNumberTypeCode": o Financiamento da Seguridade
"COFINSContributor" Social",
}, "value": "13.62",
{ "exemptedBaseAmount":
"locationType": "0.00",
"SHIP_FROM", "exemptedBasePercent":
"taxNumber": "4314902", "0.00",
"taxNumberTypeCode": "otherBaseAmount": "0.00",
"IBGECode" "taxTypeCode": "COFINS",
}, "taxAttributes": [{
{ "attributeType": "CST",
"locationType": "attributeValue": "02"
"SHIP_FROM", },
"taxNumber": "Y", {
"taxNumberTypeCode": "attributeType":
"ICMSContributor" "legalProvision",
}, "attributeValue":
{ "COFINS monofásico, conforme
"locationType": artigo 1º, I, \"b\" da Lei
"SHIP_FROM", 10.147/00"
"taxNumber": "Y", }
"taxNumberTypeCode": ],
"ICMSSTContributor" },
}, {
{ "rate": "2.00",
"locationType": "attributeType":
"SHIP_TO", "surchargeRate",
"taxNumber": "attributeValue":
"99999999999999", "88.75"
"taxNumberTypeCode": },
"CNPJ" {
}, "attributeType":
{ "legalProvision",
"locationType": "attributeValue":
"SHIP_TO", "MVA, conforme Item XXII, da Seção
"taxNumber": "Y", III, do Apendice II, do RICMS/RS
"taxNumberTypeCode": (Decreto nº 37.699/1997). ;
"COFINSContributor" Substituição tributária, conforme
}, artigo 9º, do Livro III, do
{ Decreto nº. 37.699/1997 (RICMS/
"locationType": RS)."
"SHIP_TO", }
"taxNumber": "4314902", ],
"taxNumberTypeCode": }
"IBGECode" ]
}, }],
{ "date":
"locationType": "2018-01-04T18:35:06.000Z"
"SHIP_TO", }
"taxNumber": "Y",
"taxNumberTypeCode":
"ICMSContributor"
},
{
"locationType":
"SHIP_TO",
"taxNumber": "Y",
"taxNumberTypeCode":
"ICMSSTContributor"
},
{
"locationType":
"SHIP_TO",
"taxNumber":
"9999999999",
"taxNumberTypeCode": "IE"
},
{
"locationType":
"SHIP_TO",
"taxNumber": "Y",
"taxNumberTypeCode":
"IPIContributor"
},
{
"locationType":
"SHIP_TO",
"taxNumber": "N",
"taxNumberTypeCode":
"ISSContributor"
},
{
"locationType":
"SHIP_TO",
"taxNumber": "2046",
"taxNumberTypeCode":
"legalNature"
},
{
"locationType":
"SHIP_TO",
"taxNumber": "Y",
"taxNumberTypeCode":
"PISContributor"
},
{
"locationType":
"SHIP_TO",
"taxNumber": "3",
"taxNumberTypeCode":
"taxRegimenCode"
}
]
}
]
}
This scenario describes how the tax service computes tax in the case of goods transfer as call-off stock or
consignment stock.
Call-off Stock
Call-off stock is the transfer of its own goods by a VAT registered business from one European Union member
state to another to create a stock of goods. From this stock for goods, the company’s customers can call-off
(i.e. use and pay for) the goods as and when they require them. The transported goods must be stored at the
premises of the customer or at storage facilities operated or rented by the customer.
Consignment stocks
Consignment stocks are created when a VAT registered business transfers its own goods to another European
Union member state to create a stock over which it has control and from which it makes supplies, or supplies
are made on its behalf in that member state. In general, the business is effectively transferring its own goods to
itself in another member state and this will be an acquisition of goods in the other member state. The business
will be liable to account for acquisition tax in the other member state and may be liable to register for VAT
there.
● Seller European Union country is passed as country under locations with type SHIP_FROM
● Country is Belgium under Locations with type SHIP_TO
● isBusinessPartnerTaxRegistered is Y under Locations with type SHIP_FROM
● IsBusinessPartnerTaxRegistered is N under Locations with type SHIP_TO
● IsCompanyTaxRegistered is Y under Locations with type SHIP_TO
{ {
"id": "Doc1", "total": "100.0",
"date": "inclusive": "false",
"2017-06-06T05:27:00.000Z", "subTotal": "100.0",
"grossOrNet": "n", "totalTax": "0.0",
"saleorPurchase": "p", "country": "BE",
"currency": "EUR", "taxLines": [
"Items": [ {
{ "id": "1",
"id": "1", "totalTax": "0.0",
"itemCode": "Product1", "taxcode": "EU
"itemType": "m", purchase of goods, reverse charge,
"quantity": 1, standard rate",
"unitPrice": 100, "totalRate": "21.0",
"shippingCost": "N" "totalWithholdingTax":
} "0.0",
],
"Locations": [ "totalWithholdingTaxRate": "0.0",
{ "taxValues": [
"type": "SHIP_FROM", {
"addressLine1": "level": "",
"Dietmar-Hopp-Allee 16", "rate":
"zipCode": "69190", "21.000000",
"country": "DE", "taxable":
"100.0",
"isCompanyTaxRegistered": "Y", "name": "Value
Added Tax",
"isBusinessPartnerTaxRegistered": "value":
"Y" "21.0",
},
{ "jurisdiction": "",
"type": "SHIP_TO",
"addressLine1": " "jurisdictionCode": "",
Generaal Lemanstraat 67",
"zipCode": "2018", "withholdingRelevant": false
"city": "Antwerp", },
"country": "BE", {
"level": "",
"isCompanyTaxRegistered": "Y", "rate":
"21.000000",
"isBusinessPartnerTaxRegistered": "taxable":
"N" "100.0",
} "name": "Value
] Added Tax",
} "value":
"21.0",
"jurisdiction": "",
"jurisdictionCode": "",
"withholdingRelevant": false
}
]
}
],
"date":
"2017-06-06T12:00:00:000Z"
This is also referred to as a deemed transaction. The goods are sent from the registered seller in Belgium to
another of its non-registered European Union (EU) location. For this scenario, the tax service calculates tax in a
two-step process. First it posts a sale invoice and then a purchase invoice:
● Sale Invoice
The sale invoice is done between the registered seller in Belgium and its counter-part company (i.e. buyer)
at another EU location. In this transaction, the receiving counter-part company is considered as the
customer. During the sale invoice capture, the company will account VAT as EU sale of goods, zero rate. Tax
country will be Belgium.
{ {
"id": "Doc1", "total": "100.0",
"date": "inclusive": "false",
"2017-06-06T05:27:00.000Z", "subTotal": "100.0",
"grossOrNet": "n", "totalTax": "0.0",
"saleorPurchase": "s", "country": "BE",
"currency": "EUR", "taxLines": [
"Items": [ {
{ "id": "1",
"id": "1", "totalTax": "0.0",
"itemCode": "Product1", "taxcode": "EU sale of
"itemType": "m", goods, zero rate",
"quantity": 1, "totalRate": "0.0",
"unitPrice": 100, "totalWithholdingTax":
"shippingCost": "N" "0.0",
}
], "totalWithholdingTaxRate": "0.0",
"Locations": [ "taxValues": [
{ {
"type": "SHIP_FROM", "level": "",
"addressLine1": " "rate":
Generaal Lemanstraat 67", "0.000000",
"zipCode": "2018", "taxable":
"city": "Antwerp", "100.0",
"country": "BE", "name": "Value
Added Tax",
"isCompanyTaxRegistered": "Y", "value": "0.0",
● Supplier invoice
Once the good is received at the receiving company, the supplier invoice is done between the seller in
Belgium and the receiving counter-part company at another EU location. In this transaction, the seller
company is considered as the supplier. During the supplier invoice capture, the company will account VAT
as acquisition of goods (reverse charge). Tax country will be the receiving EU location.
Parameters to be sent to tax service
{ {
"id": "Doc1", "total": "100.0",
"date": "inclusive": "false",
"2017-06-06T05:27:00.000Z", "subTotal": "100.0",
"grossOrNet": "n", "totalTax": "0.0",
"saleorPurchase": "p", "country": "GB",
"currency": "EUR", "taxLines": [
"Items": [ {
{ "id": "1",
"id": "1", "totalTax": "0.0",
"itemCode": "Product1", "taxcode": "EU
"itemType": "m", Acquisition of Goods, Standard
"quantity": 1, Rate",
"unitPrice": 100, "totalRate": "20.0",
"shippingCost": "N" "totalWithholdingTax":
} "0.0",
],
"Locations": [ "totalWithholdingTaxRate": "0.0",
{ "taxValues": [
"type": "SHIP_FROM", {
"addressLine1": " "level": "",
Generaal Lemanstraat 67", "rate":
"zipCode": "2018", "20.000000",
"city": "Antwerp", "taxable":
"country": "BE", "100.0",
"name": "VAT",
"isCompanyTaxRegistered": "Y", "value":
"20.0",
"isBusinessPartnerTaxRegistered":
"Y" "jurisdiction": "",
},
{ "jurisdictionCode": "",
"type": "SHIP_TO",
"addressLine1": "withholdingRelevant": false
"Bedfont Road", },
"zipCode": "TW14 8HD", {
"city": "Feltham", "level": "",
"country": "GB", "rate":
"20.000000",
"isCompanyTaxRegistered": "Y", "taxable":
"100.0",
"isBusinessPartnerTaxRegistered": "name": "VAT",
"N" "value":
} "20.0",
]
} "jurisdiction": "",
"jurisdictionCode": "",
"withholdingRelevant": false
}
]
}
],
"warning": [
{
"code": "W003",
"description":
"Withholding tax not applicable as
Consignment Stock
The tax service's behavior is the same as described for the call-off stock transaction.
This scenario describes how the tax service determines indirect tax for credit notes and correction invoices.
This is relevant for the return of goods scenario. For example, a credit note for the return of an item to the seller,
which was previously sold from Brussels to a customer located in Antwerp, Belgium.
Credit Notes
The tax service determines tax for credit notes using one of the following methods:
● Passing unitPrice or quantity under Items with a negative sign i.e. -100
● Passing positive values for unitPrice and quantity under Items
Note
In this case, the application calling the tax service must ensure that the credit note is differentiated from
the normal transaction.
Correction Invoices
The calling application must ensure that the correction invoice is differentiated from the normal transaction.
{ {
"id": "Doc1", "total": "-121.0",
"date": "inclusive": "false",
"2017-06-06T05:27:00.000Z", "subTotal": "-100.0",
"grossOrNet": "n", "totalTax": "-21.0",
"saleorPurchase": "s", "country": "BE",
"currency": "EUR", "taxLines": [
"Items": [ {
{ "id": "1",
"id": "1", "totalTax": "-21.0",
"itemCode": "Product1", "taxcode": "Domestic
"itemType": "m", sale of goods and services,
"quantity": 1, standard rate",
"unitPrice": -100, "totalRate": "21.0",
"shippingCost": "N" "totalWithholdingTax":
} "0.0",
],
"Locations": [ "totalWithholdingTaxRate": "0.0",
{ "taxValues": [
"type": "SHIP_FROM", {
"addressLine1": "level": "",
"Avenue des Olympiades 2", "rate":
"zipCode": "1140", "21.000000",
"city": "Brussels", "taxable":
"country": "BE" "-100.0",
}, "name": "Value
{ Added Tax",
"type": "SHIP_TO", "value":
"addressLine1": " "-21.0",
Generaal Lemanstraat 67",
"zipCode": "2018", "jurisdiction": "",
"city": "Antwerp",
"country": "BE" "jurisdictionCode": "",
}
] "withholdingRelevant": false
} }
]
}
],
"date":
"2017-06-06T12:00:00:000Z"
}
This scenario describes how tax liability of a transaction is assessed in the tax service.
Typically, for both purchase and sale transaction, taxes becomes liable when an invoice is posted. However, in
some type of transactions taxes only become liable after the payment or the clearing of the invoice. This is
referred to as a deferred tax.
Based on the legal requirement, the following parameters can influence the enablement of deferring taxes for a
transaction:
For a domestic purchase in Switzerland, if the company is enabled to defer tax, then deferred tax is applicable
for all transactions. If the company is allowed to defer tax, it is applicable for:
Note
It's not a legal requirement to enable deferred tax based on business partner.
Note
Deferred tax is not applicable for invoice payment, so the calling application based on their transaction type
should take care of the value to be passed in isCompanyDeferredTaxEnabled.
{ {
"id": "Doc1", "total": "108.0",
"date": "inclusive": "false",
"2017-06-06T05:27:00.000Z", "subTotal": "100.0",
"grossOrNet": "n", "totalTax": "8.0",
"saleorPurchase": "p", "country": "CH",
"isCompanyDeferredTaxEnabled": "taxLines": [
"Y", {
"currency": "EUR", "id": "1",
"Items": [ "totalTax": "8.0",
{ "taxcode": "Dom purch
"id": "1", services - st rate full ded",
"itemCode": "totalRate": "8.0",
"RentalServices", "totalWithholdingTax":
"itemType": "s", "0.0",
"quantity": 1,
"unitPrice": 100, "totalWithholdingTaxRate": "0.0",
"shippingCost": "N" "taxValues": [
} {
], "level": "",
"Locations": [ "rate":
{ "8.000000",
"type": "SHIP_FROM", "taxable":
"addressLine1": " "100.0",
Althardstrasse 80", "name": "VAT",
"city": " Regensdorf", "value": "8.0",
"zipCode": "8105",
"country": "CH", "nonDeductibleTaxRate": "0.0",
Above the threshold the parameter IsCompanyTaxRegistered is Y for the Location with type SHIP_TO.
For accounting purposes, and for payment to the tax authority the tax amount in a foreign currency transaction
needs to be converted to the local declaration currency of the procuring company
Note
● The currency conversion date and exchange rate are defined by the tax authorities. For converting the
tax amount in foreign currency to the local currency, the applicable rules are defined by the authorities.
● The tax service does not support converting currencies. The calling application needs to already have
the currency conversion rates. After receiving the tax amounts and the transaction date from the tax
service in the transaction currency the calling application must convert the tax amounts into the local
currency by itself.
Determination of currency
The consumer passes the business transaction date and the transaction currency to the tax service. The tax
service then calculates and determines the tax in the currency sent by the calling application.
Note
The tax invoice does not provide determination of local currency and the currency conversion date. The
calling application needs to ensure that the tax amounts are converted per the rules defined by the local tax
authority.
{ {
"id": "Doc1", "total": "100.0",
"date": "inclusive": "false",
"2017-02-07T05:27:00.000Z", "subTotal": "100.0",
"grossOrNet": "n", "totalTax": "0.0",
"saleorPurchase": "s", "country": "BE",
"currency": "EUR", "taxLines": [
"Items": [ {
{ "id": "1",
"id": "1", "totalTax": "0.0",
"itemType": "m", "taxcode": "Export to
"quantity": 1, third country, zero rate",
"unitPrice": 100, "totalRate": "0.0",
"shippingCost": "y" "totalWithholdingTax":
} "0.0",
],
"Locations": [ "totalWithholdingTaxRate": "0.0",
{ "taxValues": [
"type": "SHIP_FROM", {
"addressLine1": " "level": "",
Avenue des Olympiades 2", "rate":
"zipCode": "1140", "0.000000",
"city": "Brussels", "taxable":
"country": "BE", "100.0",
"name": "Value
"isCompanyTaxRegistered": "Y", Added Tax",
"value": "0.0",
"isBusinessPartnerTaxRegistered":
"Y" "jurisdiction": "",
},
{ "jurisdictionCode": "",
"type": "SHIP_TO",
"addressLine1": "431, "withholdingRelevant": false
St.Louis Avenue", }
"zipCode": "00501", ]
"city": "Holtsville", }
"state": "NY", ],
"country": "US", "date":
"2017-02-07T12:00:00:000Z"
"isCompanyTaxRegistered": "Y", }
"isBusinessPartnerTaxRegistered":
"Y"
}
]
}
{ {
"id": "Doc1", "total": "106.26",
"date": "inclusive": "false",
"2017-02-07T05:27:00.000Z", "subTotal": "100.0",
"grossOrNet": "n", "totalTax": "6.26",
"saleorPurchase": "p", "country": "US",
"currency": "EUR", "taxLines": [
"Items": [ {
{ "id": "1",
"id": "1", "totalTax": "6.26",
"itemType": "m", "taxcode": "Import Use
"quantity": 1, Tax - Standard Rate",
"unitPrice": 100, "totalRate": "6.25",
"shippingCost": "y" "totalWithholdingTax":
} "0.0",
],
"Locations": [ "totalWithholdingTaxRate": "0.0",
{ "taxValues": [
"type": "SHIP_FROM", {
"addressLine1": " "level": "01",
Avenue des Olympiades 2", "rate":
"zipCode": "1140", "5.125000",
"city": "Brussels", "taxable":
"country": "BE", "100.0",
"name": "Sales
"isCompanyTaxRegistered": "Y", And Use Tax",
"value":
"isBusinessPartnerTaxRegistered": "5.13",
"Y"
}, "jurisdiction": "New Mexico",
{
"type": "SHIP_TO", "jurisdictionCode": "NM",
"addressLine1": "431,
St.Louis Avenue", "withholdingRelevant": false
"zipCode": "00501", },
"city": "holtsville", {
"state": "NY", "level": "02",
"country": "US", "rate":
"1.125000",
"isCompanyTaxRegistered": "Y", "taxable":
"100.0",
"isBusinessPartnerTaxRegistered": "name": "Sales
"Y" And Use Tax",
} "value":
] "1.13",
}
"jurisdiction": "Sandoval",
"jurisdictionCode": "NMA65052",
"withholdingRelevant": false
},
{
"level": "03",
"rate":
"0.000000",
"taxable":
"100.0",
"name": "Sales
And Use Tax",
"value": "0.0",
"jurisdiction": "Algodones",
"jurisdictionCode":
"NMA65052N65052",
"withholdingRelevant": false
}
]
}
],
"date":
"2017-06-06T12:00:00:000Z"
}
European Union (EU) distance selling is defined as the sale to an end consumer, where the seller is located in a
different EU country than the end consumer. For example, the sale of an item from Germany to an end
consumer located in Belgium. This document describes how the tax service determines an indirect tax intra-EU
sales transactions with a consumer. The tax computations rules differ for consumers from those for
companies.
Note
The tax service does not accumulate and calculate the threshold of gross sales in the receiving EU country.
The calling application needs to define the business process to identify if a VAT registration is necessary. If
the threshold is passed and the company is registered in the receiving EU country, the parameter
IsCompanyTaxRegistered must be set to “Y” – yes in the request.
● Distance selling: the parameter <country> in the Location with type SHIP_TO differs from the parameter
<country> in the Location with type SHIP_FROM.
● Buyer is an end consumer: the consumer or the end customer does not have a VAT registration.
● To indicate the consumer registration status to the tax service, set the parameter
isBusinessPartnerTaxRegistered to N for the Location with type SHIP_TO.
● Threshold
○ Above the threshold the parameter IsCompanyTaxRegistered is Y for the Location with type SHIP_TO
○ Below threshold the parameter IsCompanyTaxRegistered is N for the Location with type SHIP_TO
A Belgian company is selling goods to a consumer in Great Britain (GB). The Belgian company has crossed the
threshold for distance selling in GB and has registered in GB.
Sample Payload
{ {
"id": "Doc1", "total": "120.0",
"date": "inclusive": "false",
"2017-06-06T05:27:00.000Z", "subTotal": "100.0",
"grossOrNet": "n", "totalTax": "20.0",
"saleorPurchase": "s", "country": "GB",
"currency": "EUR", "taxLines": [
"Items": [ {
{ "id": "1",
"id": "1", "totalTax": "20.0",
"itemCode": "taxcode": "EU
"Product_BE", Distance Sale of Goods, Standard
"itemType": "m", Rate",
"quantity": 1, "totalRate": "20.0",
"unitPrice": 100, "totalWithholdingTax":
"shippingCost": "N" "0.0",
}
], "totalWithholdingTaxRate": "0.0",
"Locations": [ "taxValues": [
{ {
"type": "SHIP_FROM", "level": "",
"addressLine1": " "rate":
Avenue des Olympiades 2", "20.000000",
"zipCode": "1140", "taxable":
"city": "Brussels", "100.0",
"state": "", "name": "VAT",
"country": "BE", "value":
"20.0",
"isCompanyTaxRegistered": "Y"
}, "jurisdiction": "",
{
"type": "SHIP_TO", "jurisdictionCode": "",
"addressLine1":
"Bedfont Road", "withholdingRelevant": false
"zipCode": "TW14 8HD", }
"city": "Feltham", ]
"state": "", }
"country": "GB", ],
"date":
"isCompanyTaxRegistered": "Y", "2017-06-06T12:00:00:000Z"
}
"isBusinessPartnerTaxRegistered":
"N"
}
]
}
This document describes how the rules for indirect tax determination are applied in the tax service in case of a
supply of services within the European Union (EU). By default, the location of the supply of a service to a
taxable buyer is the place where the buyer has established his or her business. However, for certain services
such as, e.g., catering, transport, or training, the location of the supply of a service, is the location at which the
service is actually provided.
A sale of service happens between a company in Belgium (ship-from location) and a customer in Germany
(contract-to location). The service is supplied in the United Kingdom (service location), and the service is
taxable at the service location. In this scenario, the tax service calculates VAT for the location where the service
was delivered, the United Kingdom.
Configuration for the product used in the payload is set up in the Product Master Data. For the service used in
itemCode under Items you need to set certain attributes in the product master data. Against the node
ProductTaxClassification, in the ProductClassification of the product master data, set the following:
● Maintain a record for Ship From country with the attribute ServicePointTaxableIndicator as true
● Maintain a record for Service Location country with attribute ServicePointTaxableIndicator as true.
Note
Currently the tax service does not support the passing of the attribute ServicePointTaxableIndicator in the
tax service request payload. Therefore, you need to set it in the master data configuration.
{
"ProductId": "Rental_Service",
"ProductName": "Laptop",
"ProductType": "S",
"Status": "Active",
"TariffId": "123",
"ProductTaxClassificationDetails":
[
{
"ProductTaxClassificationId": "1",
"Country": "BE",
"ElectronicallySold":
true,
"Jurisdiction": "",
"ServicePointTaxableIndicator":
true,
"State": "",
"TaxExemptionReason":
"",
"TaxRateType": "1",
"TaxType": "1",
"ValidFrom":
"2016-01-01T09:00:00",
"ValidTo":
"2018-12-01T09:00:00"
},
{
"ProductTaxClassificationId": "2",
"Country": "GB",
"ElectronicallySold":
true,
"ServicePointTaxableIndicator":
true,
"TaxExemptionReason":
"",
"TaxRateType": "1",
"TaxType": "1",
"ValidFrom":
"2016-01-01T09:00:00",
"ValidTo":
"2018-12-31T09:00:00"
},
{
"ProductTaxClassificationId": "3",
"Country": "CH",
"ElectronicallySold":
true,
"ServicePointTaxableIndicator":
true,
"TaxExemptionReason":
"",
"TaxRateType": "1",
"TaxType": "1",
"ValidFrom":
"2016-01-01T09:00:00",
"ValidTo":
"2018-12-31T09:00:00"
}
]
}
Note
Currently the tax service does not support passing the service location as a location type in the request
payload. However, it is possible to achieve the required behavior by passing the location where the
service was provided as the SHIP_TO location.
{ {
"id": "Doc1", "total": "120.0",
"date": "inclusive": "false",
"2017-06-06T05:27:00.000Z", "subTotal": "100.0",
"grossOrNet": "n", "totalTax": "20.0",
"saleorPurchase": "s", "country": "GB",
"currency": "EUR", "taxLines": [
"Items": [ {
{ "id": "1",
"id": "1", "totalTax": "20.0",
"itemCode": "taxcode": "Domestic
"Rental_Service", Sale of Services, Standard Rate",
"itemType": "s", "totalRate": "20.0",
"quantity": 1, "totalWithholdingTax":
"unitPrice": 100, "0.0",
"shippingCost": "N"
} "totalWithholdingTaxRate": "0.0",
], "taxValues": [
"Locations": [ {
{ "level": "",
"type": "SHIP_FROM", "rate":
"addressLine1": " "20.000000",
Avenue des Olympiades 2", "taxable":
"city": "Brussels", "100.0",
"zipCode": "1140", "name": "VAT",
"country": "BE", "value":
"20.0",
"isCompanyTaxRegistered": "Y",
"jurisdiction": "",
"isBusinessPartnerTaxRegistered":
"Y" "jurisdictionCode": "",
},
{ "withholdingRelevant": false
"type": "SHIP_TO", }
"addressLine1": "19 ]
Cornwall Street", }
"city": "Birmingham", ],
"zipCode": "B3 2DT", "date":
"country": "GB", "2017-06-06T12:00:00:000Z"
}
"isCompanyTaxRegistered": "Y",
"isBusinessPartnerTaxRegistered":
"Y"
}
]
}
A sale of service takes place between a company in Belgium (ship-from location) and a customer in Germany
(contract-to location), and the customer is registered at this location. The service is provided in the United
Kingdom (service location), which is the place of supply, however, the service is not taxable at the service
location. In this scenario, the tax service calculates VAT for the ship-from location: Belgium.
● Configuration for the product used in the payload is set up in the Product Master Data.
● As the service is not taxable at the service location, no product master data configuration is required for
the itemCode used in the example payload (rental service). If the product master data configuration is
maintained for the itemCode, then the parameter ServicePointTaxableIndicator must be set to false.
Note
Currently the tax service does not support passing the service location as a location type in the request
payload. However, it is possible to achieve the required behavior by passing the service location as the
SHIP_TO location.
{
"ProductId": "Rental_Service",
"ProductName": "Laptop",
"ProductType": "S",
"Status": "Active",
"TariffId": "123",
"ProductTaxClassificationDetails":
[
{
"ProductTaxClassificationId": "1",
"Country": "BE",
"ElectronicallySold":
true,
"Jurisdiction": "",
"ServicePointTaxableIndicator":
false,
"State": "",
"TaxExemptionReason":
"",
"TaxRateType": "1",
"TaxType": "1",
"ValidFrom":
"2016-01-01T09:00:00",
"ValidTo":
"2018-12-01T09:00:00"
},
{
"ProductTaxClassificationId": "2",
"Country": "GB",
"ElectronicallySold":
true,
"ServicePointTaxableIndicator":
false,
"TaxExemptionReason":
"",
"TaxRateType": "1",
"TaxType": "1",
"ValidFrom":
"2016-01-01T09:00:00",
"ValidTo":
"2018-12-31T09:00:00"
},
{
"ProductTaxClassificationId": "3",
"Country": "CH",
"ElectronicallySold":
true,
"ServicePointTaxableIndicator":
true,
"TaxExemptionReason":
"",
"TaxRateType": "1",
"TaxType": "1",
"ValidFrom":
"2016-01-01T09:00:00",
"ValidTo":
"2018-12-31T09:00:00"
}
]
}
Note
Currently the tax service does not support the passing of service location as location type in the
request payload. However, it is possible to achieve the required behavior by passing the service location
as SHIP_TO location.
{ {
"id": "Doc1", "total": "100.0",
"date": "inclusive": "false",
"2017-06-06T05:27:00.000Z", "subTotal": "100.0",
"grossOrNet": "n", "totalTax": "0.0",
"saleorPurchase": "s", "country": "BE",
"currency": "EUR", "taxLines": [
"Items": [ {
{ "id": "1",
"id": "1", "totalTax": "0.0",
"itemCode": "taxcode": "EU sale of
"Rental_Service", services, Art. 44, zero rate",
"itemType": "s", "totalRate": "0.0",
"quantity": 1, "totalWithholdingTax":
"unitPrice": 100, "0.0",
"shippingCost": "N"
} "totalWithholdingTaxRate": "0.0",
], "taxValues": [
"Locations": [ {
{ "level": "",
"type": "SHIP_FROM", "rate":
"addressLine1": " "0.000000",
Avenue des Olympiades 2", "taxable":
"city": "Brussels", "100.0",
"zipCode": "1140", "name": "Value
"country": "BE", Added Tax",
"value": "0.0",
"isCompanyTaxRegistered": "Y",
"jurisdiction": "",
"isBusinessPartnerTaxRegistered":
"Y" "jurisdictionCode": "",
}, "dueCategory":
{ "P",
"type": "SHIP_TO",
"addressLine1": "19 "isTaxDeferred": false,
Cornwall Street",
"city": "Birmingham", "withholdingRelevant": false
"zipCode": "B3 2DT", }
"country": "GB", ]
}
"isCompanyTaxRegistered": "Y", ],
"date":
"isBusinessPartnerTaxRegistered": "2017-06-06T12:00:00:000Z"
"Y" }
}
]
}
A purchase of services takes place between a seller in Belgium (ship-from location) and a buyer in Germany
(contract-to location). The service is provided in the United Kingdom (service location), and the service is
taxable at the location of the buying company. In this scenario, the tax service calculates VAT for the location of
the buyer: Germany.
{ {
"id": "Doc1", "total": "100.0",
"date": "inclusive": "false",
"2017-06-06T05:27:00.000Z", "subTotal": "100.0",
"grossOrNet": "n", "totalTax": "0.0",
"saleorPurchase": "p", "country": "DE",
"currency": "EUR", "taxLines": [
"Items": [ {
{ "id": "1",
"id": "1", "totalTax": "0.0",
"itemCode": "taxcode": "EU
"Rental_Service", Purchase of Services, Reverse
"itemType": "s", Charge, Standard Rate, Fully
"quantity": 1, Deductible",
"unitPrice": 100, "totalRate": "19.0",
"shippingCost": "n" "totalWithholdingTax":
} "0.0",
],
"Locations": [ "totalWithholdingTaxRate": "0.0",
{ "taxValues": [
"type": "SHIP_FROM", {
"addressLine1": " "level": "",
Avenue des Olympiades 2", "rate":
"city": "Brussels", "19.000000",
"zipCode": "1140", "taxable":
"country": "BE", "100.0",
"name": "VAT",
"isCompanyTaxRegistered": "Y", "value":
"19.0",
"isBusinessPartnerTaxRegistered":
"Y" "nonDeductibleTaxRate": "0.0",
},
{ "nonDeductibleTaxAmount": "0.0",
"type": "SHIP_TO",
"addressLine1": " "deductibleTaxAmount": "19.0",
Dietmar-Hopp-Allee 16",
"city": " Walldorf", "jurisdiction": "",
"zipCode": "69190",
"country": "DE", "jurisdictionCode": "",
"dueCategory":
"isCompanyTaxRegistered": "Y", "R",
"jurisdiction": "",
"jurisdictionCode": "",
"dueCategory":
"P",
"isTaxDeferred": false,
"withholdingRelevant": false
}
]
}
],
"date":
"2017-06-06T12:00:00:000Z"
}
This document describes how the rules of indirect tax determination are applied in the tax service for a sale,
where the supply is installed in a different European Union (EU) country than the EU country the seller is
located in.
Note
1. Before invoking the call to the tax service, the calling application must identify if the good or the service
is the principle element in the supply.
2. If the service is the principle element of the supply, the tax service will determine the tax based on the
service location.
3. If the good is the principle element of the supply, the tax service cannot determine the tax based on the
ship-to location. This is out of scope of the tax service.
4. The calling application must specify the place of transaction in the scenario or the location where the
goods are being supplied along with the installation to and installed at.
This scenario describes how the rules for indirect tax determination are applied in the tax service in case of a
sale of free samples and goods.
The tax service calculates taxes based on the unit price (unitPrice) provided as input in the request payload. In
general, no tax liability arises for sales of samples and free goods. The tax service treats the sale of samples or
free goods the same as a normal sales transaction (with a unit price of zero). However , local statutory tax
reporting requirements may require separate reporting of the taxes as tax obligation for the seller.
Samples and free goods need to be identified and marked for reporting purposes by the calling application.
The tax service identify such cases or treat them differently from a normal sale.
Samples and free goods need to be identified and marked for reporting purposes by the calling application. The
tax service identify such cases or treat them differently from a normal sale.
The request and response payload samples below show how the tax service processes such sales.
Note
The tax code will be same as a normal sale transaction with a result of a total tax of zero.
{ {
"id": "Doc1", "total": "0.0",
"date": "inclusive": "false",
"2017-04-26T14:00:00.000Z", "subTotal": "0.0",
"saleorPurchase": "p", "totalTax": "0.0",
"grossOrNet": "n", "country": "BE",
"currency": "EUR", "taxLines": [
"Items": [ {
{ "id": "1",
"id": "1", "totalTax": "0.0",
"itemCode": "product1", "taxcode": "Domestic
"quantity": 1, purchase of goods, standard rate,
"unitPrice": 0, fully deductible",
"shippingCost": "N" "totalRate": "21.0",
} "totalWithholdingTax":
], "0.0",
"Locations": [
{ "totalWithholdingTaxRate": "0.0",
"type": "SHIP_FROM", "taxValues": [
"addressLine1": {
"Generaal Lemanstraat 67", "level": "",
"zipCode": "2018", "rate":
"city": "Antwerp", "21.000000",
"country": "BE" "taxable":
}, "0.0",
{ "name": "Value
"type": "SHIP_TO", Added Tax",
"addressLine1": " "value": "0.0",
Avenue des Olympiades 2",
"zipCode": "1140", "nonDeductibleTaxRate": "0.0",
"city": "Brussels",
"country": "BE", "nonDeductibleTaxAmount": "0.0",
"isTaxDeferred": false,
"withholdingRelevant": false
}
]
}
],
"date":
"2017-04-26T12:00:00:000Z"
}
This scenario describes how the tax service applies the rules for indirect tax determination in case of a
transaction between companies belonging to one VAT group subsidiaries of a company or within a holding
company can take part in a VAT group.
The entities forming a VAT group must be closely linked financially, economically and organizationally and must
be in the same country, under the same VAT law. For tax reporting purposes entities within a VAT group are
regarded as a single VAT entity by the tax authority. One of the benefits of forming a VAT group is avoiding VAT
liability on intra-group supplies and hence optimizing the tax obligations.
Note
Tax reporting requirements for VAT groups differ from country to country, and are not in scope of the tax
service.
● Before calling the tax service, the calling application evaluates if the transaction takes place between the
subsidiaries of a single (holding) company. For example, if the contract-from/contract-to or ship-from/
ship-to location parties belong to the same VAT group. If yes, it must pass the parameter
isTransactionWithinTaxReportingGroup = Y in the request payload.
● The tax service then considers a VAT group transaction if it happens within the same country (and within
the same region, in countries where the region is relevant as well). Relevant for the tax service are the
countries in the locations of type CONTRACT_FROM and CONTRACT_TO.
● The tax service’s calculation results in a total tax of zero with tax code non-taxable sale within tax
reporting group.
The given example is for a sales transaction between two companies belonging to the same VAT group in Great
Britain (GB).
{ {
"id": "Doc1", "total": "100.0",
"date": "inclusive": "false",
"2017-04-07T05:27:00.000Z", "subTotal": "100.0",
"saleorPurchase": "s", "totalTax": "0.0",
"grossOrNet": "n", "country": "GB",
"currency": "EUR", "taxLines": [
{
"isTransactionWithinTaxReportingGro "id": "1",
up": "Y", "totalTax": "0.0",
"Items": [ "taxcode": "Non-
{ Taxable Sale within Tax Reporting
"id": "1", Group",
"itemCode": "totalRate": "0.0",
"P1234353453", "totalWithholdingTax":
"itemType": "m", "0.0",
"quantity": 1,
"unitPrice": 100, "totalWithholdingTaxRate": "0.0",
"shippingCost": "n" "taxValues": [
} {
], "level": "",
"Locations": [ "rate":
{ "0.000000",
"type": "SHIP_FROM", "taxable":
"addressLine1": "100.0",
"Bedfont Road", "name": "VAT",
"zipCode": "TW14 8HD", "value": "0.0",
"city": "Feltham",
"country": "GB", "jurisdiction": "",
"isCompanyTaxRegistered": "N",
"isBusinessPartnerTaxRegistered":
"Y"
},
{
"type":
"CONTRACT_FROM",
"addressLine1":
"Bedfont Road",
"zipCode": "TW14 8HD",
"city": "Feltham",
"country": "GB",
"isCompanyTaxRegistered": "Y",
"isBusinessPartnerTaxRegistered":
"Y"
},
{
"type": "CONTRACT_TO",
"addressLine1": "19
Cornwall Street",
"zipCode": "B3 2DT",
"city": "Birmingham",
"country": "GB",
"isCompanyTaxRegistered": "N",
"isBusinessPartnerTaxRegistered":
"Y"
}
]
}
This scenario describes the rules, by which the tax service computes taxes for a company with either VAT
establishments or VAT registrations in multiple European Union (EU) countries. For VAT calculation purposes,
the tax service does not differentiate between a company having a physical presence in an EU country, or only
having a VAT registration number in an EU country.
Parameters
Sample Payload
{ {
"id": "Doc1", "total": "120.0",
"date": "inclusive": "false",
"2017-04-26T14:00:00.000Z", "subTotal": "100.0",
"saleorPurchase": "s", "totalTax": "20.0",
"grossOrNet": "n", "country": "GB",
"currency": "EUR", "taxLines": [
"Items": [ {
{ "id": "1",
"id": "1", "totalTax": "20.0",
"itemCode": "product1", "taxcode": "EU
"quantity": 1, Distance Sale of Goods, Standard
"unitPrice": 100, Rate",
"shippingCost": "N" "totalRate": "20.0",
} "totalWithholdingTax":
], "0.0",
"Locations": [
{ "totalWithholdingTaxRate": "0.0",
"type": "SHIP_FROM", "taxValues": [
"addressLine1": " {
Generaal Lemanstraat 67", "level": "",
"zipCode": "2018", "rate":
"city": "Antwerp", "20.000000",
"country": "BE" "taxable":
}, "100.0",
{ "name": "VAT",
"type": "SHIP_TO", "value":
"addressLine1": "20.0",
"Bedfont Road",
"zipCode": "TW14 8HD", "jurisdiction": "",
"city": "Feltham",
"country": "GB", "jurisdictionCode": "",
{ {
"id": "Doc1", "total": "100.0",
"date": "inclusive": "false",
"2017-04-26T14:00:00.000Z", "subTotal": "100.0",
"saleorPurchase": "s", "totalTax": "0.0",
"grossOrNet": "n", "country": "BE",
"currency": "EUR", "taxLines": [
"Items": [ {
{ "id": "1",
"id": "1", "totalTax": "0.0",
"itemCode": "product1", "taxcode": "EU sale of
"quantity": 1, goods, zero rate",
"unitPrice": 100, "totalRate": "0.0",
"shippingCost": "N" "totalWithholdingTax":
} "0.0",
],
"Locations": [ "totalWithholdingTaxRate": "0.0",
{ "taxValues": [
"type": "SHIP_FROM", {
"addressLine1": " "level": "",
Generaal Lemanstraat 67", "rate":
"zipCode": "2018", "0.000000",
"city": "Antwerp", "taxable":
"country": "BE" "100.0",
}, "name": "Value
{ Added Tax",
"type": "SHIP_TO", "value": "0.0",
"addressLine1":
"Bedfont Road", "jurisdiction": "",
"zipCode": "TW14 8HD",
"city": "Feltham", "jurisdictionCode": "",
"country": "GB",
"withholdingRelevant": false
"isCompanyTaxRegistered": "Y", }
]
"isBusinessPartnerTaxRegistered": }
"Y" ],
} "date":
] "2017-04-26T12:00:00:000Z"
} }
Application of indirect taxation rules in the tax service, for shipment of goods between storage locations or
plant of a compamy.
This document describes how rules of an indirect tax determination are applied in the tax service if both
storage locations are in an European Union (EU) country (deemed intra-EU transaction).
To fulfil the local statutory tax reporting requirements, the calling application needs to ensure that transfers of
goods between two subsidiaries of the same company are handled correctly in its system.
In this scenario, we assume that the company is registered in both the locations.
Pre-requisite
To execute the above scenario in the tax service the following are required:
● Outgoing document
● Incoming document
Outgoing document
Outgoing document is created between the sending location of the company located in Belgium and its
registered receiving location, Germany. In this transaction, the receiving location of the company is considered
as customer during document capture, the company will account VAT as EU sale of goods at zero rate.
● Location
○ Type: SHIP_FROM
○ Parameter country: BE
○ Parameter isCompanyTaxRegistered: Y
● Location2
○ Type: SHIP_TO
○ Parameter country: DE
○ Parameter isBusinessPartnerTaxRegistered: Y
Incoming document
When the goods are received at the receiving location of the company, incoming document is done between
the sending location of the company (Belgium) and the receiving location of the company (Germany). In this
transaction, the sending location of the company is considered as supplier. During document capture, the
company will account VAT as intra-community acquisition of goods - standard rate.
● Location1
○ Type: SHIP_FROM
○ Parameter country: BE
○ Parameter isBusinessPartnerTaxRegistered: Y
● Location 2
{ {
"id": "Doc1", "total": "100.0",
"date": "inclusive": "false",
"2017-06-06T05:27:00.000Z", "subTotal": "100.0",
"grossOrNet": "n", "totalTax": "0.0",
"saleorPurchase": "p", "country": "DE",
"currency": "EUR", "taxLines": [
"Items": [ {
{ "id": "1",
"id": "1", "totalTax": "0.0",
"itemCode": "Product1", "taxcode": "IC
"itemType": "m", Acquisition (Standard Rate)",
"quantity": 1, "totalRate": "19.0",
"unitPrice": 100, "totalWithholdingTax":
"shippingCost": "N" "0.0",
}
], "totalWithholdingTaxRate": "0.0",
"Locations": [ "taxValues": [
{ {
"type": "SHIP_FROM", "level": "",
"addressLine1": " "rate":
Generaal Lemanstraat 67", "19.000000",
"zipCode": "2018", "taxable":
"city": "Antwerp", "100.0",
"country": "BE", "name": "Value
Added Tax",
"isBusinessPartnerTaxRegistered": "value":
"Y" "19.0",
},
{ "nonDeductibleTaxRate": "0.0",
"type": "SHIP_TO",
"addressLine1": "nonDeductibleTaxAmount": "0.0",
"Dietmar-Hopp-Allee 16",
"zipCode": "69190", "deductibleTaxAmount": "19.0",
"country": "DE",
"jurisdiction": "",
"isCompanyTaxRegistered": "Y"
} "jurisdictionCode": "",
] "dueCategory":
} "Receivable",
"isTaxDeferred": false,
"withholdingRelevant": false
},
{
"level": "",
"rate":
"19.000000",
"taxable":
"100.0",
"name": "Value
Added Tax",
"value":
"19.0",
"jurisdiction": "",
"jurisdictionCode": "",
"dueCategory":
"Payable",
"isTaxDeferred": false,
"withholdingRelevant": false
}
]
}
],
"warning": [
{
"code": "W003",
"description":
"Withholding tax not applicable as
Company ID is not passed in the
payload "
}
],
"date":
"2017-06-06T12:00:00:000Z"
}
You can use the tax service to determine and calculate indirect taxes.
Basic The tax service covers standard and zero rates for sale and
purchase transactions, including import and export tax de
termination.
To see which scope type is available for a given country or region, see the following table.
Tip
To see the scope available for a given country or region, enter some or all of the country or region name in
the first column.
Albania Basic
Algeria Basic
Andorra Basic
Angola Basic
Armenia Basic
Australia Advanced
Austria Advanced
Azerbaijan Basic
Bahamas Basic
Bangladesh Basic
Barbados Basic
Belarus Advanced
Belgium Advanced
Benin Basic
Bolivia Basic
Botswana Basic
Brazil Partner
Bulgaria Basic
Burundi Basic
Cambodia Basic
Cameroon Basic
Canada Advanced
Canada Partner
Chad Basic
Chile Basic
China Advanced
Colombia Basic
Congo Basic
Croatia Advanced
Cuba Basic
Curaçao Basic
Cyprus Basic
Denmark Advanced
Ecuador Basic
Egypt Advanced
El Salvador Basic
Estonia Basic
Ethiopia Basic
Fiji Basic
Finland Advanced
France Advanced
Germany Advanced
Ghana Basic
Greece Advanced
Guatemala Basic
Guinea Basic
Honduras Basic
Hungary Basic
Iceland Basic
India Basic
Indonesia Basic
Ireland Basic
Israel Advanced
Italy Advanced
Jamaica Basic
Japan Advanced
Jersey Basic
Jordan Basic
Kazakhstan Advanced
Kenya Basic
Laos Basic
Latvia Basic
Lebanon Basic
Liechtenstein Advanced
Lithuania Basic
Luxembourg Basic
Macedonia Basic
Malawi Basic
Malaysia Advanced
Mali Basic
Malta Basic
Mauritius Basic
Mexico Advanced
Moldavia Basic
Montenegro Basic
Morocco Advanced
Mozambique Basic
Namibia Basic
Nepal Basic
Netherlands Advanced
Nicaragua Basic
Niger Basic
Nigeria Basic
Norway Advanced
Pakistan Basic
Palestine Basic
Panama Basic
Paraguay Basic
Peru Basic
Philippines Basic
Poland Basic
Portugal Basic
Romania Advanced
Rwanda Basic
Samoa Basic
Senegal Basic
Serbia Basic
Singapore Advanced
Slovakia Basic
Slovenia Advanced
Spain Advanced
Sweden Advanced
Switzerland Advanced
Tanzania Basic
Thailand Advanced
Tonga Basic
Tunisia Basic
Turkey Basic
Uganda Basic
Ukraine Advanced
Uruguay Basic
USA Basic
Vanuatu Basic
Venezuela Basic
Vietnam Basic
Zambia Basic
Zimbabwe Basic
Related Information
You can try the tax service for evaluation or testing purposes by using the content on SAP API Business Hub or
by using a trial account on SAP Cloud Platform.
If you use the package on SAP API Business Hub, you don't need to subscribe to the tax service; you can use
the infrastructure provided by SAP API Business Hub (see SAP Localization Hub, Tax Service ).
Use a REST Service Client and the Tax Service Simulator Application
Prerequisites
● You have a trial account on SAP Cloud Platform (see Getting Started with a Trial Account in the Neo
Environment).
● You have completed the onboarding steps (see Onboarding to SAP Localization Hub, Tax Service [page
13]).
What Is Your Role and Aim? How Should You Try the Tax Service? More Information
A technical user who wants to consume Use a REST service client. Test Using a REST Service Client [page
the tax service in an application. 82]
A business user who wants to test the Use the Tax Service Simulator applica Simulate Tax Calculations [page 85]
functional scope of the tax service. tion.
You can test the tax service for evaluation purposes by using a REST service client.
To access the tax service in a REST service client, you need an OAuth access token.
Procedure
1. Use the POST method and enter the following OAuth token endpoint: https://oauthasservices-
<technical name of subaccount on SAP Cloud Platform>.hanatrial.ondemand.com/
oauth2/api/v1/token?grant_type=credentials.
If you don't know the technical name, choose the subaccount name in the breadcrumb at the top of the
SAP Cloud Platform cockpit to see the subaccount information.
Example
https://oauthasservices-p2081266912trial.hanatrial.ondemand.com/
oauth2/api/v1/token?grant_type=client_credentials
2. Open the Authorization section of your REST service client and choose Basic Authorization.
3. For the user name and password, use the same entries that you created for the ID and Secret of the OAuth
client that you created for the taxservice Java application during the onboarding process (see 4.
Register OAuth Clients to Access the HTML5 and Java Applications [page 16]).
4. To get the access token, send the request.
5. In the response, copy the value of the access token to the clipboard.
You need this token to authorize the request in the REST service client.
Next task: Call the Tax Service API in a REST Service Client [page 84]
Related Information
You can use sample payloads to test the tax service in a REST service client.
Procedure
Example
https://taxserviceuff2b3f81-p2081166912trial.hanatrial.ondemand.com/
TaxService/TaxService/quote
3. Open the Authorization section of your REST service client and specify no authorization.
4. In the header, create the first of two key-value pairs with Content-Type as the key and application/
json as the value.
5. While still in the header, create a second key-value pair with Authorization as the key. For the value,
paste the access token from step 5 in the first section of this task.
6. In the body, select the raw option and enter the request payload.
For a sample payload, use the sample scenarios or the content on SAP API Business Hub.
7. Send the request.
Related Information
To check the output of tax calculations, you can simulate the way in which the tax service determines and
calculates tax on sales or purchase transactions.
Context
You use the Tax Service Simulator application to check the outcome of the tax determination and calculation
processes.
You can enter details of a product such as the ID, shipping information, and exemption details. Alternatively,
you can import the data in a file in JSON format. You can also see the request payload that the service
generates.
Procedure
1. In the SAP Cloud Platform cockpit, access the subaccount in which you have subscribed to the tax service.
Results
You see the simulation result on the application UI. To see a detailed view of the results, you can view the
decision tree that the tax service uses by viewing the response payload.
Related Information
Application developers can consume APIs to calculate tax on business transactions and configure the tax
attributes of master data entities, such as business partners and products.
Context
To view detailed information about the parameters and request payload, and to try out the APIs, see the
content on SAP API Business Hub.
Tip
There’s also a localized version of the
API for Brazil-specific taxes. For details,
see the content on SAP API Business
Hub.
Related Information
The base URL is the main part of the URL that you use to access the tax service and Tax Configuration APIs.
The following table shows how to build the base URLs for enterprise accounts on SAP Cloud Platform.
Related Information
You can use some or all of the features of the tax service in other SAP products.
For information about the features that are supported and how you can integrate the tax service, see the
following:
You can integrate the tax service with SAP S/4HANA to calculate applicable country-specific indirect taxes for
a business transaction, according to the guidelines of local tax authorities.
Prerequisites
If you're using an SAP partner service to calculate taxes according to local guidelines, subscribe to the partner
service in the SAP App Center . Complete the settings required by your chosen partner service.
Context
This section describes the steps that you must complete to enable the use of the tax service with your SAP S/
4HANA system.
Procedure
1. Onboard to the tax service by following the steps described in Onboarding to SAP Localization Hub, Tax
Service [page 13].
2. Configure the Partner Service Framework as described in Setting up the Partner Service Framework [page
119].
3. Configure the integration between the tax service and SAP S/4HANA by following the steps described in
the set-up instructions and in the test script.
Complete the following steps to access the set-up instructions and the test script:
Related Information
You can extend the tax service integration to meet your business requirements.
Prerequisites
You have configured the integration of SAP Localization Hub, tax service as described in Integrating the Tax
Service with SAP S/4HANA.
Context
The tax service integration uses standard data to calculate taxes in a business transaction. This standard data
is extracted from the S/4HANA business transaction and sent to the tax service in a json payload.
Find the interfaces where you can extend the tax service integration.
Context
These interfaces implement the IF_TXS_CLASS_ENHANCEMENT interface. To see all the Comprehensive
Interfaces available for enhancement, follow the steps below:
Procedure
Procedure
Align with your SAP Partner for tax service about this new information since it affects the tax calculation.
Create a new class and inherit the methods from the standard class you previously determined.
Context
Procedure
Procedure
1. Go to Customizing for Integration with Other SAP Components, choose SAP Localization Hub, tax service
Enhance Localization Interfaces for Tax Service .
2. Set your own class to be executed in place of the tax service standard localization classes for a determined
interface.
See an example of how to extand the integration of SAP S/4HANA with tax service:
Assume that John is the tax specialist of the company and needs the system to calculate taxes for the
company's purchases.
The company has some suppliers that resell or produce the goods interchangeably and this fact impacts the
tax calculation for this purchase operation.
The tax service integration does not identify if the supplier produces these goods or resells them. To enable the
system to identify this data, John asks the IT specialist, Donna, to take action.
Donna and John decide that they need to add a new field to the payload that identifies if the supplier resells or
produces the goods. Based on this decision, Donna determines that she needs to extend the integration in the
IF_TXS_ADDITIONAL_ITEM_INFO interface.
Donna contacts the company's SAP Partner for tax service and aligns with them about this new information in
the payload. Donna then creates the ZCL_TXS_ADDITIONAL_ITEM_INFO new class, inherits methods from
the standard class CL_TXS_ADDITIONAL_ITEM_INFO, and reimplements the
APPEND_ADDITIONAL_ITEM_INFO method.
In this method, Donna first calls the super method to keep SAP standard additional item information and then,
implements her own logic by adding a key/value pair with information required for tax calculation.
She names the key ownProduction to represent the information that they need to correctly calculate taxes.
The logic for the value information depends on the business of the company and must be extracted according
to its data model.
Donna creates the ZCL_TXS_ADDITIONAL_ITEM_INFO class and it is now available in the Enhance
Localization Interfaces for Tax Service customizing activity. She adds this class in the Class field and the
IF_TXS_ADDITIONAL_ITEM_INFO in the Interface field. since this logic is valid for Brazil, Donna adds BR in
the Country field.
With this implementation complete, John can calculate taxes considering if the suplier resells or produces the
goods involved in this business transaction.
You can integrate the tax service with SAP S/4HANA Cloud to calculate taxes for sales and purchase
operations in accordance with the guidelines from the tax authorities.
Prerequisites
If you're using an SAP partner service to calculate taxes according to local guidelines, subscribe to the partner
service in the SAP App Center . Complete the settings required by your chosen partner service.
This section describes the steps that you must complete to enable the use of the tax service with your SAP S/
4HANA Cloud system. You can extend the integration framework to calculate the relevant taxes for different
countries with additional coding.
Procedure
1. Onboard to the tax service by following the steps described in Onboarding to SAP Localization Hub, Tax
Service [page 13].
2. Configure the Partner Service Framework as described in Setting up the Partner Service Framework [page
119].
3. Configure the integration between the tax service and SAP S/4HANA Cloud by following the steps
described in the set-up instructions and in the test script.
Complete the following steps to access the set-up instructions and the test script:
1. Choose the scope item 43D in the SAP Best Practices Explorer.
2. Choose your version of SAP S/4HANA Cloud and country/region.
3. In the Details section, open the set-up instructions file and the test script.
Enable Tax Calculation for Brazil
4. To enable tax calculation for Brazil, some additional settings are required in SAP S/4HANA Cloud. See
Additional Settings.
Related Information
You can integrate the tax service with SAP Subscription Billing to calculate applicable country-specific indirect
taxes for orders and bills.
For information about the tax features that you can use in SAP Subscription Billing and for instructions about
how to configure the integration, see Tax Calculation.
You can configure the service to take into consideration the tax attributes of master data and you can integrate
tax calculation engines provided by partners.
If you want your master data to influence the tax determination and calculation processes, you can upload the
required tax attributes of your master data to the tax service (see Tax Attributes of Master Data [page 96]).
This feature requires activation. To request activation, mail us using the following e-mail template: Request
Activation of Master Data Features.
Tip
In the e-mail, we ask you for the technical name of your subaccount. To see the subaccount information,
choose the subaccount name in the breadcrumb at the top of the SAP Cloud Platform cockpit:
If you have business operations in countries that the standard tax service does not support, you can integrate
tax calculation engines provided by partners (see Setting up the Partner Service Framework [page 119]).
This feature requires activation. To request activation, mail us using the following e-mail template: Request
Activation of Partner Service Framework.
Tip
In the e-mail, we ask you for the technical name of your subaccount. To see the subaccount information,
choose the subaccount name in the breadcrumb at the top of the SAP Cloud Platform cockpit:
To meet your business requirements, you can enable the tax service to use the tax attributes of certain master
data to determine and calculate applicable indirect taxes on business transactions.
Prerequisites
You have activated master data features (see Configuring the Service [page 95]).
You can use the tax attributes of the master data for your company, products, suppliers, and customers.
The tax service uses unique identifiers and codes when it processes master data. For example, countries or
regions, tax rates, and tax types each have their own unique code or identifier. To enable the tax service to
interpret and process the tax attributes of your master data, you must upload the data to the tax service and
assign the required codes and identifiers to your master data.
Example
Your business operations involve the sales of goods in a special economic zone. The sale of such goods is
exempt from certain kinds of tax in some countries or regions. To use your tax exemption reason for these
business operations in the tax service, you need to identify the code that corresponds to the tax exemption
reason in question. Only then can the tax service process the tax exemption reason. To get the code that
corresponds to your tax exemption reason, you call the Code Provider for Tax Attributes API for the
required country or region. In the API response, you locate the tax exemption reason for a special economic
zone and use the corresponding code, such as 5, that is listed next to the tax exemption reason.
To store the tax attributes of master data in the tax service and use the required codes and identifiers, you
upload the data by using APIs or in batch mode.
Note
Even if you store the tax attributes of master data in your source system, you must upload the attributes to
the tax service for the master data to influence the tax determination and calculation process.
Upload Tax Attributes Using SAP API Business Hub [page 97]
Upload Tax Attributes Using a REST Service Client [page 102]
Upload Tax Attributes in Batch Mode [page 119]
You can upload tax attributes of your master data to the tax service using APIs on SAP API Business Hub.
Context
The main API that you use to upload tax attributes of master data is the Tax Configuration API. For some of the
parameters in the API, you need the specific codes and identifiers that the tax service requires. To get these
codes, you use the Code Provider for Tax Attributes API.
Procedure
To get the unique identifiers and codes that you need to specify in the Tax Configuration API, you use filter
criteria for the Code Provider for Tax Attributes API.
1. In the following table, locate the row that contains the tax attribute for which you need codes for the Tax
Configuration API.
2. Confirm the entry that you made in the $expand field in the Code Provider for Tax Attributes API on SAP
API Business Hub.
3. Use the data in the columns for the $filter field in the Code Provider for Tax Attributes API on SAP API
Business Hub.
Example
To complete your entries in the Tax Configuration API, you need the codes for tax types that are used in Italy.
In the Code Provider for Tax Attributes API on SAP API Business Hub, you select CountryDetails/
TaxTypeDetails in the $expand field. In the table below, you locate the row that contains tax types for a single
country or region and confirm the CountryDetails/TaxTypeDetails entry for the $expand field. The entry that
you need to make in the $filter field on SAP API Business Hub is CountryDetails/CountryCode eq 'IT'.
Related Information
You can upload tax attributes of your master data to the tax service using APIs in a REST service client.
Context
The main API that you use to upload tax attributes of master data is the Tax Configuration API. For some of the
parameters in the API, you need the specific codes and identifiers that the tax service requires. To get these
codes, you use the Code Provider for Tax Attributes API.
Procedure
When you upload tax attributes of your master data to the tax service by using the Tax Configuration API, you
need the required HTTP method and endpoint for the master data type in question.
To see the possible HTTP methods and endpoints, choose the required master data type from the following
sections. For details of the required payload, see the content on SAP API Business Hub.
Product
Add a new product POST <base URL for Tax Configuration API>TaxConfiguration/
classification en
TaxMasterDataConfig.svc/ProductClassifications
tity
Get all product GET <base URL for Tax Configuration API>TaxConfiguration/
classification enti
TaxMasterDataConfig.svc/ProductClassifications
ties in the data
base
Add a new com POST <base URL for Tax Configuration API>TaxConfiguration/
pany entity
TaxMasterDataConfig.svc/Companys
Get all company GET <base URL for Tax Configuration API>TaxConfiguration/
entities in the da
TaxMasterDataConfig.svc/Companys
tabase
Get a company en GET <base URL for Tax Configuration API>TaxConfiguration/
tity using the ID of
TaxMasterDataConfig.svc/Companys(<ID of business
partner>)
a business partner
Customer
Add a new cus POST <base URL for Tax Configuration API>TaxConfiguration/
tomer entity
TaxMasterDataConfig.svc/Customers
Get all customer GET <base URL for Tax Configuration API>TaxConfiguration/
entities in the da
TaxMasterDataConfig.svc/Customers
tabase
Supplier
Add a new supplier POST <base URL for Tax Configuration API>TaxConfiguration/
entity
TaxMasterDataConfig.svc/Suppliers
Get all supplier en GET <base URL for Tax Configuration API>TaxConfiguration/
tities in the data
TaxMasterDataConfig.svc/Suppliers
base
Get a supplier en GET <base URL for Tax Configuration API>TaxConfiguration/
tity using the ID of
TaxMasterDataConfig.svc/Suppliers(<ID of business
partner>)
a business partner
Related Information
To get the unique identifiers and codes that you need to specify in the Tax Configuration API, you use the Code
Provider for Tax Attributes API.
In the following table, locate the row that contains the tax attribute for which you need codes for the Tax
Configuration API. Call the corresponding endpoints to get the required codes.
Tax types (taxType) for <base URL for Tax Configuration https://
a single country API>TaxConfiguration/TaxValueHelp.svc/ taxconfiguration
TaasEntityLists?$expand=CountryDetails/ a7d6108fa-
TaxTypeDetails&$filter=CountryDetails/ c77539gg5d.hana.
CountryCode eq '<two-character country code ondemand.com/
(ISO 3166-1 alpha-2)>' TaxConfiguration
/
TaxConfiguration
/
TaxValueHelp.svc
/
TaasEntityLists?
$expand=CountryD
etails/
TaxTypeDetails&
$filter=CountryD
etails/
CountryCode eq
'IN'
Tax type (taxType) for <base URL for Tax Configuration https://
multiple countries API>TaxConfiguration/TaxValueHelp.svc/ taxconfiguration
TaasEntityLists?$expand=CountryDetails/ a7d6108fa-
TaxTypeDetails&$filter=CountryDetails/ c77539gg5d.hana.
CountryCode eq '<two-character country code ondemand.com/
(ISO 3166-1 alpha-2)>' or CountryDetails/ TaxConfiguration
CountryCode eq '<two-character country code /
(ISO 3166-1 alpha-2)>' TaxConfiguration
/
TaxValueHelp.svc
/
TaasEntityLists?
$expand=CountryD
etails/
TaxTypeDetails&
$filter=CountryD
etails/
CountryCode eq
'US' or
CountryDetails/
CountryCode eq
'ES'
Reasons for tax exemp <base URL for Tax Configuration https://
tion API>TaxConfiguration/TaxValueHelp.svc/ taxconfiguration
(taxExemptionReason TaasEntityLists?$expand=CountryDetails/ a7d6108fa-
) for a single country TaxTypeDetails/ExemptionTypeDetails/ c77539gg5d.hana.
TaxExemptionReasonDetails& ondemand.com/
$filter=CountryDetails/CountryCode eq '<two- TaxConfiguration
character country code (ISO 3166-1 alpha-2)>' /
TaxConfiguration
/
TaxValueHelp.svc
/
TaasEntityLists?
$expand=CountryD
etails/
TaxTypeDetails/
ExemptionTypeDet
ails/
TaxExemptionReas
onDetails&
$filter=CountryD
etails/
CountryCode eq
'IT'
Reasons for tax exemp <base URL for Tax Configuration https://
tion API>TaxConfiguration/TaxValueHelp.svc/ taxconfiguration
(taxExemptionReason TaasEntityLists?$expand=CountryDetails/ a7d6108fa-
) for the combination of TaxTypeDetails/ExemptionTypeDetails/ c77539gg5d.hana.
a country and tax type TaxExemptionReasonDetails& ondemand.com/
(taxType)
$filter=CountryDetails/CountryCode eq '<two- TaxConfiguration
character country code (ISO 3166-1 alpha-2)>' /
and CountryDetails/TaxTypeDetails/TaxTypeCode TaxConfiguration
eq '<tax type code>' /
TaxValueHelp.svc
/
TaasEntityLists?
$expand=CountryD
etails/
TaxTypeDetails/
ExemptionTypeDet
ails/
TaxExemptionReas
onDetails&
$filter=CountryD
etails/
CountryCode eq
'US' and
CountryDetails/
TaxTypeDetails/
TaxTypeCode eq
'1'
Reasons for tax exemp <base URL for Tax Configuration https://
tion API>TaxConfiguration/TaxValueHelp.svc/ taxconfiguration
(taxExemptionReason TaasEntityLists?$expand=CountryDetails/ a7d6108fa-
) for multiple countries TaxTypeDetails/ExemptionTypeDetails/ c77539gg5d.hana.
TaxExemptionReasonDetails& ondemand.com/
$filter=CountryDetails/CountryCode eq '<two- TaxConfiguration
character country code (ISO 3166-1 alpha-2)>' /
or CountryDetails/CountryCode eq '<two- TaxConfiguration
character country code (ISO 3166-1 alpha-2)>' /
TaxValueHelp.svc
/
TaasEntityLists?
$expand=CountryD
etails/
TaxTypeDetails/
ExemptionTypeDet
ails/
TaxExemptionReas
onDetails&
$filter=CountryD
etails/
CountryCode eq
'US' or
CountryDetails/
CountryCode eq
'IN'
Reasons for tax exemp <base URL for Tax Configuration https://
tion API>TaxConfiguration/TaxValueHelp.svc/ taxconfiguration
(taxExemptionReason TaasEntityLists?$expand=CountryDetails/ a7d6108fa-
) for multiple combina TaxTypeDetails/ExemptionTypeDetails/ c77539gg5d.hana.
tions of a country and TaxExemptionReasonDetails& ondemand.com/
tax type
$filter=(CountryDetails/CountryCode eq '<two- TaxConfiguration
character country code (ISO 3166-1 alpha-2)>' /
and CountryDetails/TaxTypeDetails/TaxTypeCode TaxConfiguration
eq '<tax type code>') or (CountryDetails/ /
CountryCode eq '<two-character country code TaxValueHelp.svc
(ISO 3166-1 alpha-2)>' and CountryDetails/ /
TaxTypeDetails/TaxTypeCode eq '<tax type TaasEntityLists?
code>') $expand=CountryD
etails/
TaxTypeDetails/
ExemptionTypeDet
ails/
TaxExemptionReas
onDetails&
$filter=(Country
Details/
CountryCode eq
'IN' and
CountryDetails/
TaxTypeDetails/
TaxTypeCode eq
'1') or
(CountryDetails/
CountryCode eq
'US' and
CountryDetails/
TaxTypeDetails/
TaxTypeCode eq
'1')
List of codes that de <base URL for Tax Configuration https://
scribe industry sectors API>TaxConfiguration/TaxValueHelp.svc/ taxconfiguration
(industrySectorCode TaasEntityLists?$expand=IndustrySectorDetails a7d6108fa-
s) c77539gg5d.hana.
ondemand.com/
TaxConfiguration
/
TaxConfiguration
/
TaxValueHelp.svc
/
TaasEntityLists?
$expand=Industry
SectorDetails
Tax number type codes <base URL for Tax Configuration https://
(taxNumberTypeCode) API>TaxConfiguration/TaxValueHelp.svc/ taxconfiguration
for multiple countries TaasEntityLists?$expand=CountryDetails/ a7d6108fa-
TaxNumbersDetails&$filter=CountryDetails/ c77539gg5d.hana.
CountryCode eq '<two-character country code ondemand.com/
(ISO 3166-1 alpha-2)>' or CountryDetails/ TaxConfiguration
CountryCode eq '<two-character country code /
(ISO 3166-1 alpha-2)>' TaxConfiguration
/
TaxValueHelp.svc
/
TaasEntityLists?
$expand=CountryD
etails/
TaxNumbersDetail
s&
$filter=CountryD
etails/
CountryCode eq
'US' or
CountryDetails/
CountryCode eq
'IN'
Related Information
To meet your business requirements, you can upload tax attributes of your master data to the tax service in
batch mode.
Context
If you have large amounts of master data that you want to store in the tax service, you can upload content that
you prepare in a spreadsheet using a dedicated UI.
Tip
If you want to use this feature, ask for templates by mailing us at Request Templates for Batch Upload
Feature.
Procedure
1. Choose the Operation to perform. You can create a new batch of master data for upload, or update the
records of existing master data.
2. Choose to Process all master data shortlisted for upload. Note that currently, you only have the option to
process all content, and not selective content.
3. Select the file for upload. Note that the files being uploaded should adhere to the given naming convention,
and the prescribed data upload format.
4. Choose Upload. The service uploads the master data content that the tax service considers for tax
determination.
You can extend SAP Localization Hub, tax service enabling tax calculation services provided by SAP partners as
an alternative to the tax service calculation engine. This also allows the tax service to support tax calculation in
countries that are not supported by the tax service calculation engine.
To enable tax service to use a SAP partner service, configure your system as described below.
Prerequisites
You have subscribed to a partner service in the SAP App Center and completed the settings required by your
chosen partner service.
Procedure
This process describes the creation of an HTTP destination for when you want to use an SAP partner service.
Context
To use an SAP partner service, you must enable the Partner Service Framework to connect to the SAP partner’s
tax engine. To enable this outbound communication, create an HTTP destination.
Procedure
Follow the steps described in Create HTTP Destinations. Use the information below to complete the steps.
To create the HTTP destination, you must provide data that you get from SAP and from your partner. See below
the data that SAP and your partner determine:
Data Determined by SAP
In the Name field, use the partner service destination name that you obtain when you send an HTTP GET
request to the https://<TaxConfigurationURL>/AvailableConfiguration.svc/
Destinations('<countryISO code>') URL.
Field Data
Related Information
For each country in which you have business operations, you can determine which of the available tax
calculation engines you want the tax service to use.
Context
Note
When you first access the tax service, the SAP partner service is deactivated and the tax service calculation
engine is set by default.
Procedure
1. In the SAP Cloud Platform cockpit, access the subaccount in which you have subscribed to the tax service.
After you configure a tax calculation engine for a given country, all tax calculations for that country are routed
to the partner.
When you use an SAP partner service calculation engine to calculate the taxes for your sales and purchases
operations, the tax service saves your selection of SAP partner service for each country in the cache to
accelerate the process.
The tax service keeps the information in the cache for 24 hours. This 24-hour period starts when you run a
sales or purchase operation and the tax service accesses the partner service information and caches it.
Only after the cache period is complete, the tax service updates the cache with the current partner service
information. This means that if you change any SAP partner service configuration during the cache period,
these changes take effect when the tax service updates the cache.
If you want to change the partner service that the tax service uses for your sales or purchases operations and
you want this change to be effective before the cache update, you can use the no-cache directive of the
Cache-Control HTTP header when calling the Partner Service. Using this directive, you can enforce the cache
update of the partner information before the 24-hour period.
Describes the security-relevant information that applies to SAP Localization Hub, tax service.
Related Information
The tax service uses the user management and authentication mechanisms provided by SAP Cloud Platform.
Listed below are the different authentication methods, under which the user management is considered:
● Single-Sign-On
● Basic – user name & password
● SAML2.0
● Client Certificate
For more information on the authentication methods supported by SAP Cloud Platform, refer to the link -
Authorization and Trust Management in the Neo Environment.
The tax service uses OAUTH protocol, which is one of the user management and authentication mechanisms
provided by SAP Cloud Platform.
SAP Cloud Platform handles the client authentication and the token validation. Once the token is validated, it
allows the consuming application to access the tax service. The OAUTH client credentials and the generated
token is not used for any further internal communications done by the tax service.
The tax service web application is deployed in a provider account on the SAP Cloud Platform. To consume the
service, the consumer must have the following:
When an application is accessed via a consumer specific URL, the application environment can identify the
current consumer through the tenant ID. With tenant-aware service, the following are achieved:
● Isolation of data
● Saving of resources, by their sharing among tenants
The tax service uses OAUTH, which is one of the user management and authentication mechanisms provided
by SAP Cloud Platform.
SAP Cloud Platform handles the client authentication and the token validation. Once the token is validated, it
allows the consuming application to access the tax service. The OAUTH client credentials and generated token
is not used for any furthyer internal communications done by Tax Service.
11.2 Authorizations
When a consumer ends the contract, the tax service is legally obliged to terminate all the consumer-related
data. Data is physically and irreversibly deleted in a way that it cannot be restored or recovered by re-use of
resources (for example, storage).
The tax service uses OAuth 2.0 as secure access for the tax service web application.
The service provides a RESTful API that consumers can use to call the the service to determine and calculate
tax. Authorizations to the service are handled through submissions of OAuth token URL, by the consuming
application along with registered client credentials.
1. The consuming application accesses the tax service by calling the OAuth token URL with its registered
client credentials.
2. OAuth grants authorization to the client based on specific scope of the client.
3. It also provides an OAuth token with time-bound validity.
4. Consuming application calls the tax service application API with the valid OAuth token
5. SAP Cloud Platform validates the OAuth token and the request is passed to the tax service.
6. The tax service determines applicable taxes and returns the output to the consuming application.
Access to the tax service and Tax Configuration APIs is managed using role-based authorizations.
The roles apply to the OAuth clients in the Java applications that are subscribed for the tax service and Tax
Configuration APIs. Role-based authorizations ensure controlled access. The following tables show which roles
are available.
Administrator (Administrator) The administrator of the global account on SAP Cloud Platform.
Key User (KEYUSER) A business user who simulates and verifies the calculation of taxes.
Administrator (Administrator) The administrator of the global account on SAP Cloud Platform.
Key User (KEYUSER) A business user who configures the tax determination and calculation functions.
Related Information
The taxconfiguration application uses OAuth 2.0 protocols (authorization code flows) to authenticate
users.
Creation and updates of master data can be done using predefined excel templates. For example, the
Customer excel template can be used to upload multiple customer instances at a time.
oAuth protocol is used for authorization. The process of authorization for a batch upload is as follows:
● User registers with a client ID, and tenant account grant type as Authorization Code.
● A trust setting is created between the tenant account and provider account, with the certificate available in
the tenant local provider tab.
● Destination is created on the tenant account with the clientID and other attributes.
● On the IDP user login page of the Batch Upload user interface, the user needs to authenticate himself or
herself.
When the user uploads the excel on to the Batch Upload UI, it internally accesses the Tax Configuration API,
through the destination with oAuth, and creates master data content in the database.
You use the Tax Service Simulator to test the calculation results in the tax service.
The application calls the Tax Service API to calculate taxes based on a payload.
When consumers call the Tax Service API, the request and corresponding response payload are logged for
auditing purposes. You can also use the log to get the tax determination trace of any call to the tax service. The
details that are recorded in the log are used to track application usage. Audit logs are archived for future use.
When consumers call the Tax Configuration API to create or update the master data configuration for a
company, supplier, customer, or product, the request and corresponding response payload are logged for
auditing purposes.
Related Information
Partner Services Framework (PSF) enables the third-party services provided by partners to be invoked for tax
determination and calculation.
All available partner tax services are stored in the provider accounts schema of the Hana DB and is common to
all the consumers onboarded in that account. Customers can configure the partner tax service to be used for a
country through the Manage Tax Configuration web application. This configuration is tenant-specific and is
stored in the customer tenant schema of the Hana DB.
This section describes the methods by which the tax service processes consumer data and stores the relevant
information in an SAP S/4HANA database in SAP Cloud Platform.
Transaction data is passed by the consumer directly in the request API for tax calculation. The consumer data
consists of transaction details such as:
● Sale, purchase, or currency item details, such as material, service, quantity, or price
● Location details, such as the address of the seller and buyer. The details might also belong to B2C
consumers.
The master data needed for tax determination is persisted in the database. The consumer master data details
for the entities listed below are stored under each specific tenant schema created for each subscriber:
● Company
● Supplier
● Customer
● Product
Audit Logger
When the Tax Service API and Tax Configuration APIs are called, the request and corresponding response
payload is logged for auditing purposes.
Data protection is associated with numerous legal requirements and privacy concerns. In addition to
compliance with general data protection and privacy acts, it is necessary to consider compliance with industry-
Note
SAP does not provide legal advice in any form. SAP software supports data protection compliance by
providing security features and specific data protection-relevant functions, such as simplified blocking and
deletion of personal data. In many cases, compliance with applicable data protection and privacy laws will
not be covered by a product feature. Definitions and other terms used in this document are not taken from
a particular legal source.
Handle personal data with care. You as the data controller are legally responsible when processing personal
data.
Transaction data passed by the consuming application while accessing the Tax Service API is logged for audit
purpose. The subscribers can access the audit log data maintained under their account ID using the Audit Log
API, along with their oAuth token.
The tax service has implemented the Customer Data Termination (CDT) process, where once the consumer
terminates the contract or the subscription for tax service, the below consumer details that are deleted during
the retention period:
● Tax configuration and master data content maintained by consumers in the SAP HANA database
● Audit Logging trace content for the tax service and Tax Configuration APIs
11.4.1 Glossary
The following terms are general to SAP products. Not all terms may be relevant for SAP Localization Hub, tax
service.
Term Definition
Business purpose The legal, contractual, or in other form justified reason for
the processing of personal data to complete an end-to-end
business process. The personal data used to complete the
process is predefined in a purpose, which is defined by the
data controller. The process must be defined before the per
sonal data required to fulfill the purpose can be determined.
Consent The action of the data subject confirming that the usage of
his or her personal data shall be allowed for a given purpose.
A consent functionality allows the storage of a consent re
cord in relation to a specific purpose and shows if a data
subject has granted, withdrawn, or denied consent.
End of business Defines the end of active business and the start of residence
time and retention period.
End of purpose (EoP) End of purpose and start of blocking period. The point in
time when the primary processing purpose ends, for exam
ple, a contract is fulfilled.
End of purpose (EoP) check A method of identifying the point in time for a data set when
the processing of personal data is no longer required for the
primary business purpose. After the EoP has been reached,
the data is blocked and can only be accessed by users with
special authorization, for example, tax auditors.
Purpose The information that specifies the reason and the goal for
the processing of a specific set of personal data. As a rule,
the purpose references the relevant legal basis for the proc
essing of personal data.
Residence period The period of time between the end of business and the end
of purpose (EoP) for a data set during which the data re
mains in the database and can be used in case of subse
quent processes related to the original purpose. At the end
of the longest configured residence period, the data is
blocked or deleted. The residence period is part of the over
all retention period.
Retention period The period of time between the end of the last business ac
tivity involving a specific object (for example, a business
partner) and the deletion of the corresponding data, subject
to applicable laws. The retention period is a combination of
the residence period and the blocking period.
Sensitive personal data A category of personal data that usually includes the follow
ing type of information:
Technical and organizational measures (TOM) Some basic requirements that support data protection and
privacy are often referred to as technical and organizational
measures (TOM). The following topics are related to data
protection and privacy and require appropriate TOMs, for ex
ample:
Where-used check (WUC) A process designed to ensure data integrity in the case of
potential blocking of business partner data. An application's
where-used check (WUC) determines if there is any depend
ent data for a certain business partner in the database. If de
pendent data exists, this means the data is still required for
business activities. Therefore, the blocking of business part
ners referenced in the data is prevented.
11.4.2 Consent
In SAP Localization Hub, tax service, user consent is not collected for address information of Business to
Customer (B2C) customer. The API is invoked by the consuming application which needs to capture the
consent from the data subject.
Read-access logging (RAL) is not implemented as the Tax Service and Tax Configuration applications do not
persist any sensitive personal information about individuals.
An information report is a collection of data relating to a data subject. A data privacy specialist may be required
to provide such a report or an application may offer a self-service.
To enable data subjects to obtain information about their data in the tax service, we provide the Audit Logger to
simplify the retrieval of personal information. For the specifics of each API, see the following sections.
A user assigned the Administrator role can access the logs of all requests sent to - and responses received from
- the Tax Service API in a given tenant.
For detailed information, see the content for the Tax Service API on SAP API Business Hub.
Read the application logs of Administrator <base URL for Tax GET
the tax service application. Service
(Administrator)
API>tenantAccessLog
s
Delete the application logs of Administrator <base URL for Tax DELETE
the tax service application. Service
(Administrator)
API>tenantAccessLog
s
Read the archived application DPO (DPO) <base URL for Tax GET
logs of the tax service appli Service
cation. API>getArchivedAcce
ssLogs
You can use special end points to view the logs of all requests sent to - and responses received from - the Tax
Configuration API in a given tenant. Depending on the purpose, you must be assigned the Administrator or DPO
(Data Protection Officer) role to be able to view the logs. The following table shows an overview of the tasks
that are possible and the corresponding roles.
For detailed information, see the content for the Tax Configuration API on SAP API Business Hub.
Read the application logs of Administrator <base URL for Tax GET
the tax configuration applica Configuration
(Administrator)
tion. API>MasterDataAcces
sLogs
Read the change logs from Administrator <base URL for Tax GET
the master change log table Configuration
(Administrator)
of the tax configuration appli API>MasterDataChang
cation. eLogs
Read the change logs from Administrator <base URL for Tax GET
the change log details table Configuration
(Administrator)
of the tax configuration appli API>MasterDataChang
cation. eLogDetails
Read the archived application DPO (DPO) <base URL for Tax GET
logs of the tax configuration Configuration
application. API>ArchivedApplica
tionAccessLog
Read the archived change DPO (DPO) <base URL for Tax GET
logs from the change log Configuration
master table of the tax con API>ArchivedChangeL
figuration application. ogMaster
Read the archived change DPO (DPO) <base URL for Tax GET
logs from the change log de Configuration
tails table of the tax configu- API>ArchivedChangeL
ration application. ogDetails
Related Information
11.4.5 Deletion
When handling personal data, consider the legislation in the different countries where your organization
operates.
After the data has passed the end of purpose, regulations may require you to delete the data. However,
additional regulations may require you to keep the data longer. During this period, you must block access to the
data by unauthorized persons until the end of the retention period, when the data is finally deleted. Personal
data can also include referenced data. The challenge for deletion and blocking is first to handle referenced data
and then other data, such as business partner data.
Prerequisites
To meet legal requirements concerning the deletion of personal data of a data subject, you must have stored
the legally defined retention period for the country in which your organization operates (see Configure
Retention Period [page 135]).
1. A user with the Administrator role gets the data that relates to a data subject by selecting the application
logs that contain the data related to a data subject.
1. An administrator of the consuming application determines the document IDs that relate to the data
subject.
2. An administrator of the consuming application selects the the application logs that relate to the data
subject using the <base URL for Tax Service API>tenantAccessLogs with the GET method
and the document IDs. For detailed information, see the API reference information for the Tax Service
API on SAP API Business Hub.
2. A user with the Administrator role deletes the data that was selected in the previous step. The
administrator of the consuming application calls the URL <base URL for Tax Service
API>tenantAccessLogs with the DELETE method. For detailed information, see the API reference
information for the Tax Service API on SAP API Business Hub.
The data is marked for deletion and placed in an archive file by a background job that runs at fixed intervals
on the provider account of SAP Cloud Platform.
Note
Access to the data in the archive file is restricted to users with the DPO role.
3. After the legally defined retention period expires, a background job deletes the data in the archive file at
fixed intervals.
When a consumer terminates a contract with the tax service, SAP is obliged to terminate all data related to the
consumer. The data related to the consumer is stored in a tenant-specific schema.
To delete the data, the consumer must unsubscribe from the tax service in the SAP Cloud Platform cockpit.
SAP processes the request and deletes data after the standard retention period of 60 days.
Related Information
To meet legal requirements concerning the deletion of personal data of a data subject, you must store the
retention period that applies to the country in which your organization operates.
The following table shows the different operations that you can use to set and update the retention period.
Set the retention period POST <base URL for Tax To set a retention period of
Service 30 days: https://
API>SaveConfig? taxservicea7d6108fa
key=RetentionPeriod -
&value=<number><UNI c77539gg5d.hana.ond
T OF TIME> emand.com/
TaxService/
SaveConfig?
key=RetentionPeriod
&value=30DAY
Get the currently active re GET <base URL for Tax https://
tention period Service taxservicea7d6108fa
API>SaveConfig? -
key=RetentionPeriod c77539gg5d.hana.ond
emand.com/
TaxService/
SaveConfig?
key=RetentionPeriod
Update the currently active PUT <base URL for Tax To update the existing reten
retention period Service tion period to 60 days:
API>SaveConfig? https://
key=RetentionPeriod taxservicea7d6108fa
&value=<numberUNIT> -
c77539gg5d.hana.ond
emand.com/
TaxService/
SaveConfig?
key=RetentionPeriod
&value=60DAY
Note
You can use the following units of time in the URL: DAY, WEEK, MONTH, YEAR.
Related Information
The tax service application persists only audit log. There is no change possible to this data. Therefore, this is
not relevant for change logging.
In the Tax Configuration application, any changes to the data of a data subject are logged with the information
of the user, change data and time, previous value, and current value.
You can use special end points to view the change logs. Depending on the purpose, you must be assigned the
Administrator or DPO (Data Protection Officer) role to be able to view the logs. The following table shows an
overview of the tasks that are possible and the corresponding roles.
For detailed information, see the content for the Tax Configuration API on SAP API Business Hub.
Read the change logs of the Administrator <base URL for Tax GET
tax configuration application. Configuration
(Administrator)
API>MasterDataChang
eLogs
Delete the change logs of the Administrator <base URL for Tax DELETE
tax configuration application. Configuration
(Administrator)
API>MasterDataChang
eLogs
Read the change logs from Administrator <base URL for Tax GET
the change log details table Configuration
(Administrator)
of the tax configuration appli API>MasterDataChang
cation. eLogDetails
Delete the change logs from Administrator <base URL for Tax DELETE
the change log details table Configuration
(Administrator)
of the tax configuration appli API>MasterDataChang
cation. eLogDetails
Read the archived change DPO (DPO) <base URL for Tax GET
logs from the change log Configuration
master table of the tax con API>ArchivedChangeL
figuration application. ogMaster
Read the archived change DPO (DPO) <base URL for Tax GET
logs from the change log de Configuration
tails table of the tax configu- API>ArchivedChangeL
ration application. ogDetails
Related Information
The tax service does not store any details about the oAuth user password created by the consumer in its
subscriber account.
Calls to the tax service are logged to separate tenant-specific audit logger database tables. Additionally,
changes to the entities in the taxconfiguration application are logged in the change access log. The GET
APIs for the tax service are accessible only to users with specific roles.
The base URL is the main part of the URL that you use to access the tax service and Tax Configuration APIs.
The following table shows how to build the base URLs for enterprise accounts on SAP Cloud Platform.
Related Information
This section describes the measures taken to protect the tax service against denial-of-service (DoS) attacks.
Denial-of-service (DoS) attacks are intentional or accidental attacks through an external third party. DoS
attacks can impact the availability or performance of the tax service caused by excessive use by one or more
consumers.
The aim of DoS protection measures is to make the tax service more robust towards server overload caused by
excessive use, and to differentiate DoS attacks from legitimate use.
Note
Complete protection is not possible because there is no clear distinction between legitimate and excessive
use.
To mitigate the potential impact of DoS attacks, the number of requests to the taxservice application that is
subscribed in a given tenant is limited to 50 requests per second. All requests over and above this limit are
rejected.
This section describes the measures taken to protect thetax service against cross-site scripting (XSS) attacks.
Cross-site scripting (XSS) is the name of a class of security vulnerabilities that can occur in Web applications. It
summarizes all vulnerabilities that allow an attacker to inject HTML Markup and/or JavaScript into the front
end of the affected Web application.
XSS can occur whenever the application dynamically creates its HTML/JavaScript/CSS content, which is
passed to the user's web browser, and attacker-controlled values are used in this process. If these values are
included in the generated HTML, JavaScript, or CSS without proper validation and encoding, the attacker is
able to include arbitrary HTML, JavaScript, or CSS into the application's front end. The code is then rendered
by the victim's web browser and interpreted in the victim's current authentication context.
To protect against XSS, some address fields are subject to validation checks. The validation checks ensure that
only alphanumeric characters, hyphens, dots, commas, pound signs (hashes), and single spaces are
permitted.
The following subsections show which fields are subject to validation checks.
This section describes how you can get support if things start to go wrong.
Getting Support
If you encounter an issue with this service, we recommend that you follow the procedure below:
For more information about selected platform incidents, see Root Cause Analyses.
Hyperlinks
Some links are classified by an icon and/or a mouseover text. These links provide additional information.
About the icons:
● Links with the icon : You are entering a Web site that is not hosted by SAP. By using such links, you agree (unless expressly stated otherwise in your
agreements with SAP) to this:
● The content of the linked-to site is not SAP documentation. You may not infer any product claims against SAP based on this information.
● SAP does not agree or disagree with the content on the linked-to site, nor does SAP warrant the availability and correctness. SAP shall not be liable for any
damages caused by the use of such content unless damages have been caused by SAP's gross negligence or willful misconduct.
● Links with the icon : You are leaving the documentation for that particular SAP product or service and are entering a SAP-hosted Web site. By using such
links, you agree that (unless expressly stated otherwise in your agreements with SAP) you may not infer any product claims against SAP based on this
information.
Example Code
Any software coding and/or code snippets are examples. They are not for productive use. The example code is only intended to better explain and visualize the syntax
and phrasing rules. SAP does not warrant the correctness and completeness of the example code. SAP shall not be liable for errors or damages caused by the use of
example code unless damages have been caused by SAP's gross negligence or willful misconduct.
Gender-Related Language
We try not to use gender-specific word forms and formulations. As appropriate for context and readability, SAP may use masculine word forms to refer to all genders.
SAP and other SAP products and services mentioned herein as well as
their respective logos are trademarks or registered trademarks of SAP
SE (or an SAP affiliate company) in Germany and other countries. All
other product and service names mentioned are the trademarks of their
respective companies.