hmrc / vat-api

Apache License 2.0
67 stars 17 forks source link

Retrieve VAT Obligation questions and scenarios - few questions #42

Closed tim-xero closed 6 years ago

tim-xero commented 6 years ago

The Retrieve VAT obligation endpoints, definition and example provided appears to reflect a common situation of 4 equal quarterly periods in a year. There's a corresponding periodKey to identify the return. We have some questions on different scenarios and situations - how things will be handled in practice. Some test scenarios and examples for common use cases people will need to achieve would be good.

How will MTD API's reflect returns from different years? or is it only going to offer a current year available in list?

When will the next years VAT returns for a business be available to view?

If available to view in advance, will the system have something to limit the earliest returns can be submitted. (eg, will MTD prevent a return period from being lodged if is received before the period too date?)

How will MTD VAT API's identify different return obligations where periods might change in different use cases including:

Does HMRC MTD VAT list information update immediately / instantaneously following an update from any HMRC system? or is there a time delay or some kind. If so, what is it?

nigelrainer commented 6 years ago

We have clients who submit returns for industrial month ends (4-4-5 week intervals). Will this be catered for?

MarkAKelly commented 6 years ago

Hi @tim-xero and @nigelrainer, apologies for the delay in responding. Hopefully the following will answer a few of your queries.

Just as a note, period keys are unique to a VRN and to an obligation, so if a user has 16 obligations over 4 years all 16 will have a unique period key with which to identify them.

How will MTD API's reflect returns from different years? The date range supplied in the query parameter doesn't have to relate to a tax year, and nor does it have to be an entire year. All obligations that sit within that date range will be returned, up to a maximum of a year (366 days to account for leap years) over which we expect to return an INVALID_DATE_RANGE response.

Will the system have something to limit the earliest returns can be submitted... The submission date of a return can't be earlier than the period 'to' date, so before the obligation is due.

When will the next years VAT returns for a business be available to view? We will only show an obligation as it is created - that is an obligation will be created on the first day of the accounting period. There is one exception where the length between the date the trader started trading and the date they registered for VAT might result in an elongated first period.

How will MTD VAT API's identify different return obligations where periods might change At the moment I assume this is answered by the above, but if there are any more ambiguities then I'd be happy to attempt an answer.

Does HMRC MTD VAT list information update immediately / instantaneously... We will try and get some useful metrics for this - this is dependent on processes downstream to our API so will have to get updated information for this.

tim-xero commented 6 years ago

@MarkAKelly Thank you for this - really appreciated and really clear.

Good point you raise (and I have asked the sds team for some data around this separately) - but given we can only get 366 days maximum, can we therefore say it's impossible a tax payer will have obligations outstanding that are older than 366 days?

Is there a quick endpoint we could use/can be created to see and get the oldest outstanding return? This would be to avoid us smashing the endpoint and the tiny API limit, searching for the oldest return outstanding and associated period key. There could be obligations open from before MTD.

The update/refresh time is important because it speaks to when the list shows changes. You give an example of a trader starting which is very relevant. We think there could also be a trader changing reporting periods.... and a trader 'ending' VAT. All 3 could result in changes to periods due, and when MTD get endpoint would reflect the change, and potentially any existing period keys. If a period changed, would a new unique period key be created? or the period for an existing period key be replaced/updated for a change?

MarkAKelly commented 6 years ago

@tim-xero Its not impossible to have obligations outstanding older than 366 days. There could not be obligations outstanding from before the MTD date as we aren't migrating obligations from before this. VAT customers that are being migrated in the medium term are users that have periods that have a 'to' date past the MTD date, so they should all have only one obligation created when they start.

Off the back of some of the user research done by Ben, we are in the process of refining a feature that will allow you to return all 'Open' obligations without the need to supply date parameters. This I hope is something close to what you need?

Again in terms of Change of Circumstances (if a VAT user changes their reporting period/ending VAT) I'm wary of promising too much as there is a program of work that should account for this, but we don't have the full details yet. I appreciate this might not help you in the short term, but it could be either that the period details with the same period key are updated, or the period is replaced with a new period with a new unique key. We will get an update to you on this as soon as we hear more!

nnotsofun commented 6 years ago

Thanks @MarkAKelly - that's a lot of good info :-)

Just thinking of this scenario:

And for clarity - by MTD date do we mean April 2019? Or a time before then - being mindful of the pilot (sometime later this year)?

If you'd like me to open another issue - let me know!

MarkAKelly commented 6 years ago

@nnotsofun MTD date is April 2018, there is a separate "mandation" date of April 2019 which is when people who have not migrated will be required to do so. But yes, for our purposes MTD date means April 2018.

A business that is registered for VAT doesn't need to use MTD but they'll still need to provide their VAT Returns until they de-register. They don't have to be above the threshold to pay VAT.

When they migrate onto MTD there'll be no history migrated with them so, in order to do so, they'll need to have no outstanding obligations or outstanding payments. The migration strategy that is being implemented will require that all due obligations must be fulfilled.

nnotsofun commented 6 years ago

@MarkAKelly Thank you for clarifying - as part of the migration strategy will there be a way for software vendors to work out if the business is opted into MTD (i.e. all pre-MTD obligations are fulfilled)? e.g. something like an appropriate validation error when making an obligations list request?

And if not, then would we expect the obligation list to always return an empty list when filtering by open obligations?

MarkAKelly commented 6 years ago

@nnotsofun in the pipeline is to add appropriate authorisation to the VAT API as we have done for the Self Assessment API. If you try and hit one of our endpoints with a VRN that is not enrolled for MTD then we will return (something like) a 403 (Forbidden) status with an appropriate response code (denoting whether the client/agent is not subscribed).

For your scenario, if you hit our endpoint and they're not subscribed then you'll get an appropriate response. If you hit our endpoint and we return an obligation, then they must have fulfilled all of their pre-MTD obligations.

elsapet commented 6 years ago

Thanks all for the clarifying discussion.

@MarkAKelly -- is there any update on what will happen to period keys when there is a Change of Circumstances?

https://github.com/hmrc/vat-api/issues/42#issuecomment-367267042

Again in terms of Change of Circumstances (if a VAT user changes their reporting period/ending VAT) I'm wary of promising too much as there is a program of work that should account for this, but we don't have the full details yet. I appreciate this might not help you in the short term, but it could be either that the period details with the same period key are updated, or the period is replaced with a new period with a new unique key. We will get an update to you on this as soon as we hear more!

JeeBeePee commented 5 years ago

I got my production credentials this week but keep getting INVALID_DATE_RANGE when calling the obligations endpoint. Valid date ranges don't seem to be specified anywhere in the documentation. What rules are enforced on the date range for each of the endpoints that allow (/mandate) one?

AbsoluteAccounting1 commented 5 years ago

Could you please confirm if there is any further feedback relating to the above comment ''is there any update on what will happen to period keys when there is a Change of Circumstances?''

Thanks

mtd-api-team commented 5 years ago

We can confirm that If the change of circumstances impacts the filing period then the period and period key will be adjusted.