That would not work, since you cannot check the transaction id is on the chain or not without a node or a third party to do the check for you, without even getting into checking whether that transaction id does pay you.
If you really must have no node and no third party, then...
The customer sends you the block header the tx was mined in, plus the ordered transaction id set in that block, which includes the tx the customer sent you. The customer also sends the actual tx.
Then you can verify that the transaction hash is in the claim tx id set. Then you can calculate the hashing blob, and thus verify the block yields a hash below a high difficulty which corresponds to the rough Monero difficulty.
Doing the above ensures about as much energy was expended in creating the block as was on the real Monero network, so it is unlikely someone would expend thats much work without actually mining. Of course, it can still mean the block was orphaned.
If this is not enough, you can request N blocks prior to the block with the tx, and do the same for those N blocks too.
Once this is done and you know with reasonable certainty the tx is certain to be in the chain (and thus valid), you can check the tx actually pays you and how much. For this, the customer would also send a proof generated by get_tx_proof
, which you'd check using check_tx_proof
.
If you're worried about the block being orphaned, you can also require M blocks after the block containing the tx, and do the same block checking work for those (do not forget to verify each block does point to the block hash of its purported parent). This will of course mean a delay before such a proof can be made.