United Kingdom: Making Tax Digital - VAT Statement submission change on Dynamics AX 2012 R3

Applies to: Dynamics AX 2012 R3

Introduction


On July 13,2017, the Financial Secretary to the Treasury and Paymaster General in theUnited Kingdom announced that Making Tax Digital (MTD) for value-added tax(VAT) will take effect on April 1, 2019.

MTDintroduces an obligation for VAT-registered businesses to keep their recordsdigitally (for VAT purposes only) and to provide VAT return information to HerMajesty’s Revenue and Customs (HMRC) through software that is functionallycompatible with MTD. Starting April 1, 2019, MTD for VAT will be mandatory forbusinesses that have turnover which exceeds the VAT registration threshold(currently £85,000). It will remain voluntary for VAT-registered businessesbelow the VAT threshold until 2020 at the earliest.

VAT returnswill have to be submitted to HMRC using software that is compatible with MTD.VAT returns can no longer be submitted by the former method using the HMRCportal.

VAT returnsare filed quarterly or monthly in the UK. The deadline for submitting thereturn online and paying HMRC is one calendar month and seven days after theend of the VAT period.

As HMRCstates on the official website, the current amendment process will stay inplace for VAT:

·        Ifthe net value of the errors on the VAT return is less than £10,000, the companywill amend them in the next VAT return.

·        Ifthe net value of the errors exceeds £10,000, the company must complete the VAT652 form, which is available on the GOV.UK website.

For moreinformation about MTD for VAT, see MakingTax Digital for VAT: legislation overview.

Overview


Softwarethat is compatible with MTD must support the following requirements:

·        Keepthe required records in a digital form.

·        Preservethose records in digital form for up to 6 years.

·        Createa VAT return from the digital records that are held in functionally compatiblesoftware, and digitally provide this information to HMRC.

·        ProvideVAT data to HMRC on a voluntary basis.

·        Receive,via the MTD for VAT application programming interface (API) platform,information from HMRC about a relevant entity’s compliance with obligationsunder the regulations.

As HMRCmentions in Making Tax Digital for Business VATGuide for Vendors,users must sign up for the MTD service for VAT, even if they have alreadysigned up to use the MTD service for income tax. For more information about howto get ready for MTD, see Making Tax Digital: how VATbusinesses and other VAT entities can get ready.

To support the MTD for VAT requirements in Dynamics AX 2012 R3 thehotfix covers the mandatory scope of interoperation to let companies in the UKfulfill their VAT obligations:

·        Retrieve VAT obligations: Users can initiate a requestto HMRC to obtain their company’s VAT obligations for a specific period. HMRCwill post, as a response to each user’s request, information about thecompany’s VAT obligations that is defined in the company’s profile on the HMRCside. VAT obligations contain information about the VAT period, the due datefor submission, and the status of the obligation. This information will bereflected in Dynamics AX 2012 R3.

·        Submit VAT return for period: The system willcollect information about VAT returns. The information collected is based onthe Sales tax payment transactions that have been posted in the system via thesales tax settlement process, with respect to the VAT obligations that areregistered in the system. After this information is collected in JavaScriptObject Notation (JSON) file generated, user will submit the report to HMRC. TheHMRC response to the submission will be reflected in Dynamics AX 2012 R3.

Setup

When acompany is signed up for the MTD service for VAT in HMRC, to get Dynamics AX2012 R3 ready to interoperate with HMRC web service for retrieving VAT obligationsand submission of VAT returns the following steps should be done in the DynamicsAX 2012 R3:

·        Setup Web service parameters

·        Setup Web application for production use or testing interoperation with HMRC's sandbox

·         Obtain Authorizationcode

·        Get Access token and activate application

Set up Web service parameters

Open General ledger > Setup > External services > Webservice parameters form.

Use thisform to define following parameters of the Web service:

Field

Description

Value example

Sandbox base URL

When a sandbox web application is created on HMRC side, define its base URL https address.

Production base URL

When your HMRC account is setup on production application, define its base URL https address.

Authorization URL path

Set up authorization URL path used for HMRC web application.

/oauth/authorize

Token URL path

Set up token URL path used for HMRC web application.

/oauth/token

image.png

Set up Web application for testing

Open General ledger > Setup > External services > Web applicationsform.

Use thisform to define following parameters of a Web application:

Field

Description

Application name

Type a name of the application. It can be the name of the application in HMRC or any other you choose to identify the application in AX.

Description

