Webhooks for credits

When configuring webhooks, there is no option to create one for a credit event.

I wonder if there are no webhooks for credits, or same webhooks that exist for invoice events apply for credits. (as, for example, custom fields are common between invoice and credit).

As an additional question, I see database table credits has an unused field called invoice_id. May I use that field with guarantee it’s not going to be overwritten?

Thank you.


@david can you please advise?

Sorry, there are credit webhooks, my error.

So, forget about this

No worries, thanks for the update!


Did you need credit webhooks? we can implement these. Also in regards to the second part of your question, yes, the invoice_id field is reserved, so i would suggest not using this.

No, I finally managed with invoice webhook.

What I’m trying to do is automate invoice “cancellation” (with an associated credit) with a custom field and a webhook.

BTW, debugging my webhoook in webhook.site I receive an invoice id like “1vbaA12x6g”, is this some kind of hash that invoiceninja does or is it some obfuscation that this site does?

Thank you.

All IDs are hashed by the application.

What type of hash? How can I get the real id? I need it

You should never “need” the primary key ID of the model, you could always retrieve by the hash, or user the ->number column to search on as these are unique.

I can retrieve invoice by number ok, but how can I do it with hash? I don’t see a field in DB, maybe performing an MD5?

We use the hashids package to encode/decode the primary keys, if you really need the primary id, you could use this.