# Event for when an Invoice gets Void/Canceled

**URL:** <https://forum.wixstudio.com/t/event-for-when-an-invoice-gets-void-canceled/69544>\
**Category:** Ask the community\
**Tags:** wix-studio, question, code\
**Created:** [March 12, 2025, 1:56am UTC](https://forum.wixstudio.com/t/event-for-when-an-invoice-gets-void-canceled/69544 "2025-03-12T01:56:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juan\_Huanaco](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/juan_huanaco/32/104627_2.png) [@Juan\_Huanaco](https://forum.wixstudio.com/u/Juan_Huanaco)\
**Post date:** [March 12, 2025, 1:56am UTC](https://forum.wixstudio.com/t/event-for-when-an-invoice-gets-void-canceled/69544/1 "2025-03-12T01:56:45Z")

</div>

Hi everyone, hope you doing well.  
I’m a Wix Studio coder, and wanted to know if someone found a workaround for this:

I saw that the wix-billing-backend api does not include an event for when an invoices gets void/canceled. We got onInvoicePaid() and also onInvoiceOverdue() but not sign for the one I’m telling you.

Since we do not longer have access to the old Billing/Invoices collection managed by Wix, currently I’m storing the data I need from the onInvoicePaid() event on a collection to feed an admin dashboard.

However sometimes, there are cases where an invoice gets canceled and I have not quick way to listen for such event and flag that record on my collection. Resulting in a manual fix.

I thought I would then schedule a task that runs at everynight to check into all my invoices (from that day) and compare them to details from getInvoice(). But even though I have the Invoice ID, it tells me that my “member is not associated with such Invoice” ??

I do not know if that’s because I can only call getInvoice() for the invoices that I created through createInvoice(). If that’s so, it’s very disappointing for my case. 😔

That being said, have you overcome this scenario already ? Is there a way to actually automate this process and catch when an Invoice gets voided ?

Thx in advance,  
Juan H.

---

<div class="post-metadata">

**Author:** ![emmy](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/emmy/32/113141_2.png) [@emmy](https://forum.wixstudio.com/u/emmy)\
**Post date:** [March 13, 2025, 3:18pm UTC](https://forum.wixstudio.com/t/event-for-when-an-invoice-gets-void-canceled/69544/2 "2025-03-13T15:18:41Z")

</div>

Hi Juan! Sorry to hear about the difficulties, I’ve submitted feedback requesting event handlers for deleted/voided invoices.

Regarding your workaround, I’m not sure I understand the exact error you’re getting without seeing your code. One thing I’d check is to try using `wixAuth.elevate` with your getInvoice function (see this [forum comment](https://forum.wixstudio.com/t/wix-invoice-apis/52687/7) as an example).

---

<div class="post-metadata">

**Author:** ![Juan\_Huanaco](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/juan_huanaco/32/104627_2.png) [@Juan\_Huanaco](https://forum.wixstudio.com/u/Juan_Huanaco)\
**Post date:** [March 13, 2025, 4:08pm UTC](https://forum.wixstudio.com/t/event-for-when-an-invoice-gets-void-canceled/69544/3 "2025-03-13T16:08:39Z")

</div>

Thx @emmy, you were right about wrapping the function with `wixAuth.elevate` stopped the error. I didn’t try it before since usually when the use of elevate is required, the docs point that.

So, can you also do a request to add that guideline on `getInvoice` documentation ? So new users know how to call it properly. :100:

Now I can implement a daily check on invoices, which serves as a workound until the Wix Team enables event handler for deleted/voided invoices. :clap:

Since there is no ETA for that, how I can get notified when that event handler gets added ?

---

<div class="post-metadata">

**Author:** ![emmy](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/emmy/32/113141_2.png) [@emmy](https://forum.wixstudio.com/u/emmy)\
**Post date:** [March 18, 2025, 2:37pm UTC](https://forum.wixstudio.com/t/event-for-when-an-invoice-gets-void-canceled/69544/4 "2025-03-18T14:37:53Z")

</div>

Glad it worked! I’ll pass that feedback to the documentation team. 🙂

And for the feature request, you can check if it’s on the [Product Roadmap](https://support.wix.com/en/roadmap). If not, you can submit a request for it. You’ll be notified if there are any updates to it!