Fill in a description of the application.

Application type

Select Sandbox, if you are going to use this application for testing purposes connecting to an HMRC’s sandbox.

Depending on this type system will use either Sandbox base URL address of the Web-service.

Settlement period

Select AX Sales tax settlement period for which VAT returns must be submitted using this Web application.

Only one Sales tax settlement period can be selected for each Web application.

Client ID

Type Client ID of the Web application. This parameter is related to a set of HMRC application parameters and can be found in Manage credentials section of an application in HMRC portal.

Client secret

Type Client secret of the Web application. This parameter is related to a set of HMRC application parameters and can be found in Manage credentials section of an application in HMRC portal.

Redirect URL

Type Redirect URL of the Web application. This parameter is related to a set of HMRC application parameters and can be found in Manage redirect URIs section of an application in HMRC portal.

Access token will expire in

This is a read-only field which shows when the last received access token will expire. This field is updated automatically when an access token is received from HMRC.

Scope

This is a read-only field which shows a scope which was requested from HMRC for the application during initial authorization for the application.

User must fill in this value manually on HMRC authorization.

The following values are allowed by HMRC:

-          read:vat

-          write:vat

-          read:vat write:vat

It is recommended to use “read:vat write:vat” as the same application must be used for both GET and POST https requests to the web service.

Create Test user

This functionis available for applications of Sandbox type only. Click on Get test user button on the Action paneof Web applications form to create atest user which can be used to access HMRC’s sandbox environment. Type Servertoken of your testing application in the dialog and click OK. Server token is aparameter of an HMRC’s application. It can be found in Manage credentials section of your testing HMRC’s application onHMRC portal. When you click OK button of the dialog, a request for test user issent to HMRC and a response is received. You will be able to see the responsein Test userdata form in AX. Don’t close this form until you get an Authorizationcode as information in it will be requested by HMRC to sign in on getting HMRCauthorization. Following three parameters from this response will be furtherused:

-         User ID - you will copy and paste it during sing in onHMRC portal for Authorization code retrieving.

-         Password - you will copy and paste during sing in onHMRC portal for Authorization code retrieving.

-         VRN – will be saved automatically in AX. This VATregistration number will be used for testing interoperation with HMRC.

To be ableto create a test user, Create test userAPI must be activated for your HMRC’s application. To do so, open Manage API subscriptions section foryour testing application in HMRC portal and activate Create test user API in TestSupport APIs.

Obtain Authorization code

Authorizationcode is needed to request an Access token. Authorization code received fromHMRC is valid only 10 minutes within which an Access token can be requested. Ifan Access token is not requested and Authorization code has expired, a newAuthorization code must be requested.

Click HMRC authorization button on the Actionpane of Web applications form to getan Authorization code from HMRC. It is recommended to type “read:vat write:vat” in Scope field of the dialog so theapplication could be allowed for both GET and POST https requests. Click OK tosend your Authorization code request to HMRC. You will be redirected to HMRCsign in web page. Click Continuebutton and use you company’s User IDand Password granted during HMRConline account registration for production web application authorization. For Sandbox application, copyand paste User ID and Password from the Test user data form in AX which you received from HMRC on Test user creation stage:

MTD-1.jpg

Copy Authorization code created by HMRC andgo back to AX to initialize getting of Access token during 10 minutes.

Get Access token and activate application

Initializegetting of Access token during 10 minutes from the moment an Authorization code was generated byHMRC.

Click Get access token button on the Actionpane of Web applications form torequest an Access token form HMRC. Past value copied on the previous “Obtain Authorization code” step to the Authorization code field of thedialog and click OK. Access token request will be sent to HMRC and an Accesstoken will be automatically saved in AX from the HMRC’s response. It is notallowed to review the token from user interface of AX. You can observe validityperiod of Access token in Access tokenwill expire in field. Each Access token is valid during 4 hours from themoment when it was created by HMRC. To receive a new one, you don’t need torenew an Authorization code. For this purpose, you need to Refresh accesstoken.

When Access token is granted, mark Active field of the application to usethis application for further interoperation with HMRC. Only one Web application can be active for each Sales tax settlement period. Systemwill not allow to activate a Web application before an Access token is receivedfrom HMRC.

Refreshing access token

Each Accesstoken is valid during 4 hours from the moment when it was created by HMRC.

Click on Refresh access token button on theAction pane of Web applications formto manually initiate refreshing of an access token. Refresh Access tokenrequest will be sent to HMRC and a new Access token will be automatically savedin AX from the HMRC’s response.

