<oembed><type>rich</type><version>1.0</version><author_name>npub1trckpcxmceskq4cykxgwxm63n8ugrjrpu5mk83c90e4upsf7d9gqf0f95j</author_name><author_url>https://nostr.ae/npub1trckpcxmceskq4cykxgwxm63n8ugrjrpu5mk83c90e4upsf7d9gqf0f95j</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2012-11-28&#xA;📝 Original message:&gt; If a Receipt is not received for any reason (timeout, error) and&#xA;&gt; Payment.transactions has not been broadcast by the merchant on the&#xA;&gt; Bitcoin p2p network, then the Bitcoin client should assume that the&#xA;&gt; payment failed, inform the customer that the payment failed, and&#xA;&gt; return coins involved in the transaction to the customer&#39;s wallet.&#xA;&#xA;I&#39;m not sure I understand the rationale for this.  In the above&#xA;scenario the buyer has no way to determine whether the merchant still&#xA;has a copy of the transaction that they could broadcast in future.&#xA;Maybe there is simply a systems problem at the merchant which has&#xA;temporarily delayed the transaction broadcast. Or maybe a dishonest&#xA;merchant deliberately engineered this situation in an attempt to&#xA;mislead the buyer as to the status of their payment.&#xA;&#xA;Either way, having the buyer think the coins have been returned to&#xA;their wallet - only to disappear from their wallet again at some later&#xA;time - would seriously damage user confidence in Bitcoin IMHO.&#xA;&#xA;It seems to me that the first thing the buyer should do given the&#xA;protocol as it stands is simply resend the Payment message - if there&#xA;was a temporary problem then resending the payment message (with the&#xA;same signed transation) might resolve the sitution.&#xA;&#xA;If after several retries the status of the transaction is still&#xA;undefined then it&#39;s really not clear what to do, but it seems&#xA;desireable to have the client take steps so that it can return to a&#xA;state of certainly about its wallet balance as quickly as possible.&#xA;Two things I can imagine that the buyer might want their client to do&#xA;at this point are:&#xA;&#xA; * broadcast the transaction itself, so they are sure the payment&#xA;   transaction will make it into the blockchain without any further&#xA;   action on their part, or&#xA;&#xA; * invalidate the transaction by immediately broadcasting a&#xA;   pay-to-self transaction that spends one or more of the same outputs&#xA;   that the payment transaction spends (and treat the funds as part of&#xA;   the unconfirmed balance until this pay-to-self transaction&#xA;   confirms).  This ensures the merchant can&#39;t subsequently use a&#xA;   transaction which the buyer thinks has failed&#xA;&#xA;It seems to me it would be simpler and cleaner if the buyer just&#xA;always broadcasted the transaction on the p2p network, regardless of&#xA;whether the Invoice includes a receiptURI.  If a receiptURI is&#xA;included, the buyer&#39;s client would also include the transaction in the&#xA;Purchase message.  The merchant then tries to broadcast the&#xA;transaction as well (unless their bitcoind has already seen it, which&#xA;may well be the common case).  This approach seems to me to have fewer&#xA;nasty edge cases.s&#xA;&#xA;roy</html></oembed>