Invalid JSON trying to create an invoice

I’ve tried to create an invoice using your documentation and used the exact format being specified on this page:

I’ve managed to successfully create a contact but so far no luck with invoices.

I’ve tried to create an invoice as follows (replacing the contact url with a valid one) and it’s exactly the same format as the one in the documentation but getting this returned:

“error”: “Invalid JSON”

Please kindly provide resolution.

{ “invoice”:
“total_value”: “200.0”,
“paid_value”: “0.0”,
“due_value”: “200.0”,
“always_show_bic_and_iban”: false,
“send_new_invoice_emails”: false,
“bank_account”: “”,
“payment_methods”: {
“paypal”: false,
“stripe”: false,
“description”:“Test InvoiceItem”,



First of all, your JSON is invalid. You can’t have a comma without a new key/value pair after it. So the comma after “stripe”:false is invalid. You can check your JSON here:

Second, I was able to use the corrected JSON (replacing the contact and bank account with my own) to make one successfully.

And third, if you are getting any error messages, let us know.

Hope that helps,

Pat George, FreeAgent

Thanks Pat George,

I’ve retested and it works fine. Just so you know, I copied and pasted from the below link which appears to be incorrect and it may be worth fixing.

Good spot, Hassan. I’ll get it checked out.

Just a quick follow up, Hassan. I’ve updated the docs and will push it live Monday morning. Thanks again for letting us know.

Ok, the docs have been updated to have correct JSON (as far as I can find, at least).

Thanks Pat,

I’ve managed to build my program to create invoices in the backend. Works quite well after a lot of pain!