It is not needed to refresh token manually each4 hours or before you start to interoperate with HMRC. During interoperationwith HMRC this refreshing Access token procedure will be initializedautomatically and refreshing of Access token will be hidden from user.

Set up Webapplication for production use 

When a company is ready to interoperate with MTD forVAT in live, it must sign up to MTD and create a HMRC  online account (Government Gateway account) unlessone already exist. The company will then need to link it to the MicrosoftDynamics AX 2012 R3 application by selecting Microsoft Dynamics AX 2012 R3as the software. The company will then obtain user credentials (User ID andpassword) that are linked to its VAT registration number:

·         UserID – The name that is used to access HMRC while an authorization code isbeing requested.

·         Password– The password that is used to access HMRC while an authorization code is beingrequested

After the company has obtained user credentials anapplication of Production type can be setup on AX side. Application ofproduction type is uniquely identified by Client ID and Client secretand are provided by Microsoft (unless the company is creating their ownsolution for any Dynamics AX version). The following steps must be done on AXside to setup the application of Production type:

1.    Open LCS portal, go to Shared asset library:

image.png

2.    Select Data package section and find latest (byModified date) version of UK_MTD_VAT_AX2012R3_ProdApll.zip file,download this file on your computer:

image.png

3.    Open in Dynamics AX 2012 R3 General ledger >Setup > External services > Web applications formand create a new record. Fill in fields:

Field

Description

Application name

Type a name of the application. It can be any name you choose to identify the application in AX.

Description

Fill in a description of the application.

Application type

Select “Production” when you create an application for production usage which you are going to use for real-life submission of VAT returns to HMRC.

Settlement period

Select AX Sales tax settlement period for which VAT returns must be submitted using this Web application.

Only one Sales tax settlement period can be selected for each Web application.

Redirect URL

Type “urn:ietf:wg:oauth:2.0:oob” in this field.

4.    Click “Initialization of production application”button on the Credentials fast tab:

image.png

5.    Select previously downloaded from LCS portal UK_MTD_VAT_AX2012R3_ProdApll.zipfile. Don’t unzip the file. Click OK button and production applicationcredentials will be populated to the system:

image.png

6.    Client ID and Clientsecret of production application are populated in your system in encryptedformat:

image.png

When web application of production type is setup in AX,authorize it to get ready to interoperate with HMRC:

1.    Open General ledger > Setup > Externalservices > Web applications form and select web application ofproduction type for which Client ID and Client secret areimported.

2.    Click HMRC authorization button on the Actionpane to obtain Authorization code from HMRC for the selected web application, specify“write:vat read:vat” in Scope field and click OK:

image.png

3.    A web browser will be opened, and you will be directedon HMRC portal for authorization. Authorize on the page with User ID andPassword, which were obtained for your company via online account onHMRC. As a result, an Authorization code will be generated and shown onthe browser page.

4.    Copy Authorization code and open Generalledger > Setup > External services > Webapplications form in AX again. Authorization code is valid only 10minutes within which an Access token can be requested. If an Access tokenis not requested and Authorization code has expired, a new Authorization codemust be requested.

5.    Click Get access token button in Generalledger > Setup > External services > Webapplications form in AX and paste Authorization code copied on theprevious step. Each Access token is valid during 4 hours from the momentwhen it was created by HMRC. To receive a new one, you don’t need to renew anAuthorization code. For this purpose, you need to Refresh the access token.

6.    As a result, an Access token will be granted byHMRC and saved in your system. You will see “Access token expire in” and“Scope” fields are filled in for the selected web application ofproduction type.

Use Refresh access token button on the Actionpane of General ledger > Setup > External services> Web applications form in AX to manually initiate an access tokenrefreshing.

7. Activate the web application by setting Active check-box for the related web application:

image.png

When you have set Active a web application of production type, your system is ready to interoperate with HMRC for VAT MTD in live.

Retrieving VAT obligationsfrom HMRC

When Web service parameters are setup and Web application is created andactivated, system is ready to interoperate with HMRC.

(!) Important note: VAT registration number (VRN) of the legal entity must be defined in OrganizationAdministration > Legal Entities, on the Foreign trade andlogistics tab, in the "VAT exempt number export” field. This field isused as a VRN source for VAT 100 report and MTD-feature, respectively.

