Hi. If the payload is a string then you can use the action “StringToFile” from the Marketplace module Community Commons.
If you already have the payload as a physical file on the disk where Mendix app is deployed then use “FileDocumentFromFile” from the same module.
Otherwise write your own Java Action that accepts the result of your REST call and calls the java API Core.storeFileDocumentContent()
You can still check with the implementations from Community Commons