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?
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.
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?
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.