Open General ledger > Periodic > Sales tax payments > UnitedKingdom > VAT returns submission form.This form presents information about VAT obligations and returns and serves forinteroperation with HMRC web service.

Field

Description

Start date

Start date of an accounting period in HMRC.

End date

End date of an accounting period in HMRC.

HMRC status

Reporting status of an accounting period in HMRC. It can be either Open or Fulfilled.

Period key

VAT obligation related to an accounting period in HMRC is identified in HMRC by value of Period key field.

This field is not shown on the form and must be hidden from the user interface to complete the requirement of the HMRC.

Settlement period

AX Sales tax settlement period set up for the Web application. VAT return will be calculated basing on Sales tax transactions posted in this Sales tax settlement period.

Status

AX internal Status of VAT obligation. It can be either:

-          Created

-          Generated

-          Submitted

-          Error.

Due date

The due date for this obligation period. This field is updated from HMRC only.

Received date

The obligation received date. This field is updated from HMRC only when VAT obligation is fulfilled.

VAT return

This field shows generated VAT return in JSON format. User can review calculated amounts before their submission to HMRC.

Sales tax payment version

This field shows value of Sales tax payment version parameter with which VAT return was generated.

Processing date

The date when the VAT return was processed in the HMRC. This field is updated from HMRC only when VAT obligation is fulfilled.

Payment indication

Is “DD” if the netVatDue value is a debit and HMRC holds a Direct Debit Instruction for the client. Is “BANK” if the netVatDue value is a credit and HMRC holds the client’s bank data. Otherwise not present. This field is updated from HMRC only when VAT obligation is fulfilled.

Form bundle number

Unique number that represents the form bundle. The HMRC system stores VAT Return data in forms, which are held in a unique form bundle. This field is updated from HMRC only when VAT obligation is fulfilled.

You mayreview all the actions done with a VAT obligation on the Log fast tab.

VATobligations must be received first from the HMRC. Click Retrieve VAT obligations button on the Action pane.

Field

Description

Settlement period

Select AX Sales tax settlement period in this field. This must be a Sales tax settlement period for which you want to get your VAT obligations and further submit VAT return. This parameter defines the Web application in the system to be used to interoperate with HMRC.

Start date

Select the date starting from which you want to retrieve VAT obligations from HMRC.

End date

Select the end date of a period for which you want to retrieve VAT obligations from HMRC.

An active Web application set up for the Salestax settlement period will be used for interoperation with HMRC. If thisapplication is of “Sandbox” type,you will see an additional dialog with Testscenario field. Define one of testing scenario supported by HMRC (seeManage API subscriptions > APIs > VAT > Endpoints > Retrieve VATobligations > Test data section of HMRC related to your testing application,to find all the Gov-Test-Scenario). For example, you can type “QUARTERLY_NONE_MET”in this field to simulates the scenario where the client has quarterlyobligations and none are fulfilled. You may leave this field blank to initiate“Default” testing scenario which simulates the scenario where the client hasquarterly obligations and one is fulfilled. Click OK button. Your request toHMRC will be sent and response received. According to the response, new recordsin VAT returns submission form willbe created or existing updated. 

MTD-3.jpg


Generate VAT return inJSON

MTD for VATaccepts VAT returns in JSON format only. To generate VAT return in JSON format selecta record on VAT returns submissionform related to the obligation period you are going to report. Click on Generate VAT return button on theAction pane of VAT returns submissionform. Select in Sales tax paymentversion field of the dialog one of the values similarly to you select on Sales tax payments report generation:

-         Original

-         Corrections

-         Latestcorrections

-         Totallist.

Click OK.VAT return in JSON format will be generated and available for review in VAT return field.

You mayregenerate VAT return several times until you submit it to HMRC.

MTD-4.jpg


Submitting VAT returns toHMRC

When VATreturn in JSON format is generated and ready to be submitted to HMRC, click on Submit VAT return button on Action paneon the VAT returns submission form.VAT return can be submitted to HMRC just once for each obligation period. Makesure you want to submit VAT return before click YES in AX warning box. Warningbox includes declaration that the user by clicking “Yes” button confirms thatthe information which is going to be submitted to HMRC is true and complete.Accepting this declaration by “Yes” button user is responsible for the submittedinformation. If you are not sure that VAT return is ready to be submitted,click NO. When you click YES, generated VAT return in JSON format related tothe selected record in VAT returnssubmission form will be submitted to HMRC. If VAT return is submittedsuccessfully to HMRC its status will be updated respectively to Submitted. HMRC status, Received date field in AX will be updated if you retrieve VATobligations for a period including the reported one. In case of any errorduring submission of VAT return to HMRC, Statuswill be updated to Error.

