How to integrate Zatca Fatoora Portal Phase 2 with Dynamics AX or D365?

Hello experts,

I have implemented Zatca’s phase 1 Generation phase (KSA) and now I am working on implementing Phase 2 but I am confused about how to create Invoice XML file, get UUID, Hash Value, and what should be the complete pattern of the Invoice XML file.

Can anyone please tell me step by step how to implement Zatca Phase 2 with Dynamics AX 2012 or D365?