pull down to refresh
0 sats \ 1 reply \ @ek 20 Jul 2023 \ on: Best way to check payment in bitcoin on chain bitcoin
Since your store generates a new address for every sale (as it should!), there will only be one incoming transaction ever. You can just check if that tx was mined. Best practice is to wait for 6 confirmations.
So I don't get what you mean with "last incoming tx". There will only be one.
But yes, you should check if the customer paid the requested amount and not less.
Thanks.
Yes, the "last tx..." part was just an idea only to be absolutely sure the amount in balance is coming from a recent transaction, as a secondary check.
I know every xpub can generate billions of addresses in the M84/0/0/X path. But since in some cases I project to be using an exchange account (that generates different addresses) I cannot verify nor obtain the xpub they will be using.
In most cases however I will be using a regular xpub so I will be sure to use a fresh address always.
reply