The below query can help extract the Oracle Payments xml file which is processed by Oracle cloud ERP Payments module.
This query extracts the source xml. This can greatly help in Debugging Payment issues:
SELECT *
FROM iby_trxn_documents itd
WHERE itd.payment_instruction_id IN (SELECT payment_instruction_id
FROM ap_checks_all aca
WHERE aca.check_number = <Paymentnumber>)
AND itd.doctype = 100 —code for Source xml