Custom Function which Changes the Invoice Status to be paid.

Custom Function which Changes the Invoice Status to be paid.

Hi Zoho Community,

I have created an automation for zoho inventory in which i change a custom field of invoice to paid through zapier so it should triggers the custom function to change the status of the payment to paid. 

I have created a custom function through ChatGPT but its not working. I have also searched for any API end point to change the zoho inventory invoice as paid (Record a Payment).  But there is no API end point as well.

Is there any solution, Kindly share with me. 
Thanks