To accept payments in ether myself, I first tried how others have implemented it. So I bought an item in a store that uses Coinbase Commerce to accept crypto payments and paid for my item with ether. Here is my payment transaction: https://etherscan.io/tx/0x229fc693785f97f905f9db953800edca58cced706592684d5f24ca9b69d80dac
At the moment I made this transaction, etherscan was showing the recipient address 0x6a173337f2bb7ad85c011dda499ab9cfc1016461
as a regular (external) address that has just received my payment and had the ether on its balance.
But 8 minutes (37 blocks) later a series of internal transactions appeared: https://etherscan.io/address/0x6a173337f2bb7ad85c011dda499ab9cfc1016461/advanced#internaltx
Which included the contract creation and a transfer of the funds to another address. Here is the parent transaction: https://etherscan.io/tx/0xc05d18302cf9363c858cea9068f1ba88827ef5b0d446553c44c5c9cab282c693
My question is: how could a contract be created on an existing address that was previously used as external? And what exactly has happened there in general? Does anyone understand such a scheme works under the hood? Any clues are highly appreciated, thanks!