Webhooks for sending invoices/estimates

Just updated two invoices (marked them as ‘sent’ from ‘draft’). I’d expect these to trigger an ‘InvoicesUpdated’ webhook, but this doesn’t seem to be the case.

Is this my mis-understanding, or is this a bug?

I just tried to do this myself on a test account and the hook was created when “marking as sent”.

Question: Did you mark as sent from the individual invoice preview or the main invoice list?

I actually sent it by email from the invoice preview screen

Did you enable Webhooks in the same session or have you had this enabled for some time? I also tried sending by email from my test account and it queued the webhook.

I think if you switch on Webhooks you need to log out and back again before they start firing.

I’ve had it enabled for some time.

3 Invoices were created as draft, webhook sent fine. Then, 2 were marked as sent, and nothing happened.

One remains in draft only to see if it works afterwards.

Just sent invoice 0372 by email - no webhook has been queued

I’ve escalated this to be looked at in more detail, I will let you know as soon as we’ve had a chance to look.

The events on my test account earlier were for invoices_created not sent.

Having checked the spec for the Webhooks Implementation we never supported hooks on invoice/estimate sent.

Webhooks - Supported Events

This is why no hooks are being fired for this action. I can definitely suggest this as a new feature when we next extend Webhooks. I’ve switched to a feature request for now.

If I’m honest, I was expecting more of an “InvoicesUpdated” (mainly because the status has been updated), more than a dedicated function.

I think it would be useful though!

Let me consider this further. I’m inclined to think it may be more useful to have a unique hook ID for this? Then users can specifically target this event.

It would be quite easy I believe to implement this hook, for now I’ve logged it as a feature request.

2 Likes