Bills invoices, registereing VAT to each bill

We are trying to register bills in the UK via the API but we cannot work out how we register the VAT/Salestax to that bill/purchase.

Does anyone know how to do this? (and might have a code snippet that could clarify how we do it perhaps?)

Hi there :wave:

Thanks for posting your question on our forum. Our API docs have a page dedicated to the handling of sales tax depending on which endpoints you work with – this includes a section on Expenses and Bills which should contain the information you need: Sales Tax and VAT. It’s a great starting point, however if, after reading it, you have any follow-up queries or need further clarification, please feel free to let me know :slight_smile:

Best wishes,

Ewa

Thanks
we have studied it in detail, but we cannot get it to work in the way your documents say it should.
Do have a code snippet as an example please?

Normally you shouldn’t have to specify a sales tax rate explicitly in your request body when creating bills in a VAT registered account (it should be set automatically for the category of the bill), unless you’re trying to add a rate which isn’t standard for the relevant accounting category – is this the case? Could you tell me a bit more about the issue you’re encountering: is VAT not getting set at all or is it getting set but not to a rate you want? Are you getting any errors? Which accounting category are you using?

Thanks
We have now managed to add VAT.
Now the next challenge has appeared.

We annot change it from being unpaid to being paid.

So all bills have status being unpaid even if they are?
What API call should be done here to set the invoice to be paid???

Hi there,

For a bill to be marked as paid, you’ll need to explain a transaction in the Banking section as a bill payment associated with the bill in question. Here are some resources that should help you:

Pay a single bill – FreeAgent. [FreeAgent Knowledge Base article which explains how you’d record a bill payment in the web app]
Create a Bank Transaction Explanation [Documentation explaining how to create a bank transaction explanation using the FreeAgent API]

Hope this helps!

Best wishes,

Ewa