How to fetch the response of external webhook and create a sales invoice in ERP Next. Able to fetch the data and show in console, but not able to create the sales invoice, showing 500 error.
You could create your own whitelisted API function and call that from your incoming external hook. See:
RPC-Calls
In that function you can do what you want with the incoming data.
To create a doc of your desired doctype, see:
Document API