You mayreview all the actions done with a VAT obligation on Log fast tab of the VATreturns submission form. When a response is received from HMRC you mayreview its full text by View fullresponse button. In case of error, Errorcode field will show a code of error from response and Error description field will show description of error from theresponse.


MTD-5.jpg


Security privileges

Followingsecurity privileges are created for the new functionality:

Security privilege

Description

Associated with

Setup and get HMRC access tokens (TaxHMRCSetupMaintain_UK)

Edit Web service parameters, Web applications (including Get test user, HMRC authorization, Get access token, Refresh access token)

Access Level:

-  TaxHMRCApplication_UK {delete}

-  TaxHMRCParameters_UK {delete}

-  TaxHMRCApplicationAuthorization_UK {delete}

-  TaxHMRCTestUserData_UK {delete}

-  TaxHMRCHelper_UK methods (getAccessToken) {invoke}

Duty: Maintain sales tax transactions (TaxSalesTaxTransactionsMaintain)

 

Retrieve HMRC VAT obligation (TaxHMRCVATObligationRetrieve_UK)

Retrieve VAT obligations on the form VAT returns submission

Access Level:

-  TaxHMRCApplication_UK {read}

-  TaxHMRCVATObligation_UK {correct}

-  TaxHMRCHelper_UK methods (retrieveVATObligations) {invoke}

Duty: Maintain sales tax transactions (TaxSalesTaxTransactionsMaintain)

Generate HMRC VAT return (TaxHMRCVATObligationGenerate_UK)

Generate VAT return on the form VAT returns submission

Access Level:

-  TaxHMRCVATObligation_UK {correct}

-  TaxHMRCHelper_UK methods (generateVATReturn) {invoke}

Duty: Maintain sales tax transactions (TaxSalesTaxTransactionsMaintain)

 

Submit HMRC VAT return (TaxHMRCVATObligationSubmit_UK)

Submit VAT return on the form VAT returns submission

Access Level:

-  TaxHMRCApplication_UK {read}

-  TaxHMRCVATObligation_UK {correct}

-  TaxHMRCHelper_UK methods (submitVATReturn) {invoke}

Duty: Maintain sales tax transactions (TaxSalesTaxTransactionsMaintain)

View HMRC VAT obligation (TaxHMRCVATObligationView_UK)

View VAT returns submission form.

Access Level:

-  TaxHMRCVATObligation_UK {read}

 

Duty: Inquire into sales tax transaction status (TaxSalesTaxTransactionStatusInquire)

To reviewor change distribution of security privileges by security duties and roles,open System administration > Setup > Security > Security roles.

Hotfix information


Hotfix information

A supported hotfix is available from Microsoft. There is a "Hotfix download available" section at the top of this Knowledge Base article. If you are encountering an issue downloading, installing this hotfix, or have other technical support questions, contact your partner or, if enrolled in a support plan directly with Microsoft, you can contact technical support for Microsoft Dynamics and create a new support request. To do this, visit the following Microsoft website:
 

https://mbs.microsoft.com/support/newstart.aspx

You can also contact technical support for Microsoft Dynamics by phone using these links for country specific phone numbers. To do this, visit one of the following Microsoft websites:
 
Partners
 
 
Customers
 
 
In special cases, charges that are ordinarily incurred for support calls may be canceled if a Technical Support Professional for Microsoft Dynamics and related products determines that a specific update will resolve your problem. The usual support costs will apply to any additional support questions and issues that do not qualify for the specific update in question.
 

How to obtain the Microsoft Dynamics AX updates files

This update is available for manual download and installation from the Microsoft Download Center.
 
 

Prerequisites

You must have one of the following products installed to apply this hotfix:

  • Microsoft Dynamics AX 2012 R3

Restart requirement

You must restart the Application Object Server (AOS) service after you apply the hotfix.
 

More information


Known issue:

Sometimes responseabout successful submission of VAT returns doesn’t include a payment indicator.

In thiscase user will get the following error:

image.png

To avoidthis issue download and install the hotfix:

https://fix.lcs.dynamics.com/Issue/Details?kb=4515253&bugId=3980707&dbType=0&qc=36fbf9ad92a60001ea41fa7e0dfac7a97b3e3ac20b81f7f0950dd626de353d67